New Mexico Computer Science For All Creating Turtles Maureen Psaila-Dombrowski.
-
Upload
garry-richard -
Category
Documents
-
view
212 -
download
0
Transcript of New Mexico Computer Science For All Creating Turtles Maureen Psaila-Dombrowski.
New Mexico Computer Science For All
Creating TurtlesMaureen Psaila-Dombrowski
Agents in Netlogo
•Observer – no specific location, looks over entire Netlogo World
•Turtle Agents – Mobile agents▫Can have different shapes and names
(breeds)
•Patches – Stationary agents▫Netlogo World is divided into a grid
work of small squares or patches
•Links - Agents that connect two turtles
Three Ways to Create Turtles
Create command – Observer creates turtles
create-turtles #
•Creates # new turtles at the origin
•Turtles have a random color and direction
Three Ways to Create Turtles
Sprout Command – Patches create turtles
sprout #
•Creates # turtles on a selected patch
•Turtles have a random color and direction
Three Ways to Create Turtles
Hatch Command – Turtles create turtles
hatch #
•Must be an existing turtle
•Creates # new turtles at the same location as the “parent” turtle
•Each new turtle inherits of all the “parent” turtle properties
Three Ways to Create Turtles
More Information:
•http://ccl.northwestern.edu/netlogo/docs/dict/create-turtles.html
•http://ccl.northwestern.edu/netlogo/docs/dict/sprout.html
•http://ccl.northwestern.edu/netlogo/docs/dict/hatch.html