The rules are as follows:
- a cell is black if it is alive and white if it is dead
- if a live cell has 2 or 3 neighbors it will remain alive in the next generation
- if a live cell has more than 3 or fewer than 2 neighbors it will die after this generation
- if a dead cell is dead and it has 3 neighbors it will come alive next generation
- otherwise the cell will remain dead