Page 80 - ExtendSim User Guide
P. 80

54 Simulation Concepts
Other modeling approaches
• Message sending functions can use the results of inter-block communications to send mes- sages globally to unconnected blocks or blocks that are connected in specific ways.
• Animation functions provide a visual indication of block-to-block interaction, such as the influence of one block on another.
For example, in constructing an agent-based model of the robotic clean up of a chemical spill, you could use the inter-block communication functions in a “Controller” block to locate all of the “Robotic Clean Up” blocks in the model. The Controller could send messages to the robots asking them to move towards a spill and clean it up. The robots could send messages back to the Controller stating whether they were available or were currently being recharged, and whether they were too far from a chemical spill or close enough to be useful. The scripting and animation functions would show the robot blocks physically moving around within the model and the spill being removed.
The Game of Life
The Game of Life was devised by British mathematician John Conway in 1970 and published as an article in Scientific American. It is the most well known example of cellular automata (CA), a type of modeling studied in computability theory, mathematics, theoretical biology, and other fields.
A CA model represents a regular grid of finite state automata (cells) that sit in positional rela- tionships to one another, with each cell exchanging information with the eight other cells to which it is horizontally, vertically or diagonally adjacent. A cell can be in one of a finite num- ber of states and the state of a cell at time t is a function of the states of its neighboring cells at time t-1. Every cell has the same rule for updating; each time the rules are applied to the whole grid a new generation of cells is produced.
You interact with the Game of Life by specifying an initial configuration of effects and observ- ing how the CA universe evolves. At each step in time, the following happens:
• Acellisbornifithasaspecifiednumberofneighborswhoactasparents.
• “Loneliness” causes any live cell with fewer than a specified number of neighbors to die.
• “Overcrowding” causes any live cell with more than a specified number of neighbors to die.
The initial pattern constitutes the first generation of the system. The second generation is cre- ated by applying the above rules simultaneously to every cell in the first generation. In other words, births and deaths happen simultaneously. The rules continue to be applied repeatedly to create further generations.
Life has a number of recognized patterns that emerge from particular starting positions, includ- ing static patterns (“still lifes” such as block and boat), repeating patterns (“oscillators” such as blinker and toad), and patterns that translate themselves across the board (“spaceships” such as gliders).
The Life model
The one-block Life model was created using the Life block (Custom Blocks library) that was specifically developed for this model. The code of the block contains the algorithm for Con-

   78   79   80   81   82