Life is a mathematical “game” invented by mathematician, John Conway. It became widely popular after it was published in a column in Scientific American in 1970. It is one of the most commonly programmed games on the computer.
Life is an example of a cellular automaton, a system in which rules are applied to cells and their neighbors in a regular grid. Life is played on a rectangular grid of square cells. Each of these cells are either dead or alive. Here are the rules for Life:
Each cell has eight (8) neighbors.
Once started, the state of a cell depends on its current state and the state of its neighbors. If a dead cell has exactly three (3) live neighbors, it becomes alive. This is a birth.
If a dead cell does not have exactly three (3) live neighbors, it remains dead.
If a live cell has two (2) or three (3) live neighbors, it remains alive. This is survival.
If a live cell has zero (0) or one (1) live neighbors, it dies. This is loneliness.
If a live cell has four (4) or more live neighbors, it dies. This is overcrowding.
These rules are applied to all of the cells at one time. That is, the new state of each cell is determined before changing the state of any of the cells.