Cellular Automata — From Game of Life to Forest Fires

A grid. Two states. A handful of neighbourhood rules. Yet from these primitive ingredients arise snowflakes, self-replication, traffic jams, and patterns that defeated mathematicians for decades. Cellular automata are one of the most elegant ideas in all of computer science.

What is a Cellular Automaton?

A cellular automaton (CA) is a grid of cells, each in one of a small number of states (often just two: alive/dead, on/off, burning/not-burning). At each tick of the clock, every cell applies the same rule to its neighbourhood and updates its state. No cell has special status. No cell knows about the global grid.

Despite this radical simplicity, CAs can simulate almost any complex system — which led Stephen Wolfram to propose in 2002 that the universe itself might be a CA.

Conway's Game of Life

The most famous CA, invented by mathematician John Horton Conway in 1970. The grid is infinite. Each cell is either alive or dead. The rule depends on how many of the eight neighbours are alive:

Current state Live neighbours Next state
Dead Exactly 3 Born (alive)
Alive 2 or 3 Survives
Alive < 2 Dies (underpopulation)
Alive > 3 Dies (overcrowding)

From these four rules, patterns emerge that can move (gliders), oscillate (blinkers), create other patterns (guns), and even form a fully working Turing machine — a pattern that can simulate any computer program. Life is Turing-complete.

Try it: In our Cellular Automata simulator, choose "Game of Life" and draw a random patch. Hit step once, twice, five times — watch how different initial shapes have completely different fates.

Wolfram's Elementary Automata

Stephen Wolfram studied the simplest possible CAs: one-dimensional (a single row of cells), two states, neighbourhood of 3 cells. There are exactly 256 possible rules (numbered 0–255 in binary). Wolfram classified all of them into four classes:

Class I
Fixed Point
All cells quickly freeze into a uniform state. No matter the input, the CA dies. (Examples: Rule 0, Rule 255)
Class II
Periodic
Stable or repeating cycles emerge. The CA settles into a predictable oscillation. (Examples: Rule 4, Rule 108)
Class III
Chaotic
Apparently random, aperiodic. Tiny changes produce completely different outcomes. (Classic example: Rule 30 — used in Mathematica's random number generator)
Class IV
Complex
Long-lived, complex, localised patterns. The interesting zone between order and chaos. Game of Life is Class IV. (Rule 110 is Turing-complete)

CAs in the Real World

Crystal Growth

Snowflakes grow as a 2D CA on a hexagonal lattice. Water vapour deposits on existing ice — but only on cells with the right number of neighbours. The result: branching six-fold symmetry. In our Crystal Growth simulation, you can vary temperature and see dendritic branching appear and sharpen.

Forest Fire Model

Three states: empty, tree, burning. Each burning cell ignites its neighbours. Each tick, trees regrow randomly. Sparks strike randomly. The system self-organises to a critical density — always near the edge of catastrophic fire. This pattern, self-organised criticality, was discovered by studying real California fire data.

Reaction-Diffusion (Gray-Scott)

Two chemical species react and diffuse across a grid. Different parameter ratios produce spots (leopard skin), stripes (zebra), spirals (coral), and maze-like labyrinths — patterns found all over biology. Nature uses reaction-diffusion as a developmental clock to position hair follicles, fingerprint ridges, and pigment spots. Try the Reaction-Diffusion simulator and adjust the feed and kill rates.

Traffic Flow

The Nagel-Schreckenberg model is a 1D CA of cars on a highway. Each car accelerates or brakes based on its neighbours. From this, phantom jams emerge — rippling waves of stop-and-go traffic with no visible cause.

Why This Matters

Cellular automata blur the line between physics and computation. They suggest that the richness of the natural world might not require complex laws — just simple rules, applied uniformly, iterated endlessly. Every time you look at a sea shell pattern, a sand dune, or a cloud, you're looking at the output of nature's own cellular automaton.