An artificial life simulation where creatures evolve through natural selection. Each creature has a genome that determines how it moves, eats, and reproduces. Nothing is scripted — all behavior emerges from simple rules.
There are three species, forming a food chain:
Any species can also scavenge the starvation corpses of its usual prey.
Every creature carries six genes:
Energy is (roughly) conserved. Each tick, every living creature loses:
$\Delta E = \underbrace{c_{\text{base}}}_{\text{just existing}} + \underbrace{c_{\text{muscle}} \sum_i |f_i|}_{\text{stronger forces cost more}} + \underbrace{c_{\text{move}} \cdot |a|}_{\text{movement cost}}$
Stronger forces let a creature chase food or flee predators more effectively, but cost more energy every tick — the same trade-off real muscles face. A creature with all forces near zero barely moves but also barely starves.
Creatures die when their energy hits zero, leaving a corpse that decays after a short time.
When a creature reproduces, its offspring inherits its genes with small random mutations. Creatures whose genes lead to finding food and avoiding death reproduce more, so useful traits accumulate over generations. No fitness function is defined — survival is the fitness function.
You can watch evolution happen in real time in the Stats panel: the average force genes per species shift as populations adapt.
Each creature's shape is computed directly from its genes, so creatures with similar genomes look similar. Opacity indicates energy level — dimmer means hungrier. Outline-only shapes are corpses.