Cellular Automata · Lesson 09

Life Lab: The Game of Life

Four rules on a grid of squares are enough to produce gliders, guns, chaos, and a working computer. In this lesson you learn the rules by hand, predict what happens next, collect a zoo of patterns, and then write rules of your own.

Simulation Studio

Click or drag to draw cells, then press Start. Or pick a stamp in the side panel and click to place it.

Generation: 0

Live Cells: 0

Oldest Cell: 0

Population Δ: 0

Beginner: 20 x 20, slower pace for first-time learners.

Tip: Click or drag on the grid to toggle cells before pressing Start.

newborn cells glow blue cells older than 50 generations turn gold, so still lifes stand out.

Part 1

Where Life Came From

A question about self-copying machines turned into a game played on graph paper.

Black and white ID photo of John von Neumann
John von Neumann, 1940s He wanted to know whether a machine could build a copy of itself. With Stanislaw Ulam he designed a grid world with 29 cell states in which a self-copying pattern could exist. That grid was the first cellular automaton. Photo: Los Alamos National Laboratory, via Wikimedia Commons (LANL photo, attribution).

1940s: Ulam and von Neumann

Von Neumann's grid had 29 states per cell and a rulebook hundreds of pages long. It proved self-copying was possible, but it was far too complicated to play with.

1970: John Conway simplifies it

Mathematician John Horton Conway spent about 18 months at Cambridge testing rules on a Go board. He wanted the simplest rule that was still unpredictable. Patterns should not all die, and they should not all explode. He settled on just two states (alive or dead) and one rule about neighbors.

October 1970: Martin Gardner shares it

Gardner described the game in his "Mathematical Games" column in Scientific American. Readers all over the world started running it by hand and on early computers. Conway offered a $50 prize to anyone who could prove a pattern could grow forever. Bill Gosper's team at MIT won it within weeks with the glider gun.

John Horton Conway smiling, 2005
John Horton Conway (1937–2020) He invented the Game of Life in 1970. He later said he got a little tired of being known for it, because he did much deeper mathematics. Life still became one of the most studied systems in computer science. Photo: Thane Plambeck, CC BY 2.0, via Wikimedia Commons.
Discuss:

Von Neumann needed 29 states and Conway needed 2. Why would a scientist want the simplest rule that still does something interesting?

Part 2

The Four Rules

Every cell looks only at its eight touching neighbors, called its Moore neighborhood.

0–1LonelinessA live cell with fewer than 2 live neighbors dies.
2–3SurvivalA live cell with 2 or 3 live neighbors stays alive.
4–8CrowdingA live cell with more than 3 live neighbors dies.
3BirthA dead cell with exactly 3 live neighbors comes alive.

Scientists write this rule in a short code: B3/S23, which means born on 3, survive on 2 or 3. This rule notation is how you will write your own rules in Part 6.

The key detail: every cell updates at the same moment. You count all the neighbors on the old grid, then draw the whole new grid. One full update is one generation.

Rule Explorer

Click the outer squares to add or remove neighbors. Click the center to switch it between alive and dead. Predict the result before you read it.

Live neighbors: 0

Do this now:

Use the explorer to fill in a table: for a live center, which neighbor counts from 0 to 8 keep it alive? For a dead center, which counts give birth? Your table should match B3/S23.

Part 3

Predict the Next Generation

Work it out by hand, like people did in 1970. Then check your answer.

Now (generation 0)

Your prediction (generation 1): click cells

correct should be alive (missed) should be dead (extra)

Strategy tip:

Do not move cells around in your head. Go square by square: count the live neighbors on the old grid, then apply the rule. Remember to check the empty squares next to the pattern, since that is where births happen.

Part 4

The Pattern Zoo

Life players sort patterns by how they behave over time. Click a picture to enlarge it, or press "Run it" to watch it in the studio.

Still lifes: never change

Every live cell has 2 or 3 neighbors, and no empty cell has exactly 3. The grid is frozen.

Block: a 2 by 2 square
Block Each cell has exactly 3 neighbors, so all survive. The most common still life.
Beehive: a six-cell hexagon
Beehive Six cells in a hexagon. The empty middle has only 2 neighbors in each column, so nothing is born inside.
Loaf: a seven-cell still life
Loaf Seven cells. A beehive with one corner pushed in.
Boat: a five-cell still life
Boat Five cells. It looks like it should move, but it is frozen.

Oscillators: repeat in place

They cycle through shapes and come back to the start. The number of generations in one cycle is the period.

Blinker: three cells flipping between vertical and horizontal
Blinker, period 2 The end cells die of loneliness and two new cells are born on the sides, so the line flips.
Toad: two offset rows of three
Toad, period 2 Two offset rows of three that seem to breathe in and out.
Beacon: two blocks touching at a corner
Beacon, period 2 Two blocks touching at the corner. The two inner cells blink on and off.
Pulsar: three frames of a large symmetric oscillator
Pulsar, period 3 48 cells with four-way mirror symmetry. The symmetry is kept every generation, because the rule treats all directions the same.
Pentadecathlon starting shape
Pentadecathlon, period 15 A long cycle. Count the generations to check the period.

Spaceships: travel

They come back to their starting shape, but in a new place. In Life, nothing can move faster than one cell per generation. Players call that speed c, "the speed of light."

