Click a rule or use your arrow keys to change which rule is in effect. Use the +/- above or Ctrl +/- to zoom in and out. Light gray rules are noteworthy.
Elementary Cellular Automata
Cellular automata are simple models of computation that often demonstrate complex emergent behavior. This behavior can be used to model many types of phenomena in the physical world. Elementary cellular automata, studied extensively by Stephen Wolfram in the 1980s and catalogued in his book A New Kind of Science (2002), are the simplest class of one-dimensional cellular automata.
How It Works
The first generation of every elementary cellular automaton is the same: a single alive (black) cell with an infinite number of dead (white) cells on either side.
The state of each cell in subsequent generations is based on three values: the state of its left neighbor, its own state, and the state of its right neighbor in the previous generation. Because each of those states has two possible values (dead or alive), there are 2^3 = 8 possible input combinations:
- Alive-alive-alive
- Alive-alive-dead
- Alive-dead-alive
- Alive-dead-dead
- Dead-alive-alive
- Dead-alive-dead
- Dead-dead-alive
- Dead-dead-dead
The rules determine how each of these combinations affects the state of a cell in the next generation. For each of the 8 combinations, we can say the result is alive or dead. That gives us 2^8 = 256 possible rules.
Rule Numbering
Each rule is identified by a number from 0 to 255. The number, when converted to an 8-bit binary representation, specifies the output for each of the 8 input combinations. The bits map to the combinations in order: the leftmost bit gives the result for alive-alive-alive (combination 1), the next bit for alive-alive-dead (combination 2), and so on, down to the rightmost bit for dead-dead-dead (combination 8).
For example, Rule 30 in binary is 00011110. Reading left to right: alive-alive-alive → dead, alive-alive-dead → dead, alive-dead-alive → dead, alive-dead-dead → alive, dead-alive-alive → alive, dead-alive-dead → alive, dead-dead-alive → alive, dead-dead-dead → dead. The rule number is the lookup table, packed into a single integer.
Noteworthy Rules
The rules highlighted in light gray in the panel above produce particularly interesting behavior:
- Rule 30 produces chaotic, seemingly random patterns from a single cell. Wolfram used the center column of Rule 30 as a random number generator in Mathematica. It appears in nature, too: the pattern on the shell of the textile cone snail (Conus textile) closely resembles Rule 30 output.
- Rule 90 generates the Sierpinski triangle, a well-known fractal. It is equivalent to computing the XOR of a cell's two neighbors.
- Rule 110 is especially significant because it has been proven to be Turing complete, meaning it can simulate any computation. Matthew Cook published this proof in 2004, building on conjectures by Wolfram. This makes Rule 110 one of the simplest known systems capable of universal computation.
- Rule 184 models basic traffic flow. It conserves the number of live cells and can simulate particles moving in one direction with simple collision rules.
Why It Matters
Elementary cellular automata demonstrate that extreme complexity can emerge from extremely simple rules. A single bit of initial state and a one-byte rule are enough to produce patterns that range from uniform and repetitive to apparently random. Wolfram classified the 256 rules into four behavioral classes:
- Class 1. Evolution leads to a uniform state (e.g., Rule 0, Rule 255).
- Class 2. Evolution leads to simple periodic structures (e.g., Rule 4, Rule 108).
- Class 3. Evolution leads to chaotic, apparently random patterns (e.g., Rule 30, Rule 90).
- Class 4. Evolution leads to complex structures that may include localized propagating patterns (e.g., Rule 110, Rule 54).
The boundary between order and randomness in these simple systems connects to deep questions in mathematics and computer science about the nature of computation, the limits of predictability, and the origins of complexity in the physical world.