NCSI Talks

   

Game of Life Learning Scenario (Web)


Shodor > NCSI Talks > Excel > Game of Life Learning Scenario (Web)

Learning Scenario - Game of Life (Excel)

Basic Model:

Description

This model is an implementation of Conway's Game of Life, a cellular automaton designed with extremely simple rules that produce surprisingly complex results. The user can choose the initial density of the cells in the game and whether the board is an island or a torus (see How to Use). Then the user runs the game to see the chaos that ensues. The model also includes scratch space for users who would like to create their own initial cell configurations for the game.

Background Information

Conway's Game of Life is an example of a cellular automaton where all the cell's behavior on the grid is determined by a set of simple rules. The game board represents a community of cells. Here are the rules for Conway's Game of Life:

  • If a cell has less than two neighbors, it dies of loneliness
  • If a cell has more than three neighbors, it dies of overcrowding.
  • If a cell has exactly two neighbors, it stays alive if alive.
  • If a cell has exactly three neighbors, it stays alive if alive, or is born if not alive.

Science/Math

The fundamental principle behind this model is HAVE = HAD + CHANGE. Whether a cell lives, dies, or is born depends on it's location in relation to other cells.
Every time step, the following things happen:

  1. Cells with less than two neighbors die.
  2. Cells with more than three neighbors die.
  3. Cells with exactly two neighbors stay alive.
  4. Cells with exactly three neighbors either stay alive if alive, or are born.

Teaching Strategies

An effective way of introducing this model is to initially teach it to students as a game. Use a Go board, as Conway originally did, or use a piece of graph paper and pencil. Teach students the rules and give them an initial setup for the cells. Ask them to run through several stages of the cell's life, erasing and redrawing cells on the paper as needed. Ask the following questions:

  1. What happened to the cells after 5 time steps? After 10? Draw a picture on the board.
  2. What shapes did the cells make? How many different shapes were there?
  3. In predicting the next 20 time steps, what shapes do you think the cells will make? Why?
  4. Which shapes seem to be most stable? Which are most unstable? Why? Explain.

Implementation:

How to use the Model

This simple yet complex model has a few parameters that can be manipulated to produce different results:

  1. The "FillDensity" parameter determines the percentage (from 1%-100%) of the game board that is initially filled by cells.
  2. The "Torus" parameter defines whether the game should run with the sides "wrapped" around (1: Toroidal Boundary Conditions) or if the edges should be final (0: Island Boundary Conditions).
  3. The "Start" parameter acts as a switch to change the settings for running the game:
    • 0 = Set the game board to the settings of the "Setup Level"
    • 2 = Initialize a random setup with a specified density.
    • 1 = Start the game

The aforementioned parameters are manipulated by replacing the number to the right of the parameter name with the desired number and pressing [Command] [=] on a Mac or F9 on a PC. To make new parameters take affect, always set "Start" to 0 and press these keys.

The game board has three different levels that determine what the board looks like. These levels are located directly below one another in this order.

  1. Display Level: Where the user can view the game as it runs.
  2. Compute Level: Where the values (1 for filled space, 0 for unfilled space) are calculated.
  3. Setup Level: Defines the initial settings for the game.

Below Setup Level there is Scratch Space, where the user can play around with new configurations. The user can type 1 in a box to add a cell and 0 to take away a cell. To test this configuration on the game board, copy it and paste it onto the Setup Level. Then set "Start" to 0 and press [Command][=] to implement the settings into the game.

For a complete tutorial on how to use Excel, please go to the following link:

http://shodor.org/tutorials/excel/IntroToExcel

Learning Objectives:

  1. Explore the idea of patterns in chaos.
  2. Explore the effects of the parameters on the model.

Objective 1

To accomplish this objective, have the students run the model with the default parameters. Tell them the definition of chaos: "The inherent unpredictability in the behavior of a natural system"(Merriam-Webster's Collegiate Dictionary Tenth Edition). Ask the following questions:

  1. Is the movement of the cells in this model an example of chaos? Why or why not? Explain.
  2. How many distinct patterns do you see? Draw as many on the board (or your paper) as possible. Give them names.
  3. Are there any repeated patterns? What are they and what do they look like?
  4. Pick one repeating pattern. How many steps must happen before it repeats? Why?
  5. Which patterns are more stable than others? How long can they last? Are there any patterns that can potentially last forever? Why or why not?
  6. Now that you've looked at the model more, is the movement of the cells in this model an example of chaos? Explain.

Objective 2

Have students play around with the fill density and the game border and observe the changes in the graph. Ask the following questions:

  1. Try increasing the FillDensity in the model. Make sure to change "start" to 2 and press [command][=] to set the new model conditions. How does this change the patterns in the model?
  2. How many of the original cells stay alive with the original FillDensity? What if you increase the FillDensity? Do more or less stay alive? Why do you think this is?
  3. What is the lowest FillDensity the model can have for the model to keep running and the cells to stay alive for at least 10 minutes? How did you find this out?
  4. How does changing the forest boundary from a island boundary to a torus boundary affect the model? Explain.

Extensions:

  1. Think about other possible rules that could be added to the game.
  2. Think about ways this model could be extended to represent natural phenomena.

Extension 1:

Encourage students to discuss possible changes that could be made to the rules of this game. Ask the following questions:

  1. If you could change any rules in the game, what would you change? Why?
  2. What rules would you add? Why?
  3. How do you hypothesize these changes would affect the model? Would any new patterns appear? Would any patterns disappear? Explain.
  4. In some versions of the Game of Life, the newly produced cells are shown in a different color to represent their age. Can you think of any ways this model could be made easier to read? How could you make the patterns more distinct? Explain.
  5. Why would someone want to make any of these changes? Does this model have use in the scientific world? Explain.

Extension 2

Have students consider the ways in which this model could be extended to represent natural phenomena. Ask the following questions:

  1. Do the cells in this model have any similarities to species in the wild? What species and why?
  2. Do the patterns in this model interact with one another? Do any have special relationships? Are any of these relationships comparable to any relationships in the real world? These can be relationships between animals, plants, other natural phenomena, or machines. Explain.
  3. Think of the names you gave the patterns you saw. What do the cells in that pattern have in common with the object named?
  4. How could this model be changed to represent one or more natural phenomena? These changes can be done by changing the initial setup of the cells or by changing the rules of the game. What aspects of that phenomenon would the model be representing? Could this be useful in research? Explain.

Related models

Game of Life

http://www.shodor.org/interactivate/activities/LifeLite/

This is a Game of Life applet within the online curriculum, Interactivate. Students should discuss the similarities and differences between the two models.

Fire

http://www.shodor.org/interactivate/activities/Fire/

This is a model of a forest fire where the user can vary the probability of the fire spreading from tree to tree. Students should discuss how the chaotic behavior in this model relates to the behavior in the Game of Life model.

Psuedo Random Numbers

http://www.shodor.org/talks/ncsi/excel/index.html

This model represents one simple way to generate random-seeming numbers between 0 and 1. Students should discuss how random numbers are useful in modeling chaotic behavior.