Serendip is an independent site partnering with faculty at multiple colleges and universities around the world. Happy exploring!
Emergence 2009: Exploration and Barriers VIII
Biology 361 = Computer Science 361
Bryn Mawr College, Spring 2009
Download/view: RandomFillOscillate.nlogo
HOW TO USE IT |
SETUP and GO buttons are standard.
When AUTO-RESET is on, every time the turtle has visited every patch, the number of ticks required to fill every patch is stored. Then the color that patches are changed to when they have been visited reverses and the model continues to run. Thus, the world oscillates between all green and all black. This is an easy way to complete numerous runs to get an average filltime. The RUN# monitor keeps track of how many runs have been completes
When LIMIT-HEADINGS is on, the turtle randomly chooses between the 4 cardinal headings at each tick, rather than any heading between 0 and 360.
When FD-RANDOM is on, the turtle takes a random number of steps at each tick.
The STEPS slider controls how many steps the turtle takes at each tick if FD-RANDOM is off.
The PERCENT VISITED plot and monitor keep track of the percentage of patches the turtle has visited within each run.
The AVERAGE FILLTIME plot and monitor keep a running average of how long the turtle takes to visit all patches in each run. |
THINGS TO TRY |
Change settings to see how they adjust the average filltime. Use SETUP when you change settings so that the average filltime will not be affected by previous runs with different settings. See what settings give the lowest average filltime. |
NETLOGO FEATURES |
This model makes use of lists to keep a record of filltime values. The list is used to keep a running average of filltime with the MEAN primitive. It also uses the ONE-OF primitive, which gives a random item from a list. |
RELATED MODELS |
This model is identical to my 'RadnomFill' model except that instead of re-setting the world to all black when every patch has been visited, the 'visited' color simply switches back and forth between black and green. |
Models created using NetLogo.
Comments
Post new comment