For the purposes of mathematically modeling the rules to the

Game of Life (which would be useful if, for example, you want to program your own version of the game), I humbly present the following:

Given that the game is played out on a two-dimensional grid, let **f**(x,y) be the function describing the state of the grid point (x,y).

If **f**(x,y) = 1, then the point is alive. If **f**(x,y) = 0, then the point is dead.

Let **N**(x,y) be the number of neighbors of (x,y) that are alive. In other words:

**N**(x,y) = **f**(x-1,y-1) + **f**(x-1,y) + **f**(x-1, y+1) + **f**(x, y+1) + **f**(x+1, y+1) + **f**(x+1, y) + **f**(x+1, y-1) + **f**(x, y-1)

The function **f'**(x,y), which describes whether (x,y) will be dead or alive on the next turn, can be defined as:

{ 0 if **N**(x,y) < 2
**f'**(x,y) = { **f**(x,y) if **N**(x,y) = 2
{ 1 if **N**(x,y) = 3
{ 0 if **N**(x,y) > 3