Simulation of Conway's Game of Life

by Dominic Ford


The Game of Life is a mathematical simulation which was devised by John Horton Conway in 1970.

Like other cellular automata, it follows a very simple set of rules, but these produce complex emergent behavior.

It consists of a 2D grid of squares which can be colored either black or white. The black cells are considered to be "alive", while the white cells are considered to be "dead".

At each time step, all the cells reevaluate their state according to the following rules:

  • Any live cell with fewer than two live neighbors dies (underpopulation).
  • Any live cell with two or three live neighbors continues to live.
  • Any live cell with more than three live neighbors dies (overpopulation).
  • Any dead cell with exactly three live neighbors becomes a live cell (reproduction).

Using the controls above, click the play button to start the simulation. You can use the speed control to adjust how quickly it moves. At any time, you can click on a square to flip its color. Alternatively, use the scrollwheel, or a pinch gesture on a touchscreen device, to zoom the simulation in or out.