Serendip is an independent site partnering with faculty at multiple colleges and universities around the world. Happy exploring!

Emergence 2009: Exploration and Barriers VIII

Emergence

Biology 361 = Computer Science 361
Bryn Mawr College, Spring 2009

 

Back to index of models

 

 

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

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.
2 + 8 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.