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

Emergence 2009: Exploration and Barriers IV

Emergence

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

 

Back to index of models

 

 

Download/view: ToxicColorAvoid.nlogo

 

WHAT IS IT?
This model demonstrates a turtle 'learning' to avoid a color which affects it negatively.
HOW TO USE IT

SETUP, GO, and STEP are standard.

SETUP & REDRAW resets the model without losing anything drawn by the observer. You can do use it while the model is still running for quick multiple trials.

TOXIC-COLOR selects the color that is toxic to the turtle.

DRAW-COLOR selects the color or drawings made by the observer.

DRAW lets the user draw in the world with the mouse.

TRACE controls whether the turtle leaves a trail behind it.

HEALTH displays the turtle's health variable.

THINGS TO NOTICE
Notice that several buttons in the interface have hotkeys, so they can be controlled with the keyboard.
THINGS TO TRY
Draw something in a non-toxic color and see what happens when you run the model. Then try drawing something in the selected toxic color. See how the turtle responds to different environments of toxic patches. See if you can make the turtle's health drop below 6; see if you can make it die (health = 0).
EXTENDING THE MODEL
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.
CREDITS AND REFERENCES
I borrowed the DRAW procedure directly from my 'RandomFillBarriers' model.

 

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