With each iteration, NetLogo uses a "seed" number that generates a random sequence of numbers. The different outcomes are a result of using a pseudorandom number sequence which determines in what order the agents are called on to run the commands. If you run the model below several times (using the " go (non-deterministic)" button) you will notice that this in fact does not happen. If the starting conditions are the same and each agent is following the same commands, then the pattern of black and yellow patches should be identical every time the model is run. After all agents have executed this set of commands, they do it again. Essentially, an agent moves forward 1 space if the patch below is black it sets it to yellow and turns right if the patch below is yellow it sets it back to black and turns left. The agents also all follow the same set of commands. That is, the setup function places the agents at the origin and gives the headings of 0, 90, 180, and 270 degrees. The starting conditions of the model are the same every time. The model below is a variation on Langton's Ant which includes four agents. This feature of NetLogo can be used to illustrate deterministic processes as well as to mimic non-deterministic ones. For example, when a set of agents are asked to run a command, the agents must be sequentially asked because they cannot be asked simultaneously. NetLogo is designed to mimic a parallel processing system, although it is fundamentally a serial processing one. Determinism and Non-determinism in NetLogo
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |