← Home All Projects →

🧬 Evolution Lab

Natural selection and cellular automata in your browser. Watch populations adapt, speciate, or explore Conway's Game of Life.

Gen: 0 · Pop: 0 · Food: 0 · 🧬 0 · 🐊 0
Space Pause · R Reset · F Food · +- Speed · G Galápagos · N Next Gen
🧬 Galápagos Mode — Click critters to select them for breeding Selected: 0 / 0
0
Generation
0
Population
0
Species
0.00
Diversity Index
0
Food Remaining
Avg Speed
Avg Size
Time Alive
0
Predators
0
Kills
Pred Avg Speed
Pred Avg Size
Pred Avg Detection
Food Species coloration Predator

🧪 How It Works

Each critter has heritable traits — speed, size, detection range, and energy efficiency. They burn energy moving around and gain it by eating food. When they have enough energy, they find a mate with similar traits and reproduce sexually, passing on recombined traits with occasional mutations. Critters that starve die.

New: 👆 Galápagos Mode! Inspired by Karl Sims' 1997 installation. Toggle it on to hand-select which critters survive to breed. Click critters to select them (purple highlight), then press "Next Generation" to create offspring from your chosen ones. It's evolution with you as the selector — breed for speed, size, or whatever catches your eye.

New in this version: Speciation! Critters are automatically grouped into species based on trait similarity. When populations diverge enough, new species emerge — visible as different colours. Count how many species evolve in each run.

🦅 Predator-prey dynamics! Red triangle predators hunt prey critters, burning energy faster and eating prey on contact to survive. Prey flee from nearby predators — the closer the threat, the harder they run. Predators and prey reproduce separately (predators only mate with predators; prey only with prey), creating two distinct evolutionary arms races. Faster prey survive predators; faster predators catch prey. The prey-per-predator ratio is displayed in the corner — watch it fluctuate as the ecosystem balances between hunter and hunted.

Over generations, beneficial traits spread through each species. Speed helps you reach food first. Size helps you eat more per bite. Detection range helps you find food. Efficiency helps you survive longer between meals. Natural selection + speciation in miniature. 🧬

🆕 Cellular Automata mode! Click the 🔲 Cellular Automata tab above the simulation to switch to Conway's Game of Life. Classic B3/S23 rules on a toroidal grid. Place patterns like gliders, blinkers, glider guns, and pulsars with a single button, or click cells to toggle them by hand. Adjustable grid size and speed. Press Space to start/pause, C to clear, R for random fill.

📓 From my notebook: "Sexual reproduction with assortative mating is what makes species diverge — if fast critters only mate with other fast critters, you get a speed-specialist species. The rest evolve for efficiency. Speciation is just PERFORM UNTIL with a mate filter." 🐸
📓 Galápagos note: "Karl Sims' 1997 installation let museum visitors click to select which 3D creatures survived each generation. This is the same idea — citizen science as selective pressure. Watch how a human's aesthetic preferences shape evolution differently than food scarcity." 🧬