Flock Image

This model is derived from the “Flocking” model included in the NetLogo model library. See Wilensky, U. (1998). NetLogoFlocking model. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL. The text that follows is based on the information distributed with that model.

The model is an attempt to mimic the flocking of birds. (The resulting motion also resembles schools of fish.) The flocks that appear in this model are not created or led in any way by special leader birds. Rather, each bird is following exactly the same set of rules, from which flocks emerge.

How it works

The birds follow three rules: “alignment”, “separation”, and “cohesion”.

“Alignment” means that a bird tends to turn so that it is moving in the same direction that nearby birds are moving.

“Separation” means that a bird will turn to avoid another bird which gets too close.

“Cohesion” means that a bird will move towards other nearby birds (unless another bird is too close).

When two birds are too close, the “separation” rule overrides the other two, which are deactivated until the minimum separation is achieved.

The three rules affect only the bird’s heading. Each bird always moves forward at the same constant speed.

The default settings for the sliders will produce reasonably good flocking behavior. However, you can play with them to get variations:

Three TURN-ANGLE sliders control the maximum angle a bird can turn as a result of each rule.
VISION is the distance that each bird can see 360 degrees around it.

Running this model:
1. Click on the “Capture” button in the tool bar.
2. Click “Load” next to “Capture.”
3. Click “Exec” to run the model through multiple iterations. Click “Stop” to stop the graph.
4. To run the model step by step, click “Capture,” “Load,” “Init,” then “Step.”