Ecosystem Simulation
This is a simple ecosystem simulation that shows the interaction between different organisms in a virtual environment.
Entities
The simulation includes three types of entities:
- Plants (green): Generate energy through photosynthesis and reproduce slowly.
- Herbivores (blue): Consume plants for energy and reproduce when they have enough energy.
- Carnivores (red): Hunt and consume herbivores for energy.
Controls
- Start: Begin the simulation
- Pause: Pause the simulation
- Reset: Reset the simulation with initial entities
Ecosystem Rules
- All entities have limited energy and age.
- Plants generate energy and grow over time.
- Herbivores seek and eat plants to gain energy.
- Carnivores hunt herbivores to gain energy.
- All entities reproduce when they have sufficient energy.
- Entities die when they run out of energy or reach their maximum age.
How It Works
The ecosystem maintains a balance naturally. If there are too many herbivores, they will consume more plants, causing the plant population to decline. With fewer plants, herbivores will struggle to find food and their population will decrease. This will allow the plant population to recover. Similar dynamics occur between herbivores and carnivores.
This is a simple demonstration of predator-prey relationships and ecosystem dynamics.