Conway's Game of Life
The Game of Life playing field.
The Game of Life introduced by British mathematician John H. Conway in 1970, is really a simulation, not a game with players. It takes place on an unbounded (or bounded, as in this applet) rectangular grid in which each cell can either be occupied by an organism or not. Occupied cells are alive, unoccupied cells are dead. Which cells are alive changes from generation to generation according to the number of neighboring cells that are alive, as defined by the transition rules below.
Game definitions and transition rules are taken from Robert L. Kruse and Alexander J. Ryba's Data Structures and Program Design in C++, Prentice-Hall, Inc., 1999, pp. 5, 33.
- The neighbors of a given cell are the eight cells that touch it vertically, horizontally, or diagonally.
- If a cell is alive but either has no neighboring cells alive or only one alive, then in the next generation the cell dies of loneliness.
- If a cell is alive and has four or more neighboring cells also alive, then in the next generation the cell dies of overcrowding.
- A living cell with either two or three living neighbors remains alive in the next generation.
- If a cell is dead, then in the next generation it will become alive if it has exactly three neighboring cells, no more or fewer, that are already alive. All other dead cells remain dead in the next generation.
- All births and deaths take place at exactly the same time, so that dying cells can help to give birth to another, but cannot prevent the death of others by reducing overcrowding, nor can cells being born either preserve or kill cells in the previous generation.