Math 326, November 13 -
Game of Life
Every mathematician's favorite, John Conway's Game of Life.
In the Game of Life, we start with a rectangular grid where every cell
is designated as either alive (1) or dead (0). Based on a set of
rules, we proceed to the next generation.
- A live cell with 2 or 3 living neighbors stays alive.
- A dead cell with exactly 3 living neighbors becomes alive.
- Otherwise, the cell becomes (or stays) dead.
Start with a 30x30 grid. We make three versions of our
grid. The first contains the current generation. The second
shows the number of living neighbors for each cell. The third
shows what the next generation will be.
To update, we copy the values from the third grid into the first
grid. Make a macro to automate this process. Use
conditional cell formatting to make the evolution easier to see.
Additional Questions
- Make a macro to wipe the grid clean, making it quicker to try new
starting shapes.
- Try starting with the following shapes (images from Math.com):

- Create a scrollbar which adjusts density d, with d between 0 and
1. Make a macro which fill the grid randomly with living and dead
cells. Each cell should be set to alive if RAND()<d. See
how long it takes for the population to settle into a stable situation.
- Visit this page to view a nice Life applet, along with a catalogue
of cool patterns.