Cellular Automata
A cellular automaton is a grid of cells, and every cell has a state, such as alive or dead. At each tick all cells change at the same moment, by one fixed rule that looks only at the cell and its neighbors. The rules fit on one line. The results do not: gliders, chaos, triangles, and even working computers. This page runs five classics. Pick an automaton and watch it run. Click or drag on the grid to draw cells, or choose Erase. In Wireworld, draw a wire and click it to send an electron. Rule 30 and Rule 110 add one row per generation, from the top down.
How it works
- Open this page. A glider gun in the Game of Life fires a new glider every 30 generations.
- Pick another automaton: Rule 30, Rule 110, Brian's Brain, or a Wireworld circuit. Type a Life rule such as B36/S23, or any rule number from 0 to 255.
- Draw or erase cells on the grid, change the speed and colors, then save a PNG.
Four parts, one rule
Every cellular automaton is built from the same four parts. The grid is the space the cells live in: a line, a plane like a chessboard, or a 3D space. The states are what a cell can be, in the simplest case black or white, 1 or 0. The neighborhood is the set of cells that affect a cell, on a square grid usually the eight cells around it (the Moore neighborhood) or only north, east, south, and west (the von Neumann neighborhood). The rule is the brain of the automaton: it gives each cell its next state from its own state and its neighbors.
Five classic automata
In Conway's Game of Life (B3/S23) a living cell survives with 2 or 3 living neighbors, and a dead cell comes alive with exactly 3. Rule 30 and Rule 110 are one-dimensional: each cell looks at itself and its two neighbors, and every generation adds a row below the last. Rule 30 looks random, and Rule 110 can compute anything a computer can. Brian's Brain has three states, off, firing, and refractory, and grows restless waves. Wireworld has four, empty, electron head, electron tail, and conductor, and lets you build circuits.
From easy to hard
The Game of Life and Rule 30 are the easiest to follow: one rule, two states, and a picture that explains itself. Brian's Brain adds a third state that keeps every pulse moving forward. Wireworld rewards building: wires, clocks, diodes, and logic gates. Rule 110 is the hardest to read, because its moving structures only show up against a repeating background. That background is what makes it universal.
Frequently asked questions
What is a cellular automaton?
A grid of cells, each in one of a few states. At every tick all cells update at once by the same rule, which looks only at a cell and its neighbors. Simple rules can still make complex, unpredictable patterns.
What are the rules of Conway's Game of Life?
B3/S23. A dead cell with exactly 3 living neighbors is born. A living cell with 2 or 3 living neighbors survives. Every other cell is dead in the next generation.
Why is Rule 30 famous?
From a single black cell it grows a triangle whose middle column looks random, although every step is fixed. Stephen Wolfram used that column as a random number generator.
What does it mean that Rule 110 is universal?
Matthew Cook proved that Rule 110 can carry out any computation a general-purpose computer can, given a suitable first row. It is one of the simplest rules known to do so.
How do Brian's Brain and Wireworld work?
In Brian's Brain an off cell fires when exactly 2 neighbors fire, a firing cell turns refractory, and a refractory cell turns off. In Wireworld an electron head becomes a tail, a tail becomes wire, and wire becomes a head when 1 or 2 neighbors are heads.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Go to Editor