Evolution
A terminal-style genetic algorithm lab: evolve pixel sprites, the words aldus nexus or walking creatures from noise.
Draw a target
Drag to paint. Pick void to rub out. The drawing is kept in this browser.
The numbers
How it works
A genetic algorithm keeps a population of guesses and never looks at the answer directly. Each sprite genome is 256 hex digits, one per pixel, each naming one of nine colours. Fitness is simply the share of pixels that already match the target.
Every generation, selection picks parents, fitter ones more often. Tournament picks three at random and keeps the best; roulette spins a wheel weighted by fitness. Crossover splices two parents into a child, mutation changes a few digits at random, and elitism copies the best few across untouched so progress is never lost.
Weasel mode is Richard Dawkins's 1986 thought experiment with a nexus twist: random letters climb to "aldus nexus" far faster than blind chance ever could. God mode hands selection to you: switch to it mid-run to take the wheel from the machine, or start from pure noise with a new batch.
Walkers mode evolves bodies instead of pictures. A genome of 50 bytes builds a creature of 3 to 6 nodes, every pair joined by a spring. Some springs are bones; the rest are muscles whose rest length swings on a sine with its own evolved phase and size, all at one evolved beat. Each node has its own grip on the ground, and a creature only moves forward if its feet slip one way and hold the other.
Every creature is dropped on flat ground and run through a hand-written physics loop, 120 fixed steps a second: add up the spring forces, add gravity, move each node, then stop anything that sinks into the ground and let friction push back on its sideways speed. Fitness is simply how far its centre moved to the right in the time you set. The same selection, crossover, mutation and elitism controls then breed the next generation, and the best walker of each one is replayed in neon with its trail.
Nothing in the loop knows what a frog looks like. Blind copying plus a slight preference for better is enough to build one.
Speedrun records
Fewest evaluations (population × generations) to a perfect match, per character. Par is 25,000.