Based on doodle poll, the make-up class will be held on
Download and open the “modified flocking model” from Brightspace, the Downloads page on the course web site, or from https://ees4760.jgilligan.org/models/class_09/modified_flocking.nlogo
It’s easiest if you right-click on the link and choose “Save As” and save the model in a folder on your computer.
nearest-neighboris too close, the bird
separatesby turning away from it.
aligns: turns toward its
coheres: turns slightly toward the direction the rest of its
flockmatesare all birds within
flockmatesinteracts with 6 nearest birds, regardless of distance.
separate: Turn away from
nearest-neighborby up to
align: Turn toward center of
flockmatesby up to
cohere: After aligning, turn toward average direction
flockmatesare flying, by up to
count turtles with [any? flockmates] mean [count flockmates] of turtles mean [min [distance myself] of other turtles] of turtles standard-deviation [heading] of turtles
Agentsetcategory in NetLogo dictionary
Turn 5 turtles red:
ask n-of 5 turtles [ set color red ]
Now for each of those turtles, select all the turtles within a radius of 5 and turn them green
ask turtles with [color = red] [ ask other turtles in-radius 5 [ set color green ] ]
Now ask each green turtle to calculate the distance to the closest red turtle
show [ min [distance myself] of turtles with [color = red] ] of turtles with [color = green]
Now get the average over all the green turtles of the distance to the closest red turtle
show mean [ min [distance myself] of turtles with [color = red] ] of turtles with [color = green]
analyze_behaviorspaceapp at https://analyze-behaviorspace.jgilligan.org/ to graph the output from your BehaviorSpace experiments.