If any live cell has
- fewer than 2 live neighbors then the cell dies (under-population)
- 2 or 3 live neighbors then the cell lives
- more than 3 live neighbors then the cell dies (overcrowding)
If any dead cell has
- exactly three live neighbors then the cell becomes a live cell (reproduction)
Note: Neighbors are considered also diagonal cells (one cell has 8 neighbors)