Evolution: A Biological Simulation
Evolution is an interactive digital ecosystem where artificial life forms compete for resources and survive through generations. This simulation models the fundamental principles of biological evolution in a simplified 2D environment using a custom-built 2D Canvas engine.
Core Simulation Features & Technical Specs
- Day-based Simulation: Creatures hunt for food, eat, and rest in a rhythmic cycle, modeling energy consumption and survival.
- Population Dynamics: Real-time reproduction and mortality based on food consumption (feedScore) and genetic potential.
- Species Diversity:
- Seekers: Efficient foragers that locate food quickly and share resources.
- Raiders: Opportunistic creatures that steal resources from others, modeling predatory behaviors.
- Spatial Optimization: Utilizes a SpatialGrid for efficient O(1) food lookup, allowing hundreds of creatures to be simulated simultaneously at 60fps.
- Real-time Analytics: Monitor population graphs, species distribution, and individual creature statistics through a real-time inspector.
Educational Modeling
Every "day" in the simulation, a fixed amount of food is spawned across the grid. Creatures must find and consume at least one unit of food to survive. Consuming more food increases the chance of reproduction. The simulation handles complex interactions like food sharing and resource theft, leading to emergent behaviors and shifting population balances. It's a perfect tool for understanding natural selection and ecosystem stability.
More Simulations
Explore our other simulations, such as the Galaxy Simulation, an interactive space simulator where you pilot a ship through a procedural galaxy.