l Cellular Automata

Cellular Automata
The Game of Life

Reset The Game of Life

One of the most interesting uses of compute today is modelling natural processes, eventally creating artifical intelligence This is a celluar Automaton invented by John Conway's "Game of Life". While the Game of Life has become something of a computational cliché, it is still important to build it from scratch as its core principles are tied directly to a core goal—simulating the natural world with code. The basic idea is to start with a simple configuration of counters (organisms), one to a cell, then observe how it changes as you apply Conway's "genetic laws" for births, deaths, and survivals. Conway chose his rules carefully, after a long period of experimentation, to meet three criteria:

  1. There should be no initial pattern for which there is a simple proof that the population can grow without limit.

  2. There should be initial patterns that apparently do grow without limit.

  3. There should be simple initial patterns that grow and change for a considerable period of time before coming to end in three possible ways: fading away completely (from overcrowding or becoming too sparse), settling into a stable configuration that remains unchanged thereafter, or entering an oscillating phase in which they repeat an endless cycle of two or more periods.


In brief, the rules should be such as to make the behavior of the population unpredictable.
Conways genetic laws are delightfully simple. First note that each cell of the checkerboard (assumed to be an infinite plane) has eight neighboring cells, four adjacent orthogonally, four adjacent diagonally. The rules are:

  1. Survivals. Every counter with two or three neighboring counters survives for the next generation.

  2. Deaths. Each counter with four or more neighbors dies (is removed) from overpopulation. Every counter with one neighbor or none dies from isolation.

  3. Births. Each empty cell adjacent to exactly three neighbors--no more, no fewer--is a birth cell. A counter is placed on it at the next move.


It is important to understand that all births and deaths occur simultaneously. Together they constitute a single generation or, as we shall call it, a "move" in the complete "life history" of the initial configuration. Conway recommends the following procedure for making the moves:

  1. Start with a pattern consisting of black counters.

  2. Locate all counters that will die. Identify them by putting a black counter on top of each.

  3. Locate all vacant cells where births will occur. Put a white counter on each birth cell.

  4. After the pattern has been checked and double-checked to make sure no mistakes have been made, remove all the dead counters (piles of two) and replace all newborn white organisms with black counters.