Build a Gosper Glider Gun Step by Step in Your Browser

A hands-on, cell-by-cell guide to building the Gosper glider gun — the pattern that won a $50 bet and proved Conway's Game of Life could grow forever — in our interactive simulator.

angen.ai
August 1, 2026
8 min read
how to
cellular automata
guns
glider
history
tutorial

Build a Gosper Glider Gun Step by Step in Your Browser

John Conway made a bet in 1970. He'd noticed that every pattern he'd tried in his new cellular automaton either died out, settled into a stable shape, or looped forever at a fixed size — nothing grew without bound. So he conjectured that no pattern could, and offered $50 to whoever proved him wrong.

Bill Gosper and his colleagues at the MIT AI Lab took the bet. Within the year they'd found a 36-cell pattern that does something no smaller configuration was known to do: it sits in one place and fires out a new glider every 30 generations, forever. A pattern that grows without bound, built from a pattern that never stops shrinking — the gun's own body stays fixed size while gliders it can't hold onto stream off to infinity. Conway paid up.

That pattern — the Gosper glider gun — is still the first thing most people building a Game of Life implementation try to reproduce, because doing it by hand is the fastest way to actually understand what "still life," "oscillator," and "spaceship" mean at the same time — the three building blocks our beginner's guide walks through individually. This guide walks through placing all 36 cells yourself in our simulator, rather than just loading a preset. It's also the pattern that kicked off an entire category — infinite growth patterns that build on guns to do far stranger things than fire gliders.

What you're about to build

The gun fits inside a 36×9 rectangle — 36 cells wide, 9 tall, and (coincidentally) 36 cells live in total. Here's the exact layout, verified directly against the same cell data our pattern library serves in production (# = live cell, . = dead, row 0 at the top):

   0         1         2         3
   012345678901234567890123456789012345
 0 ........................#...........
 1 ......................#.#...........
 2 ............##......##............##
 3 ...........#...#....##............##
 4 ##........#.....#...##..............
 5 ##........#...#.##....#.#...........
 6 ..........#.....#.......#...........
 7 ...........#...#....................
 8 ............##......................

A few things worth noticing before you start clicking:

  • There are three 2×2 blocks — the simplest possible still life — at columns 0–1/rows 4–5, columns 20–21/rows 2–3, and columns 34–35/rows 2–3. Blocks don't do anything on their own; they just sit there. In this design they anchor the moving machinery around them so it doesn't drift or collide with its own debris.
  • The left cluster (columns 0–17) and the right cluster (columns 20–35) are not mirror copies of each other. It's tempting to assume the gun is just two identical oscillators pointed at each other — we checked this directly against our own pattern data by testing every rotation and reflection, and the two halves don't match under any symmetry. The 36-cell gun is a genuinely asymmetric, compact design, not two off-the-shelf parts glued together.
  • It held the record for smallest known gun for 45 years. We checked every gun pattern in our own library for cell count: nothing beats Gosper's 36 cells, and only one pattern even ties it — the Simkin glider gun, found by Michael Simkin in 2015. Same cell count, completely different shape and a period of 120 instead of 30. Our survey of Game of Life guns covers the wider family if you want more of that history.

Step 1: Open a blank board

Go to the simulator and click Clear board if there's anything on the canvas already. You want to start from zero.

Left-click anywhere on the canvas to toggle a cell alive; left-click again to kill it. Shift-click or right-click lets you pan around without placing cells — useful once you're zoomed in and need to reach a spot in the pattern that's scrolled off-screen. Zoom in enough that you can place cells precisely; at the default zoom, misclicking by one grid square is easy and will change the pattern's behavior.

Step 2: Place the left anchor block

Pick any starting point on the canvas and call it column 0, row 0 in your head — you'll place everything relative to that point. First, the small 2×2 block that anchors the left side:

  • (0, 4), (1, 4), (0, 5), (1, 5)

