Creature learns to walk
These wobbly creatures are made of bones (grey) and muscles (pink). Nobody tells the muscles when to squeeze. Press Evolve and watch them discover walking!
Checkpoints — the champion walker over time. Tap one to watch it walk in today's world.
How it works
A body
Dots joined by sticks. Grey sticks are bones that stay the same length. Pink ones are muscles that stretch and squeeze.
A rhythm
Each muscle squeezes to a beat. Its "genes" say how hard it squeezes and when, compared to the others.
A race
40 creatures with different genes race for 10 seconds. Whoever walks furthest (staying upright!) wins.
Babies
Winners' genes are mixed and slightly changed. Over many generations, the rhythm turns into a walk.
Adapt
Hills, ice or a heavy backpack break the old rhythm. Selection quickly finds a new one that works.
What just happened?
- The first creatures just wobbled in place, because their muscles squeezed at random times.
- Each race kept the furthest walkers, and step by step a real walk appeared, with no one designing it.
- When you changed the world, the old walk stopped working, and the family evolved a new one. That's adaptation!
For grown-ups: what's really going on
This is evolved locomotion, in the spirit of Karl Sims' Evolved Virtual Creatures (1994) and the many "evolution simulator" toys since.
- Physics: point masses integrated with Verlet integration; bones and muscles are distance constraints solved iteratively (6 passes per step). Ground contact projects nodes out of the ground and damps their tangential velocity (Coulomb-ish friction). Ice lowers that damping; headwind is a constant horizontal acceleration; the backpack makes the top node 4× heavier.
- Controller: open-loop central pattern generator: muscle i has rest length
L·(1 + aᵢ·sin(ωt + φᵢ)). The genome is one tempo ω plus (aᵢ, φᵢ) per muscle. - Genetic algorithm: population 40, elitism of 1, top 20% as parents, uniform crossover per muscle. Mutation is Gaussian with a per-child spread (early children get tiny tweaks, later ones bold changes) and an automatic boost when the champion hasn't been beaten for a few generations. Babies start with weak muscles so the climb is visible.
- Fitness shaping: fitness = forward displacement of the centre of mass after 600 steps × (1 − 1.5·time not upright − 0.6·time dragging the body). Without it, evolution happily found rolling, flipping and lying-on-its-side hopping "gaits". The simulation is deterministic, so the champion can never get worse.
- Adaptation: challenges change the environment, so the fitness landscape shifts and the elite gets re-selected. Since the controller is open-loop (it can't sense the ground), adapting requires evolution, not reflexes.