Page 81 - ExtendSim User Guide
P. 81

Simulation Concepts 55
Other modeling approaches
way's Game of Life. The block's dialog has fields for specifying initial settings and rules; the dialog items have been cloned to the model worksheet for convenience.
Life model
The concept for this model is that each cell of the grid is defined as living or empty. On each generation, a given cell can give birth to a new life, survive, die, or remain empty. Using the default settings in the Life block, the model adheres to the following rules:
• Countthenumberofneighborsagivencellhas(themaximumpossibleis8).
• If an empty cell has 3 neighbors, it will produce a new life (birth).
• If a full cell has less then 1 or zero (loneliness), or 4 or more neighbors (overcrowding), it will die.
Changing the default rule values causes some interesting affects on the population.
There are two ways to set the starting population for the model:
• Defineaninitialnumberofcells(1000isareasonablestartingpopulationforthesizeofthis block.) The cells will be populated randomly.
• Use the Custom Start grid to select up to 16 initially populated cells in specific locations. This is a quick way to begin with a recognized pattern, such as a glider or a blinker.
One feature of the Life block that is not specified in Conway's algorithm is that the color of the cells varies with the age of the cell - new cells are green and older cells vary from light gray to black as they age.
V ariations
The Life block is open source so you have complete access to the dialog editor and block code. To see the underlying structure of the block, select it on the model worksheet and give the command Develop > Open Block Structure. The procedures that define cell birth, death, or survival are listed at the top of the block's structure window.
☞ The Life model is located in the folder \Examples\Agent Based. The Life block is located in the Custom Blocks library.

   79   80   81   82   83