Four clicks. This one will never move once the pattern starts running — it's a pure still life, doing nothing but holding its ground.

Step 3: Place the left machinery

This is the busiest part of the pattern — 16 cells arranged around columns 10–17, rows 2–8:

  • (12, 2), (13, 2)
  • (11, 3), (15, 3)
  • (10, 4), (16, 4)
  • (10, 5), (14, 5), (16, 5), (17, 5)
  • (10, 6), (16, 6)
  • (11, 7), (15, 7)
  • (12, 8), (13, 8)

Sixteen clicks, and take it slow — this is the part where an off-by-one error is easiest to make and hardest to spot by eye afterward. If you want a sanity check, count: you should have 20 live cells total on the board so far (4 from the block, 16 from this cluster).

Step 4: Place the middle block

A second 2×2 still life, this one doing double duty as part of the pattern's right-hand engine:

  • (20, 2), (21, 2), (20, 3), (21, 3)

Step 5: Place the right machinery

The remaining cells, spread from column 20 to column 35:

  • (24, 0)
  • (22, 1), (24, 1)
  • (20, 4), (21, 4)
  • (22, 5), (24, 5)
  • (24, 6)

Step 6: Place the right anchor block

The mirror of step 2, but on the other end:

  • (34, 2), (35, 2), (34, 3), (35, 3)

You should now have exactly 36 live cells on the board. If your count is off, that's worth fixing before you press play — a single misplaced cell anywhere in the machinery (not the anchor blocks) is enough to make the whole thing die out or degrade into something else within a few generations, instead of settling into its period-30 cycle.

Step 7: Run it, one generation at a time

Don't hit play yet. Click Next generation — the step button, not play/pause — and watch one generation happen at a time for the first 10 or so ticks. You'll see the two clusters flex like they're breathing, throwing off small sparks that mostly reabsorb into the machinery. This is worth watching slowly at least once, because it's the only way to actually see the mechanism rather than just the output.

Once you've got a feel for it, hit Play and let it run continuously. We tested this exact 36-cell configuration directly — stepping it generation by generation and tracking population — and confirmed it locks into an exact period-30 cycle: the pattern's own footprint returns to an identical population count every 30 generations, precisely, for as long as you let it run. Somewhere in that cycle, a glider detaches and drifts diagonally down and to the right, away from the pattern, out into open space, never to return — we tracked one across 70 generations to confirm the direction rather than guess from the shape. Every 30 generations, another one follows it.

If you'd rather confirm your build against the reference implementation than trust your own cell count, load the pattern library version side by side and compare.

What to try next

A few directions worth poking at once the gun is running:

  • Watch it long enough to count gliders. At 30 generations per glider, even a few minutes of runtime produces a visible stream you can count against the simulation's generation counter.
  • Try breaking it. Toggle a single cell in the machinery (not the anchor blocks) mid-run and watch how far the damage spreads before the pattern either recovers or collapses. This is a fast, hands-on way to build intuition for which parts of a pattern are load-bearing.
  • Explore the family it belongs to. Related oscillators like the queen bee shuttle and cleanup patterns like eaters are separate, simpler patterns in their own right, and understanding them individually makes gun mechanics less mysterious in general — though as noted above, they're not literally the two halves of this particular 36-cell design. Our guns survey covers the wider family, including guns discovered decades after Gosper's with entirely different periods and firing patterns.
  • See what an AI agent makes of it. If you'd rather generate and evolve patterns programmatically than click them in by hand, our MCP server exposes the same simulation engine as a set of tools an LLM can call directly — including one that runs a pattern forward N generations and checks a prediction against the actual result, which is a good way to see whether an AI system actually understands what you just built by hand.

Gosper's gun answered one specific question — can something grow forever — and the answer turned out to be a fixed-size machine that never stops making the thing it can't keep. Fifty-six years later, it's still the cleanest way to watch that idea happen one cell at a time.