Five frames of a glider moving one cell diagonally
Glider, speed c/4 Compare gen 0 and gen 4: same shape, moved one square down and one square right. It is only five cells, but it can carry information across the grid.
Four frames of the lightweight spaceship
Lightweight spaceship (LWSS), speed c/2 It moves sideways 2 cells every 4 generations, twice as fast as a glider.

Guns: make spaceships forever

Animation of the Gosper glider gun firing a stream of gliders
Gosper glider gun, period 30 Two shuttles bounce back and forth, and every 30 generations their collision releases a new glider. This won Conway's $50 prize, because its population grows forever. Animation: Lucas Vieira, CC BY-SA 3.0, via Wikimedia Commons.
Do this now:

Run the pentadecathlon and press Step until it looks exactly like the start again. Write down the period you measured. Then do the same for the glider: after how many steps is it the same shape again, and how far did it move?

Part 5

Methuselahs and Chaos

Small starts can have huge, unpredictable futures.

A methuselah is a tiny pattern that keeps churning for a very long time before it settles down. There is no shortcut for predicting what it will do. The only way to find out is to run it step by step. That is one of the deepest ideas in Life.

R-pentomino: five cells
R-pentomino (5 cells) On an unlimited grid it takes 1,103 generations to settle, and it throws off 6 gliders along the way.
Acorn: seven cells
Acorn (7 cells) Grows to 633 cells and takes 5,206 generations to settle on an unlimited grid.
Diehard: seven cells
Diehard (7 cells) The opposite surprise: it churns and then completely disappears at generation 130.
Why won't the studio match those numbers?

The famous numbers come from an unlimited grid. The studio's advanced grid is 60 × 60 and wraps around, so gliders fly off one edge and come back on the other, where they crash into the debris. A model's boundary changes its results. Scientists have to think about this whenever they simulate something inside a limited box.

Experiment:

Run diehard and watch the Live Cells counter. Does it die at generation 130 here too? Then run the R-pentomino and write down the generation where it settles. Why is your number different from 1,103?

Part 6

Change the Rules

B3/S23 is just one of 262,144 possible "Life-like" rules. Try a few others.

Each rule is a choice of which neighbor counts (0–8) give birth and which let a cell survive. Two lists of 9 yes/no choices give 218 = 262,144 rules. Most of them are boring: everything dies or everything fills in. Conway picked B3/S23 because it sits on the edge between the two.

B3/S23Life. Balanced. Gliders, guns, and long chaos.
B36/S23HighLife. Like Life, plus birth on 6. It has a famous pattern that copies itself.
B2/SSeeds. Every live cell dies immediately, yet the pattern explodes.
B3/S12345Maze. Grows long corridors like a maze.
B3678/S34678Day & Night. Live and dead act the same: flip every cell and the rule still works.
B1/S1Gnarl. One live cell becomes a growing fractal-like crystal.

To type your own, open the side panel, set Rule Set to Custom, and enter a code like B35/S236.

Design challenge:

Find a custom rule where a random soup neither dies out nor fills the whole grid within 200 generations. Write down your rule code and describe what you see.

Part 7

Why It Matters

A toy on a grid turned into a tool for thinking about computers, biology, and AI.

Emergence

The rules never mention gliders, guns, or movement. Those things appear anyway. When large-scale behavior comes out of simple local rules, it is called emergence. Ant colonies, bird flocks, and traffic jams work the same way.

Life is a computer

In 1982 Conway and others showed that Life is Turing complete. Streams of gliders act like signals, and glider collisions act like logic gates (AND, OR, NOT). With enough space, Life can run any program. People have since built a working clock, a prime-number generator, and even Life running inside Life.

You can't skip ahead

Because Life can compute anything, there is no general shortcut for predicting its future. For some patterns, the only way to know if they ever stop is to run them. This is the same limit Alan Turing found for computer programs (the halting problem).

Modeling the real world

Scientists use cellular automata to model forest fires, the spread of disease, traffic, crystal growth, and the patterns on seashells. Each model chooses what a cell stands for, which states it can have, and a local rule.

AI that learns the rule

In 2020, researchers trained "neural cellular automata." Instead of a person writing the rule, a small neural network learns it. Starting from one cell, the grid grows into a picture, such as a lizard, and can repair itself when part is erased, a little like a living thing healing.

Part 8

Project Paths

Pick one path and turn what you learned into something you can hand in.

Path A: Pattern Zoo Field Guide

  • Find or build 8 patterns in the studio. At least one must be something you discovered by drawing or by using Random.
  • Sort each one: still life, oscillator (give the period), spaceship (give its speed), or other.
  • Artifact: a field-guide page with a screenshot and one sentence per pattern.

Path B: Rule Scientist

  • Choose three rule codes, including one you invented.
  • Run each from the same R-pentomino for 200 generations. Record the population every 25 generations.
  • Artifact: a data table, a line graph, and a paragraph comparing the rules.

Path C: Model the World

  • Pick a real system: forest fire, disease spread, or traffic.
  • Define what a cell is, what states it can have, what counts as a neighbor, and the update rule.
  • Artifact: rule sheet, hand-drawn 3-generation example, and a paragraph on where your model is wrong.

Completion Rubric

  • Filled in the B3/S23 table using the Rule Explorer.
  • Solved at least 5 prediction puzzles.
  • Measured the period of one oscillator and the speed of one spaceship.
  • Explained why the studio's methuselah numbers differ from the famous ones.
  • Finished one project path.

Bonus: find a pattern that is not in this lesson and look it up on LifeWiki to learn its name.

Quick Check

Answer each question, then read the explanation.