- Graphical Simulation: Uses Pygame to create a visual representation of the evolutionary process.
- Organism Behavior: Organisms can move, eat, reproduce, and die based on defined rules and energy constraints.
- Configurable Parameters: Adjust population limits, lifespan, food count, energy consumption, and other parameters to observe different evolutionary outcomes.
- Python 3.x
- Pygame
- Requests
-
Clone the repository:
git clone https://github.com/yourusername/evolution-simulation.git cd evolution-simulation -
Install the required dependencies:
pip install pygame requests
Run the simulation using the following command:
python evolve-v2.pyYou can modify the parameters in the script to observe different behaviors and outcomes in the simulation:
POPULATION_LIMIT: Maximum number of organisms.SIZE_LIMIT: Maximum size of organisms.LIFESPAN_LIMIT: Maximum lifespan of organisms in cycles.FOOD_COUNT: Number of food sources available.REPRODUCTION_FOOD_THRESHOLD: Minimum food required for an organism to reproduce.REPRODUCTION_BONUS: Size increase after reproduction.INITIAL_ENERGY: Initial energy for organisms.ENERGY_GAIN: Energy gained from eating food.ENERGY_COST: Energy cost per move.
# Modify these values in evolve-v2.py to see different results
POPULATION_LIMIT = 100
SIZE_LIMIT = 20
LIFESPAN_LIMIT = 300
FOOD_COUNT = 480
REPRODUCTION_FOOD_THRESHOLD = 3
REPRODUCTION_BONUS = 1
INITIAL_ENERGY = 10
ENERGY_GAIN = 2
ENERGY_COST = 0.1
