packages = ["numpy"] [[fetch]] files = ["./game_of_life.py", "./patterns.py"]

Conway's Game of Life

delay ms
generations generations
   
generations population

About

The Game of Life unfolds on an infinite (or, in this case, toroidal), two-dimensional grid of square cells, each either alive (black) or dead (white).
Each cell interacts with its eight adjacent neighbors.


To play, either click/drag on the grid to create a pattern or choose one from the dropdown menu. Then, press 'go' to see the pattern evolve based on three rules:


  • Birth: A dead cell with exactly three live neighbors becomes alive.
  • Death: A live cell with zero or one neighbor dies from isolation; with four or more, it dies from overcrowding.
  • Survival: A live cell with two or three neighbors stays alive.

All cells undergo these changes simultaneously in each "generation."
The game's allure lies in discovering patterns that evolve in interesting ways, a pursuit that has captivated enthusiasts for over half a century.
While there are thousands of interesting patterns, we have some notable ones in this version:

  • R-pentomino: All patterns made up of up to five live cells die out or become stable after ten generations.
    But the R-pentomino is active for more than a thousand!
  • Gosper Glider Gun: After creating the Game of Life, John Conway offered a $50 prize to anyone who could prove or disprove that an object in the Life universe could grow infinitely large.
    MIT professor Bill Gosper captured that prize in late 1970 when he invented the Glider Gun.
  • Glider: The game's smallest, most common, and first-discovered spaceship —a pattern that returns to its starting state after a set number of generations
    (known as its period) but in a new location.
  • Lightweight Spaceship (LWSS): Discovered by John Conway in 1970, this is the smallest orthogonal spaceship and the second most common after the glider.
  • Blinker, Toad, Beacon, Pulsar: These are oscillators, patterns that repeat themselves after a certain number of generations.
  • Die-hard: A 7-cell methuselah, this pattern takes a long time to stabilize and grows significantly from its initial configuration during its evolution.