← All Labs
IDEA #35 · DISCRETE MATHS — AUTOMATA

Conway's Game of Life: complexity from three rules

Take a grid of cells, each one simply alive or dead. Every generation, each cell looks only at its eight neighbours and obeys a rule you could teach a child: be born with exactly three neighbours, survive on two or three, otherwise die. Nothing else. No memory, no plan, no leader. And yet from those rules crawl gliders, breed glider guns, and — in principle — a working computer. This is not a plot of Life; it is Life, running live in your browser on a typed-array grid.

01

Drive it — seed a world and let it run

Click or drag on the grid to paint living cells. Press Run to watch generations tick, or Step one frame at a time. Drop in a famous pattern from the library and watch it walk, pulse, or spew gliders forever.
DRIVE IT
generation0 · alive0 · Δ births0 / deaths0
The grid wraps like a torus — a glider that leaves the right edge re-enters on the left. Left edge of the world touches the right; top touches the bottom. Colour fades warmer the longer a cell has stayed continuously alive, so you can see which structures are stable and which churn.
SPEED (GEN / SEC)12
CELL SIZE (PX)9
DENSITY32%
A glider: the smallest thing that walks. It cycles through four shapes and moves one cell diagonally every four generations.
STILL LIFES
0
stable blocks
DENSITY
0%
of the grid
STATE
idle
of the world
Birth: a dead cell with exactly 3 live neighbours becomes alive.
Survival: a live cell with 2 or 3 neighbours stays alive.
Loneliness: fewer than 2 → dies.
Crowding: more than 3 → dies.
02

Walkthrough — what to try

Five moves that take you from "blinking dots" to "wait, that's Turing-complete?"
WALKTHROUGH
1
Drop a Blinker and press Step twice. Three cells in a row become three in a column, then back. Nothing is moving — the pattern oscillates while individual cells wink on and off. That is the whole trick of Life in miniature.
2
Clear, drop a Glider, and Run at low speed. Watch four generations: the shape reappears, shifted one cell down and one cell right. It has no engine — it is a standing wave that walks. Let it cross an edge and reappear on the far side.
3
Drop the Gosper glider gun and let it run. A fixed factory of 36 cells fires a fresh glider every 30 generations, forever. The population grows without bound from a finite seed — the first proof that Life patterns need not stay small.
4
Clear and drop the R-pentomino — just five cells. It thrashes for 1103 generations, throwing off gliders and debris, before finally settling. Five cells, over a thousand generations of drama: this is a methuselah.
5
Now Sprinkle noise at ~32% density and Run. The soup boils, then quiets into a still zoo of blocks, blinkers, and the odd escaping glider. Watch the alive counter fall and level off — order self-organising out of randomness.
03

Aha

The one sentence to leave with.
AHA
THE INSIGHT
"Alive or dead, plus a rule about counting to three" is enough to build gliders, guns, and — with enough grid — a universal computer. Complexity is not something you put in; it is something simple rules let out.
04

Explanation

Where Life comes from, why it matters, and how this page computes it.
EXPLANATION

A game with no players. The mathematician John Conway devised the Game of Life around 1970. Despite the name it is not a game you play — it is a zero-player game. You set the initial configuration and the universe evolves deterministically from there. Martin Gardner's Scientific American column popularised it, and it became one of the most-explored objects in all of recreational and theoretical mathematics.

The rules, precisely. The world is an infinite square grid. Each cell is live or dead, and has eight neighbours (the Moore neighbourhood — orthogonal and diagonal). All cells update simultaneously using the previous generation's state. A live cell with two or three live neighbours survives; a dead cell with exactly three live neighbours is born; every other cell ends up dead. In the standard shorthand this is B3/S23: Born on 3, Survives on 2 or 3.

A zoo of behaviours. From those rules three great families emerge. Still lifes (block, beehive, loaf) never change. Oscillators (blinker, toad, pulsar, pentadecathlon) cycle with a fixed period. Spaceships (glider, lightweight spaceship) translate across the grid, returning to their own shape but displaced. Then the rarities: guns that emit spaceships indefinitely, puffers that leave debris trails, and methuselahs — tiny seeds like the R-pentomino that evolve for hundreds or thousands of generations before stabilising.

Why mathematicians care. Life sits on the boundary between order and chaos where the most interesting computation lives. In 1982 Conway, Berlekamp and Guy proved Life is Turing-complete: given enough space you can wire gliders, guns and eaters into logic gates, memory, and a full universal computer. People have built working clocks, prime-number sieves, and even a self-replicating pattern inside Life. It is also a canonical example of emergence — global structure and apparent purpose arising from purely local rules with no central control.

Undecidability. Because Life is Turing-complete, questions about its long-run behaviour inherit the halting problem: there is no general algorithm that, given an arbitrary starting pattern, decides whether it eventually dies out, stabilises, or grows forever. You often have to just run it and see — which is exactly what this page lets you do.

How this page works. The grid is stored as a flat Uint8Array. Each generation a second buffer is filled by, for every cell, summing its eight wrapped neighbours and applying B3/S23, then the buffers are swapped — the classic double-buffer so that all updates see the old state at once. The torus topology comes from taking neighbour coordinates modulo the width and height. Rendering is a single Canvas 2D pass; the age-based warm tint is just a lookup on how many generations each cell has survived. No libraries, no build step — a few hundred lines of vanilla JavaScript.

05

Research note

The rule as a formula, and where to read further.
RESEARCH NOTE
The transition rule for cell state $s\in\{0,1\}$ with live-neighbour count $n$:
Equivalently, in Golly's rulestring notation, Conway's Life is
A live neighbour count is the convolution of the state grid with the ring kernel
where $\ast$ is the toroidal (cyclic) 2-D convolution used on this page.

Further reading & provenance.

• M. Gardner, "Mathematical Games: The fantastic combinations of John Conway's new solitaire game 'life'," Scientific American 223 (Oct 1970), 120–123 — the article that launched it.

• E. Berlekamp, J. Conway, R. Guy, Winning Ways for Your Mathematical Plays (1982) — contains the universal-computer construction proving Turing-completeness.

• P. Rendell, Turing Machine Universality of the Game of Life (2016) — an explicit Turing machine built inside Life.

• The LifeWiki and the Golly simulator are the standard modern references for patterns (glider gun, methuselahs, spaceships) reproduced here.

Sibling pieces in this repo: the Collatz river-delta tree and the Ulam spiral — other places where a trivial local rule breeds unreasonable structure.

Idea #35 of the visual-maths teaching series · single self-contained HTML · Canvas + Uint8Array · rule B3/S23