Why Biology?
Physics simulations excel at closed systems with known equations. Biology is different: the rules are fuzzy, agents are adaptive, and the most interesting effects emerge from the interaction of many independent agents following local rules they cannot see globally.
That makes biology a perfect domain for simulation. You don't need closed-form solutions — you run the agents, observe the emergent patterns, and develop intuition that no equation can easily convey.
Emergence in every demo. Each simulation below produces behaviour that is richer than the sum of its rules. No single boid knows it's forming a flock. No single ant knows it's optimising a path. No single organism knows it's evolving a strategy. The global pattern emerges without a central controller.
Collective Behaviour
Boids Flocking
Craig Reynolds' classic model — three rules (separation, alignment, cohesion) produce realistic-looking flocking behaviour for hundreds of agents.
Bird Flock (3D)
Extended boids with predator avoidance, obstacle fields, and a 3D canvas — including murmuration-style density waves when a predator agent is added.
Ant Colony & Pheromones
Thousands of ants lay pheromone trails to food sources and the nest. Watch the colony spontaneously find shortest paths and solve the travelling salesman on small mazes.
Predator-Prey (Lotka-Volterra)
Agent-based predator-prey ecology on a toroidal grid. Observe population cycles, spatial spiralling, and extinction events from tuning birth/death rates.
Evolutionary Dynamics
Genetic Algorithm
Watch a population evolve a target solution through selection, crossover, and mutation. Tune fitness pressure and mutation rate to explore the exploration-exploitation trade-off.
Evolutionary Game Theory
Hawks and Doves. Rock-Paper-Scissors ecology. Spatial prisoner's dilemma. Watch cooperation and defection spread through a population on a lattice.
Molecular Biology
Protein Folding (HP Model)
The HP lattice model — a chain of hydrophobic (H) and polar (P) residues finding minimum energy configurations using simulated annealing. Shows why folding is NP-hard.
Cellular Automata
Conway's Game of Life and eight other rules, including Lenia (continuous CA), Brian's Brain, and Langton's Ant. Paint initial conditions and watch structure emerge.
Suggested Exploration Order
- Boids — the ur-example of emergence from local rules
- Ant Colony — stigmergy: intelligence via the environment
- Predator-Prey — population dynamics and chaos
- Cellular Automata — computation from pure spatial rules
- Evolutionary Game Theory — strategy without a strategist
- Genetic Algorithm — directed search through mutation + selection
- Protein Folding — why biology's hardest problem is hard
- Bird Flock 3D — push the collective to its limits