In 1986 I made a computer model of coordinated animal motion such as bird flocks and fish schools. It was based on three dimensional computational geometry of the sort normally used in computer animation or computer aided design. I called the generic simulated flocking creatures boids. The basic flocking model consists of three simple steering behaviors which describe how an individual boid maneuvers based on the positions and velocities its nearby flockmates:



Separation: steer to avoid crowding local flockmates

Alignment: steer towards the average heading of local flockmates

Cohesion: steer to move toward the average position of local flockmates

Each boid has direct access to the whole scene's geometric description, but flocking requires that it reacts only to flockmates within a certain small neighborhood around itself. The neighborhood is characterized by a distance (measured from the center of the boid) and an angle, measured from the boid's direction of flight. Flockmates outside this local neighborhood are ignored. The neighborhood could be considered a model of limited perception (as by fish in murky water) but it is probably more correct to think of it as defining the region in which flockmates influence a boids steering.



a boid's neighborhood a boid's neighborhood

A slightly more elaborate behavioral model was used in the early experiments. It included predictive obstacle avoidance and goal seeking. Obstacle avoidance allowed the boids to fly through simulated environments while dodging static objects. For applications in computer animation, a low priority goal seeking behavior caused the flock to follow a scripted path.



simulated boid flock avoiding cylindrical obstacles (1986)

(early motion tests, 20 second clip, QuickTime, 10 MB)

In cooperation with many coworkers at the Symbolics Graphics Division and Whitney / Demos Productions, we made an animated short featuring the boids model called Stanley and Stella in: Breaking the Ice. This film was first shown at the Electronic Theater at SIGGRAPH '87. There was a technical paper on boids published at the same conference. In the course notes for SIGGRAPH '88 there was an informal paper about obstacle avoidance.

Since 1987 there have been many other applications of the boids model in the realm of behavioral animation. The 1992 Tim Burton film Batman Returns was the first. It contained computer simulated bat swarms and penguin flocks which were created with modified versions of the original boids software developed at Symbolics. Andy Kopra (then at VIFX , which later merged with Rhythm & Hues ) produced realistic imagery of bat swarms. Andrea Losch (then at Boss Films) and Paul Ashdown created animation of an "army" of penguins marching through the streets of Gotham City.



from Stanley and Stella in: Breaking the Ice (1987)

(40 second clip, QuickTime, 2.8 MB)

As luck would have it, Chris Langton organized the original ground-breaking Artificial Life Workshop a few months after the boids paper was published in 1987. A helpful go-between got word to Chris and he let me give an informal presentation on boids at the Workshop. The boids model has become an oft-cited example of principles of Artificial Life. Flocking is a particularly evocative example of emergence: where complex global behavior can arise from the interaction of simple local rules.

In the boids model (and related systems like the multi-agent steering behavior demos) interaction between simple behaviors of individuals produce complex yet organized group behavior. The component behaviors are inherently nonlinear, so mixing them gives the emergent group dynamics a chaotic aspect. At the same time, the negative feedback provided by the behavioral controllers tends to keep the group dynamics ordered. The result is life-like group behavior.

A significant property of life-like behavior is unpredictability over moderate time scales. For example at one moment, the boids in the applet above might be flying primarily from left to right. It would be all but impossible to predict which direction they will be moving (say) five minutes later. At very short time scales the motion is quite predictable: one second from now a boid will be traveling in approximately the same direction. This property is unique to complex systems and contrasts with both chaotic behavior (which has neither short nor long term predictability) and ordered (static or periodic) behavior. This fits with Langton's 1990 observation that life-like phenomena exist poised at the edge of chaos.

The boids model is an example of an individual-based model, a class of simulation used to capture the global behavior of a large number of interacting autonomous agents. Individual-based models are being used in biology, ecology, economics and other fields of study.

Note that the straightforward implementation of the boids algorithm has an asymptotic complexity of O(n 2 ). Each boid needs to consider each other boid, if only to determine if it is not a nearby flockmate. However it is possible to reduce this cost down to nearly O(n) by the use of a suitable spatial data structure which allows the boids to be kept sorted by their location. Finding the nearby flockmates of a given boid then requires examining only the portion of the flock which is within the general vicinity. Using such algorithmic speed-ups and modern fast hardware, large flocks can be simulated in real time, allowing for interactive applications. [new]

Online resources related to boids

Other computational models of group motion

Natural flocks, herds, and schools

Software

(There is additional source code for Java implementations listed on the boids applet page.)

Lexicological note: in addition to common terms like flock, herd, and school, English has a rich history of specific words to describe groups of various animals, sometimes known as collective nouns or venereal terms. These words were used more frequently when hunting wild animals was a major source of food. For an amusing discussion of these words see the book An Exaltation of Larks by James Lipton (Viking Penguin, 1993, ISBN 0140170960). Here are some web pages that provide similar information: