The Game of Life

The Game of Life (an example of a cellular automaton) is usually played on an infinite two-dimensional rectangular grid of cells. In this implementation the sides are joined together to simulate a torus (doughnut) in 2D (you can see what it would look like in 3D here). Each cell can be either alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

  1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Select cells in the grid by clicking on them or unselect by clicking them again. When you have an initial population of cells, click run to see what happens. Try to create periodic, static, and chaotic behavior.

Source: Conway's Game of Life

Creative Commons License site content is licensed under a Creative Commons Attribution 4.0 International License