The grid lab

Patches that persist.

The grid below runs Conway's Game of Life, a cellular automaton. A field of cells changes in steps, and each cell looks only at its eight neighbors. The whole field follows the same four rules.

The four rules

  1. A live cell with fewer than two live neighbors dies, as if cut off.
  2. A live cell with two or three live neighbors lives on.
  3. A live cell with more than three live neighbors dies, as if crowded out.
  4. A dead cell with exactly three live neighbors comes alive.

The numbers two and three come from the definition of the game. They are not ecological measurements. We use the game to think about one idea: a patch of something holds together when its neighbors support it, and it fades when it is crowded or cut off.

Reference frames

A glider is a small pattern that moves across the field. These four frames show one part of its cycle. They are drawn without any script, so they stay readable on every device.

Generation 0
Generation 1
Generation 2
Generation 3

Run the grid

The live grid needs JavaScript. The reference frames above show the same pattern without it, and the rules above describe every change the grid makes.

Your browser cannot show the live grid. The reference frames above show the same pattern.

Generation 0, 5 live cells.

4 generations per second

What to try

  • Load the glider and step through it one generation at a time. The same five cells rearrange as it moves, and after four generations they return to their first shape, shifted one cell diagonally.
  • Load the blinker. It alternates between a row and a column, and it never leaves its place.
  • Fill the field at random, then clear it. Random fields often thin out into still shapes and repeating ones.

Use the lab to slow down a process you usually see only at its end. Then return to the reading guide and ask the same question of a material: what surrounds it, and what would make it fade?