The Cabinet of Curios

Conway's Game of Life

Put stones on a board. Each turn, every stone counts the stones around it. With too few it dies alone, with too many it's crowded out, and an empty point with exactly three stones around it gets a new stone. From four rules like these come blinkers, gliders that crawl across the board, and guns that fire them forever.

Tap a point to place or take away a stone. Every board also works from the keyboard: Tab to it, move with the arrow keys (Shift moves further), and press Space to place or take away a stone. In whichever station you're using, N steps forward and B steps back, and on the big board P plays and pauses.

Station 1

Eight neighbors, four rules

Every point on the board has eight neighbors: the points above, below, beside it, and on the four diagonals. A stone is a living cell. Each step, every point counts its living neighbors and follows one of the rules beside the board, and every point changes at the same moment. Turn on the counts, tap any point to see which rule it follows, and press Step.

  1. A living cell with fewer than 2 living neighbors dies, as if lonely.
  2. A living cell with 2 or 3 living neighbors stays alive.
  3. A living cell with more than 3 living neighbors dies, as if crowded.
  4. An empty point with exactly 3 living neighbors gets a new stone.
  5. Every other empty point stays empty.
Try

Station 2

Count the neighbors, not the board

You could store the whole board and check every point on it, empty or not. This page keeps only a list of the living cells, as row and column pairs, and works out the next step from that list in three moves. Each living cell names its eight neighbors. Count how often each point was named. Keep the points named 3 times, and the living ones named 2 times. A point's count is exactly its number of living neighbors, because only living cells do the naming. Press Next to watch it happen one move at a time. Station 3 lines the same step up in eight languages, and Station 4 runs it on a much bigger board.

  1. The living
  2. Name neighbors
  3. Count
  4. Keep
  5. Next generation
Start from


      

Station 3

One idea, eight languages

Here is Station 2's step written eight ways. Each one takes a set of living cells and makes the same three moves: name the neighbors, count them, keep the 3s and the living 2s. None of them loops over the board, checks for edges, or keeps a second board to write into. Pick a part of the step to light it up in all eight at once, or use the same buttons beside any language without scrolling back up. Each language gets a note on how it does that part.

Highlight

Compare: a whole-board version

Store every point as a 0 or a 1 and the step has to visit every one of them, empty or not, and check each neighbor against the edges so the counting doesn't run off the board. It still returns a new board, so it's just as pure. It also needs a board size chosen up front, and a glider that reaches the edge stops being a glider.


    

Station 4

Gliders, guns, and long lives

Same rules, same step function, on a board big enough to watch patterns travel. Pick a pattern and press Play, or drag across the board to draw your own. A few cells can keep busy for thousands of generations. The board is only a window: cells that drift past its edge keep living, and zooming out shows them again.

Speed
Zoom

Things to notice

A little history

Sources