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

Emergence 2009: Exploration and Barriers I

Emergence

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

 

Back to index of models

 

 

Download/view: PercentVisited_Barriers.nlogo

 

WHAT IS IT?
This model shows a turtle avoiding barriers. It does not know how many barriers are there in the world - it learns to find them and avoid them. The model also shows how the turtle moves when there are no barriers.
HOW IT WORKS
The turtle checks to see what the patch ahead of it does to its health. If it is an unsafe patch, its health goes down by one; if it is safe, then the health stays the same. If the turtle's health goes down, it does not move to that patch ahead since it then knows that the patch ahead is unsafe, in which case it turns its direction to go another way.
HOW TO USE IT

The setup-general is used when you do not want barriers in the world and you just want to know how many ticks it takes to visit all the patches in the world. This can be done with the two buttons - go1 and go2. The only difference in these two is how many patches it moves forward. The turtle moves forward 1 patch in go1 and 2 patches in go2.

Setup-barriers is used when you want barriers in the world. You can turn that on or off in the "show barriers" button. You can turn that on at any point while it is running as well. Use the button "go with barriers" to see how the turtle avoids the barriers. 

THINGS TO NOTICE
Check out the "visited" and "ticks" monitors and the percent visited graph. Notice that the go2 function runs faster than the go1.
THINGS TO TRY
Try the barriers function without turning the barriers on, so you don't know where the barriers are. Turn it on only after the turtle completes going through the whole world. Is the turtle learning to avoid barriers that we don't even see?
EXTENDING THE MODEL
It would be great to see other go functions with different rules and see which one works fastest.
RELATED MODELS
Some of the other models developed by other students in the Emergence class.
CREDITS AND REFERENCES
Professor Paul Grobstein.

 

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