Game of Life
The Game of Life is a cellular automaton constructed by mathematician John Conway and popularized by Martin Gardner. The game starts with an infinite lattice of squares. Any cell is either has a bacterium (or is alive) or does not have a bacterium (is dead) and only a finite number start alive. The 8 surrounding squares of each cell make up its neighbors. At each iteration of the game the states of cells change based on the following rules:
- Any living cell with one or no neighbors becomes too lonely and dies.
- Any living cell with four or more neighbors becomes overcrowded and dies.
- Any living cell with two or three neighbors stays alive.
- Any dead cell that has exactly three neighbors becomes alive.
Each round (or generation) of the game occurs simultaneously. That is, each of the four rules is applied to each square at the same time.