Select Page

# Conway’s Game of Life

The Game of Life is a canonical Cell Matrix model and often the first agent based model that is discussed in computer science classes. This is because the programming is relatively simple, using just a few basic rules to define the entire model. Each tile is defined to be either “alive” or “dead.” This is done in the “cell” submodel with the use of a simple 1 for alive, and 0 for dead. The rules of the game of life are as follow:

• If you have 1 or less living neighbors, you die or remain dead (loneliness)
• If you have 2 living neighbors, you remain dead or remain alive (persist)
• If you have 3 living neighbors, either come to life if you are dead, or stay alive, if you are already alive
• If you have 4 or more living neighbors, you die or remain dead (overcrowding)

Each tile has a total of 8 neighbors (except for the boundary tiles). The initial condition is automated to be an interesting configuration in which a lot of richness comes out over a long period of time. The way the cells actually work is by having a cell count the number of “alive” neighbors around it (using the “neighbors” method) and then changing it’s state depending on the number of alive neighbors. This is done by sending either a 1 or a 0 throw a flow and into a stock which is set to be a discrete value, meaning its value is reset every turn. You also have the ability to click on tiles before the run, and change their state in order to change you initial conditions. This is done with the “setter” function in the cell matrix.

Nova Online: Conway’s Game of Life (opens in new tab)

Running this model:
1. Click on the “Capture” button in the tool bar.
2. Click “Load” next to “Capture.”
3. Click “Exec” to run the model through multiple iterations. Click “Stop” to stop the graph.
4. To run the model step by step, click “Capture,” “Load,” “Init,” then “Step.”