Game of Life

Four rules about living neighbours give rise to gliders, oscillators, and universal computation.

Animation of the Game of Life model running in Stigmery

Introduction

Every cell is alive or dead. A live cell with two or three live neighbours survives; a dead cell with exactly three springs to life; everything else dies or stays empty. From those four rules emerge still lifes, blinkers, travelling gliders, and patterns complex enough to compute.

Background

John Conway devised the rules in 1970 and Martin Gardner popularised them in Scientific American that October. The Game of Life became the most studied cellular automaton in history and was later proven Turing-complete: a large enough pattern can simulate any computer.

Gardner, M. (1970). Mathematical Games: The fantastic combinations of John Conway's new solitaire game "life". Scientific American, 223(4), 120-123.

How it works

  1. Count the live cells among each cell's 8 neighbours.
  2. A live cell with 2 or 3 live neighbours stays alive, otherwise it dies.
  3. A dead cell with exactly 3 live neighbours becomes alive.
  4. Apply the verdicts to every cell at once through a double buffer.

Parameters

initial_density
Fraction of cells alive at setup. Around 0.3 gives the richest mix of still lifes, blinkers, and the odd glider; too sparse fizzles out, too dense collapses to blobs.

Open this model in the editor →

Related models