Labs / Elementary

Elementary cellular automata

One row of cells. Each looks at itself and its two neighbours. Eight possible neighbourhoods, one output bit each - so exactly 256 rules exist, and every one of them is on this page.

How to read it

The top row is the starting configuration; each row below it is the next generation. Time runs downwards, so the whole history of the automaton is a single image. The eight boxes in the panel are the rule itself - each shows one possible neighbourhood and the cell it produces. Click any of them to flip that output and you will land on a different rule number.

The rule number is simply those eight output bits read as a binary number, with the leftmost neighbourhood (111) as the most significant bit. That is Wolfram's numbering, and it is why Rule 30 and Rule 110 have the names they do.

The four classes

Wolfram sorted all 256 rules into four behavioural classes, and the classification turns out to apply to cellular automata generally - including Conway's Life, which is class IV.

ClassBehaviourTry
IEverything collapses to a uniform state0, 32, 160, 255
IISettles into stable or repeating structures4, 108, 94, 250
IIIChaotic and statistically random30, 45, 90, 150
IVLocalised structures that interact - the class that can compute110, 54, 137

The ones worth knowing

Rule 30
From a single live cell, produces a triangle whose left side is regular and whose right side is indistinguishable from noise. Wolfram used its centre column as Mathematica's random number generator for years. The shell of the sea snail Conus textile carries a strikingly similar pattern.
Rule 90
Exactly the Sierpiński triangle. Each cell is the XOR of its two neighbours, which makes the whole thing equivalent to Pascal's triangle modulo 2.
Rule 110
The one that matters. It supports a periodic background, several distinct gliders travelling at different speeds, and controllable collisions between them. Matthew Cook proved in 2004 that it is capable of universal computation - the simplest system known to be Turing complete.
Rule 184
A genuine traffic model. Cells are cars, and the rule reproduces the transition from free flow to a jam, including phantom jams that propagate backwards through the traffic.
Rule 150
XOR of all three cells in the neighbourhood - a nested, self-similar fractal that is easier to analyse algebraically than most.

Try Rule 110 from a random starting row rather than a single cell: the gliders only become obvious once there is enough going on for them to collide.