2017-10-30

-Attached to the end of this post is the NetLogo reference-sheet. You can use it as a quick reference. I will print out a copy and include it with the next test/quiz. You should familiarize yourself with it.

-I said you would have a quiz this week BUT due to timing, I am changing that into an EXAM which will be Friday.

It will cover all NetLogo up to agent sets and patches. We will finish those topics by Wed. You will have a lab Wed/Thurs.

Agent sets: groups of agents. This is not a list, you can use agentset related functions.

Example:

turtles

patches

What can you do with agentsets?

ask AGENTSET[ commandBlock ]

e.g.

ask turtles [ wiggle ]

ask turtles [ stamp die ]

count AGENTSET

e.g.

display count turtles

ask turtles [ set size count turtles ]

Filtering an agent set:

These commands specify which agents in an agent set you are talking about:

AGENTSET with [ boolean reporter ] ; gets the agents from the agentset, that match the boolean.

create an agentset e.g.

turtles with [ color = green]

patches with [ pcolor = black]

do something with an agentset e.g.

ask turtles with [color = red][die]

;turtles with [color = red] is an agentset with some turtles... but it could be empty!