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

Emergence 2009: Exploration and Barriers X

Emergence

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

 

Back to index of models

 

 

Download/view: exploringbarriers.nlogo

 

WHAT IS IT?
This model shows two different ways that a turtle can randomly cover all patches and measures the time it takes for the turtle to do this. When barriers are added, the model shows how the path of the turtle is affected for the two different types of random motion and depicts how the turtle avoids the barriers.
HOW IT WORKS
The first type of random motion involves the turtle coloring its current patch yellow, setting its heading to a random number between 0 and 360, moving forward 1 and repeating this until all patches are covered. The second type of random motion involves the turtle following the first type of motion except that when it notices that the patch ahead of it is already colored yellow it sets its heading to the current heading plus 180 and goes forward 2 steps and continues to do this until all patches are covered. When there are barriers then the turtle avoids them by checking ahead to see if the next patch is red and if this is the case the turtle and sets its heading to the current heading pule 180 and moves forward 1 step.
HOW TO USE IT

The SETUP button clears all and creates one turtle.

The GO1 button depicts one type of random motion: rt random 360 fd 1.

The GO2 button depicts a second type of random motion where the turtle avoids going over already covered patches.

The GO1-WITHBARRIERS is the go1 random motion with barriers in place.

The GO2-WITHBARRIERS is the go2 random motion with barriers in place.

THINGS TO NOTICE
Notice the graph of percentvisited versus ticks and use it to compare the different types of random motion. Is one significantly faster than the other?
THINGS TO TRY
Try the go2 button after the go1 button and notice if on average one type of random motion is faster than the other. Why is this the case? Next try go1-withBarriers and go2-withBarriers. Is go2 still faster than go1 with barriers added? Then compare go1 with go1-withBarriers and go2 with go2-withBarriers. Does adding barriers affect long it takes to cover all patches.
EXTENDING THE MODEL
It would be interesting to see if there are other different types of random motion that would allow the turtle to cover all patches faster . also it would be interesting to test whether adding more barriers affect how fast the turtle can cover all the patches.

 

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.
6 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.