Cellular Automata Lab
Simple rules on a grid can produce chaotic waves, self-replicating crystals, avalanches of every size and universal computers. This guide covers the six families in this simulator: how their rules work and why they behave as they do.
The six families
Pick one to read how it works, then launch it. Each rule also has its own page.
Conway's Game of Life and its relatives
How the rule works
Every cell is either alive or dead. It counts how many of the eight cells touching it are alive; that single number decides what it becomes next. All cells update simultaneously, using the state of the grid before the step.
B<birth counts> / S<survival counts>
Conway's rule is B3/S23: a dead cell with exactly three live neighbours comes alive, and a live cell with
two or three neighbours stays alive. Everything else ends up dead. Changing those
two lists gives you the other 262,143 rules in the family.
Why this one rule got famous
Conway settled on B3/S23 in 1969 because it was the only variant he tried that did neither of the two boring things: die out immediately, or fill the plane. That balance makes room for gliders (shapes that travel), oscillators (shapes that repeat in place) and, eventually, logic gates built out of colliding gliders. Life is Turing complete: in principle it can compute anything a computer can.
- HighLife (
B36/S23): one extra birth condition, and a twelve-cell pattern that copies itself every twelve steps. - Seeds (
B2/S): nothing survives its own turn, so everything on screen is a chain reaction. - Life Without Death (
B3/S012345678): cells are born normally and never die, growing a permanent maze.
Brian's Brain and the Generations family
What the rest period does
A Generations rule adds cooling states between “firing” and “ready”. A cell that stops firing cannot fire again straight away; it has to work its way back through them first.
ready → firing → cooling … → ready
That single constraint means activity cannot spread backwards into the region it just came from. Every wave travels in one direction, and two waves meeting head-on annihilate, because each runs into the other's cooling trail.
Reading the notation
Generations rules are written B…/S…/n, where n is the total number of states including ready and
firing. Brian's Brain is B2/S/3: born on
two firing neighbours, an empty survival set, three states.
Star Wars (B2/S345/4) adds a survival condition, so
dense regions of firing cells hold their state and form long standing beams
alongside the moving packets. Only firing cells count towards neighbour totals;
cooling cells are invisible to the rule but still occupy space.
Cyclic rules and spiral waves
Rock-paper-scissors, extended
There is no “alive” here. Each cell holds a number from 0 to N−1, and each number is beaten by exactly the next one in the sequence. A cell in state k changes to k+1 as soon as enough of its neighbours are already in state k+1. After N−1 comes 0 again, so no state is ever safe.
next = (k + 1) mod N if count(neighbours in state k+1) ≥ threshold
Three numbers define a cyclic rule: how many states there are, how many neighbours are needed to trigger a change (the threshold), and how far the neighbourhood reaches (the range).
How order appears from noise
David Griffeath introduced these rules in the 1980s and studied them in detail with Robert Fisch and Janko Gravner. Starting from random noise, the grid goes through recognisable stages: local patches synchronise, defects form where several states meet in the wrong order, defects start rotating, and the fastest-rotating spirals take over the rest.
One parameter can change the outcome completely. Raising the threshold from 1 to 2 stops spirals forming, and you get churn instead. Try the two side by side.
The Abelian sandpile
Toppling
Each square holds a number of grains rather than a state. A square holding four or more is unstable: it gives away four grains, one to each of its four edge-sharing neighbours. That can tip a neighbour over the threshold, and so on.
if h(x,y) ≥ 4: h(x,y) −= 4, and each of the 4 orthogonal neighbours gains 1
It is called abelian because the order does not matter: if several squares are unstable, toppling them in any order gives exactly the same final configuration. Deepak Dhar proved in 1990 that the reachable stable configurations form a finite abelian group: add two of them grain by grain, let the result settle, and you get another, whichever you add first.
Self-organised criticality
Per Bak, Chao Tang and Kurt Wiesenfeld introduced the model in 1987 to make a point: some systems settle at a critical state by themselves, with no parameter tuned to put them there. Add one grain to a settled pile and usually nothing happens; occasionally a large part of the grid collapses.
That framing has been influential and also disputed. The two-dimensional sandpile’s own avalanche statistics are more complicated than a single clean power law (one straight line on a log–log plot), and the model's lasting contribution is the mechanism rather than the fit to earthquake or solar-flare data.
This rule always uses open edges, where grains fall off the grid. If they could not leave, the pile would never finish settling.
Langton's ant and other turmites
The whole rule
Christopher Langton described the ant in 1986. There are two instructions:
- On a white square: turn 90° right, colour it black, step forward.
- On a black square: turn 90° left, colour it white, step forward.
Longer rules are written as turn strings: RL is
Langton's ant, and LLRR is a four-colour ant with one instruction
per colour. The string decides the behaviour far more than the number of colours does.
Three phases, and one open problem
- Steps 0–500: small, visibly symmetric shapes.
- Steps 500–10,000: an irregular patch with no discernible structure.
- From about step 10,000: a 104-step cycle that shifts the ant two squares diagonally each time, building a straight road that never ends.
Nothing triggers the change: the ant is running the same two instructions throughout. Whether every finite starting configuration eventually produces a highway is an open problem. What has been proved is weaker: the ant's path cannot stay inside a bounded region forever.
Elementary cellular automata
Where the numbers come from
Each cell looks at three cells on the previous row: itself and its two neighbours. There are 2³ = 8 possible combinations, and each can be assigned an output of 0 or 1 independently, so there are 2⁸ = 256 rules in total.
The rule number is those eight outputs read as a binary number. Rule 30 is 00011110; Rule 110 is 01101110. Wolfram introduced this numbering in 1983
so that all 256 could be surveyed systematically instead of cherry-picked.
The four classes
- Class 1: everything converges to a single uniform state.
- Class 2 (e.g. Rule 184): settles into repeating or nested structures. Rule 184 is the traffic rule, and it conserves its live cells exactly.
- Class 3 (e.g. Rule 30, Rule 90): no long-range order. Rule 90 is an odd case: it is chaotic from a random start but draws an exact Sierpiński triangle from a single cell.
- Class 4 (e.g. Rule 110): localised structures drifting against a repeating background. Rule 110 is the only elementary rule with a published universality proof, due to Matthew Cook.
Loading interactive view…
Controls
| Action | Key | Where | What it does |
|---|---|---|---|
| Play / pause | Space | Bottom dock | Starts and stops the simulation. |
| Single step | . | Bottom dock | Advances one step. Use it when something interesting is about to happen. |
| Draw | 1 | Pencil | Paint cells on the canvas. Multi-state rules add a colour picker beside it. |
| Erase | 2 | Eraser | Clears cells under the brush. Removes ants in the turmite rules. |
| Stamp a pattern | 3 | Stamp icon | Places a known pattern with a live preview. Life-like and Generations rules only. |
| Grid lines | G | Grid icon | Shows cell boundaries. Needs a cell scale of 3px or more. |
| Randomise | R | Soup | Fills the grid at random. For the sandpile it drops several piles instead; for turmites it randomises the paint and leaves the ants alone. |
| Clear | C | Trash icon | Empties the grid. Turmite ants are kept where they are. |
| Speed, scale, boundaries | — | Settings (sliders icon) | Steps per second, pixels per cell, brush size, and whether the grid edges wrap or act as walls. |
Common questions
What is a cellular automaton?
A grid of cells, each holding a state: alive or dead, a colour, or a count. At every tick, all the cells work out their next state at the same moment from their neighbours’ states. Nothing coordinates them from above; every pattern on the canvas comes from those local exchanges.
Are turmites cellular automata?
Strictly, no. Turmites (like Langton’s ant) are Turing machines on a two-dimensional tape: a single active head moves over a passive grid of colours, rather than every cell updating simultaneously. They are included because their history and behaviour (order → chaos → highway) are usually studied alongside cellular automata.
What makes Conway’s Game of Life so famous?
John Conway tested dozens of candidate rules in 1969 to find one where populations neither died out immediately nor exploded to fill the plane. That narrow balance lets structures collide, bounce, shoot gliders and act as logic gates, which makes Life Turing complete: in principle it can compute anything a computer can.
Why does Rule 110 matter?
Rule 110 is one of the simplest systems known to be Turing-complete. Matthew Cook proved in the 1990s, in a paper published in 2004, that its colliding gliders can simulate a cyclic tag system, a stripped-down universal computer. So a one-dimensional rule whose whole definition fits in eight bits can compute anything a modern computer can.
Can I design my own rules?
Yes. Use the Try any rule explorer below to type custom birth/survival counts (e.g. B35/S236) or enter any 1D rule number from 0 to 255. You can also paste patterns in the standard RLE (run-length encoded) format into the Presets window in the top bar.
