Conway's Game of Life
Conway's game of life is a simple and probably the best known example of a cellular automaton. It was invented by John Horton Conway in 1970 and fascinates through the extraordinary beautiful complexity of shapes which are generated by a set of very simple rules. The term game might be somewhat misleading. The player defines an initial state and, once started, the system evolves without further interaction.
The rules are simple: A rectangular grid is made up of cells which are either dead or alive. The grid runs through cycles which are termed generations. The state of a cell in the next generation is determined by the current state of the eight neighbours of the cell. If a dead cell has exactly three alive neighbours it will come alive, otherwise it remains dead. If a live cell has less than three or more than four neighbours it will die, otherwise it will stay alive.
For more information about Conway's Game of Life see the article on Wikipedia
Below is a JavaScript implementation of the game. To play, just toggle the state of some cells
by clicking on them. You can also start with some default shapes by clicking on one of the buttons below.
When done, click Start to watch how the system evolves.
Have fun!