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

Reply to comment

Emergence 2009: Exploration and Barriers V

Emergence

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

 

Back to index of models

 

 

Download/view: RandomFill.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 and the world resets and continues to run. 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.
Make multiple turtles with individual toxic colors, make turtles change patch colors to other turtles' toxic colors and see what happens.
NETLOGO FEATURES
This model uses the startup procedure, which runs automatically when the model is opened. It also uses some mouse-related primitives to allow user input (drawings), and the stamp primitive to leave a record of a turtle at a specific spot.

 

Models created using NetLogo.

Reply

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