Developing and analyzing probabilistic models for decision-making in a dynamic environment where an agent pursues a prey while evading a predator.
This project, completed as part of the Computer Science course at Rutgers University (Fall 2022), focuses on building a probabilistic model of an environment with uncertainty to inform decision-making. The project involves an agent pursuing a prey while being pursued by a predator. The agent must capture the prey while evading the predator, despite not always knowing their exact locations.
The environment is a graph consisting of 50 nodes, connected in a large circle. Additional edges are added randomly to increase connectivity. The environment supports the movement of three entities: the Agent, the Prey, and the Predator.
- Agent: Pursues the Prey while evading the Predator. Moves based on specific strategies that account for varying levels of information about the other entities.
- Prey: Moves randomly to neighboring nodes or stays in its current node.
- Predator: Moves towards the Agent by selecting the shortest path among neighboring nodes.
Agent 1: Moves based on the following priority:
- Closer to the Prey and farther from the Predator.
- Closer to the Prey and not closer to the Predator.
- Not farther from the Prey and farther from the Predator.
- Not farther from the Prey and not closer to the Predator.
- Farther from the Predator.
- Not closer to the Predator.
- Stays still as a last resort.
Agent 2: Custom strategy designed to outperform Agent 1.
Agent 3: Surveys the node with the highest probability of containing the Prey and moves based on updated probabilities.
Agent 4: Custom strategy designed to outperform Agent 3.
Agent 5: Surveys the node with the highest probability of containing the Predator and moves based on updated probabilities.
Agent 6: Custom strategy designed to outperform Agent 5.
Agent 7: Surveys based on the highest probability of the Predator or Prey, updates probabilities, and moves accordingly.
Agent 8: Custom strategy designed to outperform Agent 7.
The performance of each agent strategy was analyzed through simulations. Key metrics include:
- Frequency of the Predator catching the Agent.
- Frequency of the Agent catching the Prey.
- Frequency of simulation hangs (no capture past a large time threshold).
- Accuracy of the Agent's knowledge of the Prey's and Predator's locations.
- How should belief update rules be adjusted for scenarios with false negatives in surveys?
- Comparison of Agents 7 and 8 in scenarios with and without belief update rule adjustments.
- Potential development of Agent 9 for improved performance.
To run the project, open the provided Jupyter Notebook (<.ipynb>
) in an appropriate environment (e.g., Jupyter Lab, Google Colab). The notebook includes detailed comments and explanations for implementation and experimentation.
- Python 3.x
- Jupyter Notebook
- Required libraries:
numpy
,matplotlib
,random
- Clone the repository.
git clone https://github.com/alcatraxlr8/Circle_of_Life.git cd The_Circle_of_Life
- Open the Jupyter Notebook.
jupyter notebook <.ipynb>
- Follow the instructions in the notebook to run the simulations and analyze the results.
This project explores the complexities of decision-making in uncertain environments. By comparing different agent strategies, it provides insights into the effectiveness of various probabilistic models and decision-making algorithms.