Netlogo Functions Flashcards
1
Q
count?
A
- reports the number of agents in the given agent set
2
Q
any?
A
- reports true is the given agent set is non-empty
- otherwise it is false
3
Q
n-of size agentset
A
- reports an agentset of size randomly chosen from the input
- no repeats
4
Q
n-of size list
A
- reports a list of size randomly chosen from the input set
- no repeats
5
Q
sprout
A
- creates a # of new turtles on a patch
- random integer heading and color
- turtles immediately run commands
6
Q
hatch
A
- needs a number
- when a turtle creates new turtles
- each new turtle will have a new “who” number
7
Q
turtles-here
A
- reports an agentset containing all the turtles on the caller’s patch
8
Q
other
A
- reports an agentset which is the same as the input agentset but omits the agent
9
Q
patch-ahead
A
- needs a distance
- reports the single patch that is the given distance ahead of the turtle (current heading)
- reports nobody if the patch does not exist