Emergence 2009: Exploration and Barriers II

Emergence

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

 

Back to index of models

 

 

Download/view: BarriersQuadrants.nlogo

 

WHAT IS IT?
This is a program in which a turtle, depite barriers and limitations, visits every patch in the world.
HOW IT WORKS
The turtle moves randomly through the world. Every time the turtle encounters a patch it hasn't visited, it sets the patch either red, yellow, green or blue, depending on the quadrant it's in, until all the patches have been visited. The turtle may not turn any of the patches a different color until it has visited all of the patches in the previous quadrant. The turtle begins with Quadrant I, and then moves on the Quadrants II, III and IV in that order. The turtle may not cross the barriers, indicated by white patches.
HOW TO USE IT
Set "setup" and then "go" to run the program. To follow the turtle's movement, hit "setup" then "pen down" and then "go." The % Quadrant moniters show what percent of each quadrant has been visited already. The Quadrant Time moniters show how long it takes the turtle to visit each patch in each quadrant. The % Time moniters show what portion of the total time the turtles take to visit each quadrant's patches. The Oops monitor shows how many times the turtles land on the white barrier.
THINGS TO TRY
In Procedures, try changing the angle of the turn in order to try and make the turtles visit all the patches as fast as possible. It is currently set to turn any direction at random each iteration of the program. This way, the program takes on average ~67,000 iterations to complete. See if you can make it go faster. 

 

Models created using NetLogo.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
randomness