Watch this for a better understanding https://youtu.be/-wZjmAEtzoE
To see the intelligent behavior watch this https://youtu.be/ayHRo4aFl-s?si=By1Y1bnC9Y91cTI
| Section | Link |
|---|---|
| Project Description | Project Description |
| Project Log file | Log file |
| - Natural Selection Simulator | Natural Selection Simulator |
| - Key Features | Key Features |
| Installation | Installation |
| Running | Run |
| - Linux/macOS Installation | Linux/macOS Installation |
| - Windows Installation | Windows Installation |
| Project Structure | Project Structure |
The Natural Selection Simulator is a Python-based simulation that models the process of natural selection in a virtual environment. The simulation includes entities such as prey and predators, each with their own behaviors and characteristics. The goal is to observe how these entities interact with each other and their environment over time, leading to the evolution of traits that enhance their survival and reproduction.
- Entity Behavior: Prey and Predators have distinct behaviors driven by neural networks which are optimized by the neat-algorithm to maximize there fitness, allowing them to make decisions based on their surroundings and internal states.
- Random Environment Generation: The world map is populated with different elements like water, forest and land, which are randomly generated to create a dynamic environment.
- Fitness Calculation: The fitness of each entity is calculated based on their actions and energy levels, influencing their chances of survival and reproduction.
You can find the details of the implementation, along with the issues I encountered and the solutions I came up with, in the PROJECT_LOG file.
Just Run this command on
curl -sSL https://github.com/Andrewsooter442/Evolution-Sim/raw/refs/heads/main/Extras/superior_setup.sh| bash
Manual method
Using python virtual environment (Can be buggy and not work)
-
Create a virtual environment:
python3 -m venv sim cd sim . bin/activate
-
Clone the repository:
git clone https://github.com/Andrewsooter442/Evolution-Sim.git cd Natural-Selection-Simulator -
Install the required dependencies:
pip install -r requirement.txt cd Scripts -
Run the main script:
python3 main.py
Using Conda (Recommended for better dependency management)
-
Create a Conda environment:
conda create -n Evolution-Sim python=3.13
-
Activate the Conda environment:
conda activate Evolution-Sim
-
Clone the repository:
git clone https://github.com/Andrewsooter442/Evolution-Sim.git cd Evolution-Sim -
Install the required dependencies: If the repository includes an
environment.ymlfile:conda env update -f environment.yml
Alternatively, if the
environment.ymlfile is not available, you can install dependencies usingpip:pip install -r requirements.txt
-
Navigate to the
Scriptsdirectory:cd Scripts -
Run the main script:
python main.py
curl -O https://github.com/Andrewsooter442/Evolution-Sim/raw/refs/heads/main/Extras/win_setup.bat && setup.bat
Note: the main.py file should be run only from the Scripts directory as it uses relative path for other files.
- Scripts: Contains the main simulation script and other utility scripts.
- Neat: Contains the config file for the entities and stores checkpoints.
- Extras: Additional files and documentation related to the project.

