Elementary cellular automata — the 256 rules
An elementary cellular automaton (ECA) consists of a 1D row of binary cells. At each time step every cell is updated simultaneously using the same rule applied to the cell and its two neighbours. Since there are 2³ = 8 possible neighbourhood configurations and 2 possible outputs each, there are exactly 2⁸ = 256 distinct rules. This "Wolfram code" numbering scheme (1983) gives each rule a unique integer 0-255; rules are drawn by evolving from a single-cell seed with time flowing downward, producing the automaton's "spacetime diagram."
Rule 30: 30 = 00011110₂ neighbourhood: 111 110 101 100 011 010 001 000 output: 0 0 0 1 1 1 1 0
Wolfram's four complexity classes
Wolfram classified all 256 elementary rules into four qualitative classes by long-term behaviour. Class I — Uniformity: all cells collapse to a single fixed state regardless of initial condition (Rules 0, 8, 32). Class II — Periodic/Stable: cells settle into simple periodic or stable patterns (Rules 4, 19, 50). Class III — Chaotic: aperiodic, seemingly random patterns, sensitive to initial conditions (Rule 30, 45, 73). Class IV — Complex: long-lived, non-periodic, localised structures that interact in complex ways, associated with computation and universality (Rules 54, 106, 110). Class IV behaviour, at the boundary between order and chaos, is the "edge of chaos" that the hypothesis proposes life and cognition also operate at.
Notable rules: 30, 90, 110
Rule 30 produces a chaotic, irregular pattern from a single live cell; its centre column is statistically random enough that Wolfram used it as the built-in pseudorandom generator in Mathematica. Rule 90 (XOR of the left and right neighbours, ignoring the centre) produces the Sierpiński triangle — row n is exactly Pascal's triangle reduced modulo 2. Rule 110 was proved by Matthew Cook in 2004 to be Turing complete: a rule described by a single byte can simulate any Turing machine, making it the simplest known universal computational system.
Two dimensions: Conway's Game of Life
In 2D CA, cells sit on a grid with a Von Neumann neighbourhood (4 orthogonal neighbours, used in reaction-diffusion) or a Moore neighbourhood (all 8 surrounding cells). Introduced by John Conway in 1970, the Game of Life is a 2D binary totalistic CA with Moore neighbourhood following B3/S23: a dead cell is born with exactly 3 live neighbours, and a live cell survives with 2 or 3. From these three rules an extraordinary menagerie emerges — still lifes like the block, oscillators like the blinker and pulsar, spaceships like the glider, and glider guns that emit spaceships forever. A glider gun plus logic gates suffices to simulate any computation, making Life itself Turing complete.
Applications in science and art
Alan Turing's 1952 reaction-diffusion model produces animal coat patterns — leopard spots, zebra stripes — via a CA-like mechanism of diffusing, reacting activator and inhibitor chemicals. The Nagel-Schreckenberg model is a 1D CA that reproduces traffic jams without central control, emerging purely from local acceleration, braking and random dawdling rules. Artists and game developers use CA to generate organic textures — Rule 30 for randomness, birth-3/survival-2-3 smoothing for cave and dungeon generation, and diffusion-limited aggregation for crystal growth.
Frequently asked questions
How many elementary cellular automaton rules are there?
There are exactly 256. An elementary automaton has a binary state and a 3-cell neighbourhood (left, centre, right), giving 2³ = 8 possible neighbourhood configurations, each of which must map to one of 2 possible outputs — so there are 2⁸ = 256 distinct rules, numbered 0 through 255 by Wolfram's binary-encoding scheme from 1983.
What are Wolfram's four complexity classes?
Class I rules collapse any initial condition to a single fixed uniform state. Class II rules settle into simple periodic or stable patterns. Class III rules produce aperiodic, chaotic-looking patterns sensitive to initial conditions. Class IV rules produce long-lived, non-periodic, localised structures that interact in complex ways and are associated with computational universality — the "edge of chaos" between order and randomness.
Is Conway's Game of Life a cellular automaton?
Yes — it's a 2D binary totalistic cellular automaton with a Moore neighbourhood (the 8 surrounding cells) following the B3/S23 rule: a dead cell is born with exactly 3 live neighbours, and a live cell survives with 2 or 3 live neighbours. From these three rules an extraordinary menagerie emerges, including still lifes, oscillators, gliders, and glider guns, and the system as a whole is Turing complete.
Try it live
Everything above runs in your browser — open 1D Cellular Automata — Wolfram and enter any rule from 0-255, or jump to presets like Rule 30, 90 and 110, to watch chaos, Sierpiński triangles and universal computation unfold. Nothing is installed, nothing is uploaded.
▶ Open 1D Cellular Automata simulation