From 2D to 3D

How Conway's Game of Life works, why its rule cannot simply be reused in three dimensions, and which 3D rules come closest to it.

1The 2D game

John Conway's Game of Life was published in Martin Gardner's Mathematical Games column in 1970. It is played on a grid of square cells, each alive or dead. Every generation, all cells update at once, and each one looks only at its eight neighbours:

That is written B3/S23: born on 3, survives on 2 or 3. Click cells to draw, then run it. Hover a cell to see its count.

Hover a cell to see its neighbours.

The app has a 2D mode too, with the classic patterns and one extra: a time stack, which piles the past generations up under the board, so a glider leaves a staircase and an oscillator a braided column.

Open the glider gun in 2D, as a time stack →

2One more dimension

In 3D the cells are cubes and the world is a box of them. A cube touches 26 others: the 8 around it in its own layer, exactly as in 2D, plus 9 in the layer above and 9 in the layer below. So a count can now run from 0 to 26 instead of 0 to 8.

above · 9
own layer · 8
below · 9
9 + 8 + 9 = 26 neighbours. Of those, 6 share a face with the cell, 12 an edge and 8 only a corner.

3Conway's rule in 3D

The obvious first try is to keep B3/S23. Put a glider on one layer of a 3D world and it does the right thing in its own layer for one generation. But a dead cell directly above the glider counts the 3×3 patch beneath it, and wherever that patch holds 3 live cells, a cell is born. The glider leaks into the layers above and below, and they leak further:

Five layers from the middle of a 15×15×15 world that wraps at its edges, rule B3/S23. Five cells become hundreds within a dozen generations.

The rule was tuned for 8 neighbours. With 26, a count of 3 is far too easy to reach, so births happen everywhere. A 3D rule needs larger numbers.

Open this in 3D →

4Searching for a 3D Life

In 1987 Carter Bays went looking for 3D rules that behave the way Conway's does. He asked two things of a rule "worthy of the name":

  1. A glider exists, and it turns up on its own when you start from random soup.
  2. Random soup never grows without limit: it always settles down.

With ranges for birth and survival there are 123,201 rules of this kind, but two simple arguments rule out most of them. If birth needs 10 or more neighbours, nothing can move: a cell next to a flat face has at most 9 live neighbours, so a shape can never grow off its surface. If birth happens at 4 or fewer, even a small square of cells grows forever. Between those limits, only two rules passed both tests.

Bays' name In this app Born on Survives on Character
Conway (2D) B3/S2-3 3 2–3 the original, 8 neighbours
Life 4555 B5/S4-5 5 4–5 Conway's numbers plus 2; its own 10-cell glider; many small symmetric shapes
Life 5766 B6/S5-7 6 5–7 settles faster; the closest to Conway, as the next section shows

Bays writes a rule as four numbers: lowest and highest survival count, then lowest and highest birth count. Conway's rule is 2333.

Life 4555 from random soup → Life 5766 from random soup →

5Conway's game inside 3D

Bays found that Life 5766 contains Conway's game. Copy every cell of a 2D pattern onto the next layer, so the pattern is two identical layers thick. A live cell that had n neighbours in 2D now has 2n + 1: its n neighbours twice, plus its twin. A dead cell has 2n.

2D count n 0 1 2 3 4 5
live cell: 2n + 1 1 3 5 7 9 11
dead cell: 2n 0 2 4 6 8 10

Highlighted: the counts at which B6/S5-7 keeps a live cell or gives birth to a dead one.

Under B6/S5-7, born on 6 means exactly n = 3, and surviving on 5 or 7 means n = 2 or 3. That is B3/S23, so the two layers play Conway's game exactly:

A glider copied onto two layers, rule B6/S5-7. The two middle layers glide; the ones either side stay empty.

There is a catch. A cell in the layer beside the pair sees one copy of the pattern: the 2D count of the cell next to it, plus that cell itself. If a dead cell in the 2D pattern ever has 6 neighbours, or a live one has 5, that count reaches 6 and a cell is born outside the two layers; from then on the pattern is truly 3D. The glider, blinker, block, beehive and toad never do this. The lightweight spaceship and the R-pentomino break within two generations, and Conway's glider gun cannot be copied either.

Open the two-layer glider in 3D → Draw your own in 2D, then Open in 3D →

63D Life's own glider

Life 4555 keeps almost nothing of Conway's game: Bays showed that no Conway pattern that changes from one generation to the next survives being copied into it. What it has instead is a glider of its own, found early in his search and the reason he studied the rule closely. It has 10 cells and a period of 4. Every 4 generations it has moved one cell along two axes at once, a diagonal step, and it can travel in any of 12 such directions.

The glider cut into four slices across its direction of travel, rule B5/S4-5. It is mirror-symmetric, so the outer slices match, as do the inner two. Every 4 generations it is back in its first shape, one cell further right and down.

It is rare. In the ten random-soup runs Bays tallied, a glider turned up once, so you will seldom see one emerge on its own; start from the pattern instead.

Open the 4555 glider in 3D →

7What this app adds

Open the rule settings →

8And four dimensions?

The same idea works in 4D. A cell there has 34 − 1 = 80 neighbours: 26 in its own 3D slice and 27 in each slice on either side. A rule is still a birth set and a survive set, now over 0 to 80.

We cannot see a 4D world whole, so we look at it the way a flat creature would see a ball passing through its plane: as a circle that grows and shrinks. The app shows a 4D world as a row of 3D slices, and a 4D ball as spheres that grow and shrink from one slice to the next.

We searched about 110,000 rules of Bays' form with tens of millions of random starts. None behaves like Life: in almost every rule random starts either explode, die out, or freeze. Ships do exist. A handful are truly four-dimensional, using all four axes. Most move one cell per generation, the fastest anything can go (the "speed of light"), and one moves at half that (B8/S4-7). Gliders from 2D and 3D still work when you make them two cells thick in the missing directions. What is missing is a rule with both: starts that stay alive without growing forever, and gliders that arise from them. The 4D Game of Life has more on the search, the ships it found and how to see them.

B13/S2-15, a random start in a 16⁴ world
A random start under B13/S2-15 grows into a round 4D ball. Each box is one slice; the spheres in them are the ball's cross-sections.

Open the half-speed ship in 4D → More on the 4D Game of Life →

Further reading