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 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.

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.

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(n2). 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]

Other computational models of group motion

Computer animation

Eurythmy by Susan Amkraut and Michael Girard contained
the first procedural animation of flocks when it was shown at the Film
& Video Show of SIGGRAPH '85. It is available on SIGGRAPH Video
review
(SVR Issue 21, Entry 2). Some imagery from the final version
appear on this page from Ars Electronica 89. Amkraut and
Girard also created flocking and herding in the 1993 VR production
Menagerie.

Jessica
Hodgins and colleagues at Georgia Tech's GVU have created several
physically-based models of
group behaviors such as herding one-legged hoppers and a pack of
bicyclists.

Course CS206
at George Washington University includes an assignment to implement a Behavioral
Motion Control System like boids. You can see some of the
student's animations from:
1997,
1998 and 1999.
[new]

Games, Interactive graphics and virtual reality

Rip-Off
(1980) a video
arcade game designed by Tim
Skelly featured a group of three autonomous "enemy tanks" which
exhibited coordinated
group motion. They avoided collisions with each other and would seek
the goal
objects ("canisters"), or if they got too close, the player controlled
vehicles. The combination of goal seeking and collision avoidance
produced a
motion like flocking. For more details, read Tim Skelly's own description of the behavior.
See also this
Rip-Off screenshot
and this page about an
emulator. [new]

Parallel
Bird Flocking Simulation (1993) by
Helmut Lorek and Matthew White. Describes an implementation of
boids using up to 50 parallel Transputer processors to simulate flocks
of up to 100 boids at interactive rates (6 frames per second or
better). The simulation included obstacle avoidance. The full article
is available in PDF.
[new]

The
Robot Sheepdog Project by Richard Vaughanet
al. provides an interesting contrast to much of the work cited on
this page: the flocking/herding involved is of natural animals while a
robot plays a role similar to a sheepdog. As is done when training real
sheepdogs, ducks are used here as a less challenging stand-in for
sheep. Read the delightful
paper for more detail. See also Neil Sumpter's pages
about the vision
research related to robo-sheepdog.

OK, while not strictly a "computational model of
group motion,"
Schools are for Fish is a collection of participatory activities
for young students to help them learn about group motion and complex
systems.

As part of this MFA work, Terry Franguiadakis created
a virtual reality art piece called Swallows of
Capistrano which included a flock of swallows that would fly over
to eat food dispensed from the user's 3d wand.

Emergence is
the system underlying the 1997 and 1998 installations known as The
Bush Soul by Rebecca
Allenet al. This interactive 3D world is full of
autonomous objects and characters, including flock-like groups.

Tamás Vicsek
published an analysis of flocking particles in Physical Review Letters
on August 7, 1995, which focused on transitions in collective behavior.
(I will provide a more complete description here when I better
understand Prof. Vicsek's work.)

Work
by Yu-hai Tu and John Toner
published in Physical Review Letters (Volume 75, page 4326, December 4,
1995) includes a proof that motion of a flock or herd is essential to
its collective ability to align. That is, group alignment is not
possible with local perception in the absence of motion.

Amorphous
Computing HomePage a research group exploring the question: "How do
we obtain coherent behavior from the cooperation of large numbers of
unreliable parts that are interconnected in unknown, irregular, and
time-varying ways?" [new]

Simulation
of Herding with Dynamics by Howard
Zhang uses a simple spring-mass model of animal bodies and
simulates herding on the plane. This report contains good diagrams and
descriptions of the implementation of component steering behaviors.

E Pluribus Unum (the January 1999 installment of Brian Hayes'
column on Computing Science in American Scientist)
talks about emergence using examples such as flocks, schools,
herds, traffic jams, ant colonies, and forest fires.

Flocking,
Boids and Tag (1998) by Aron
Helser. This class
project involved an interactive flock which plays the game of tag and
allows the use to either ride along passively with a member of the
flock, or take control and pilot the boid. [new]

GOIDS
Project a study of flocking geese objects (1999) by Cathryn J
Polinsky. Presentation slides for a Senior Project called "Flight
Simulation of Flocking Geese Using Particle Set Animation" [new]

Natural flocks, herds, and schools

Some seminal papers from the (hardcopy) literature:

The Structure and Function of Fish Schools (1982) by
Brian Partridge in Scientific American,
June 1982, pages 114-123.

The Chorus Line Hypothesis of Manoeuvre Coordination in
Avian Flocks (1984) by
Wayne Potts, in Nature,
Volume 309, May 24, 1984, pages 344-345.

Animal Groups in Three Dimensions: How Species Aggregate
(1997) edited by
Julia K. Parrish and William M. Hamner. A collection of papers
related to a 1991 workshop on measuring and modeling animal
aggregations. Use this link to
shop for the book.

each of which contain pictures and diagrams on geometrical
relationships between herds of livestock, the shapes of their
enclosures, and the positions of human handlers.

William H. Calvin's book The Ascent of Mind
discusses the predation on herds of early humans in Chapter 8: Hand-Ax Heaven (you
may wish to search for the first occurance of herd).

Lessons from
Geese: on the structure of migratory goose flocks, and folksy
thoughts on applying these ideas to groups of humans.

V formations: at the bottom of Jim Rible's page about the Canada
Goose there is a discussion about the mixed evidence for an
aerodynamic explanation of the "V" formations often seen in migrating
ducks and geese. See also the cited references.

An essay called Migration
Advantages of Shoaling by Tony J. Pritcher in his book
Behaviour of Teleost Fishes describes research by Uwe Kils into the
effect he calls synchrokinesis whereby small movements of
individuals copied through the shoal provide an accurate movement
towards better conditions. (Contrast this with the work of Toner
and Tu (above) which suggests that individual errors are damped out
by interaction with the rest of the group.)

Cutting horses and herding dogs: these two types
of trained animal behaviors have evolved into modern sport
competitions. Their origin was to assist humans raising stock animals,
and they can still be found in this role today. Both are related to
herding behavior in special ways.

The job of a herding dog (stockdog, sheepdog) is to help a
shepherd contain and control a herd of stock animals (especially sheep,
goats or cattle). A herding dog uses its understanding of the stock
animal's herding behavior to be able to move the whole group as a unit.
For more information see: The
Stockdog Server, Dog-Play:
Herding and The
Herding Page[new]

The cutting horse derived from the American cowboy culture
and is specifically trained to handle cattle. A cutting horse's skill
is in being able to defeat the cattle's herding instinct,
allowing it to separate off (cut) one individual at a time. The site of
the National Cutting Horse
Association includes history
and videos of
the sport. [new]

Software

This is the original 1986-1988 implementation, written in
Symbolics Common Lisp, and based on Symbolics' S-Geometry 3d modeling
system and S-Dynamics animation system. (Modern versions of
those applications are available from Winged Edge Technologies, see:
Mirai Modeling and
Mirai Animation. Your browser may not recognize this file as Lisp
source code and try to reformat it as filled text. If so use [View /
Page Source] or equivalent, or download the file.)

This platform-independent boids implementation by Christopher Kline
includes C++ source code and an Inventor-based binary executable demo
for SGI machines. These boids support both flocking and obstacle
avoidance.

An After Dark screen saver module for Macintosh computers
by Simon Fraser. This
very nice package implements a parameterized version of boids including
several species of creatures (wasps, birds, fish, sheep...) based on
altering the parameters. There are control panels that allow you to
experiment with the parameters. For other sources of this software see
Simon's AD page.

by
Jürgen Schmitz. Version 1.0 of a Windows application featuring
three distinct species of flocking birds and nice control panels for
adjusting their parameters. See the
readme file for more information.

A screen saver for Windows by Ric Colasanti. A-Quarium
is a fish tank simulator somewhat related to boids. "...a fish will try
to swim with a close neighbour if it is of the same species, and will
try to swim away if it is of a different species. The behaviour of the
fish tank is an emergent property of all the individual fish
actions..."

This Windows 3.1 software originally accompanied the book Artificial
Life Lab by Rudy
Rucker, Waite Group Press, 1993, now out of print. It includes an
implementation of boids and related ALife models.

This is an application for a PowerPC Macintosh using QD3D. Other
versions exist for 68000 Macs with FPU, and as After Dark modules. See
the main page by Stone
(Ishihama Yoshiaki) for other alife-related Mac and Java software.

Mattias Fagerlund wrote this
very nice 2D implementation of boids for Windows 95 or WindowsNT and
provides both executable and source code. A screen shot on the web page
shows the interactive slider controls and a large flock flying around
several obstacles.

A boids implementation by Stephen Coy has been included in the DirectX sample code since
version 5. Stephen suggests that better source code is included with
DMBoids the DirectMusic demo based on boids.

By
David S. Hooper, Cool School simulates a school of fish and
predators using behavioral modeling. The O(n2)
cost of the naive boids algorithm is reduced by by subdividing the
population into a hierarchy of "subschools". He reports running at
interactive rates with 32 subschools each containing 33 fish on a
200MHz Pentium-class machine. Cool School was developed as part of the Virtual Whale project
mentioned above.

Richard Lowe wrote this boids implementation in Visual Basic and
provided the source code at PlanetSourceCode's VB
repository. (I have not seen it run but:) It apparently provides
for interactive specification of obstacles. [new]

Robert Platt wrote a
boids implementation as a Windows application for a Final Year Project
in college. The original version used Direct3D and he later rewrote it
to use OpenGL. Binaries and source
are available for download from his page. [new]

Olcay Cirit wrote this 2d
shooter game based on boids. It runs under Windows 95, 98, and NT and
is available for free download. You can shot at the flocking birds, but
watch out, because they can shoot back! And since they are a flock,
they can make coordinated group attacks. [new]

Bill Powers
developed these models of "people moving in relation to other people
and things" as part of a suite of (Windows PC based) demonstrations of
his Perceptual
Control Theory. Powers and his colleagues in the Control Systems Group seek to
model and understanding the purposeful behavior of living organisms. [new]

James Greenbank
wrote this ecological simulation of a three species system using
individual-based local rules. It is written as a Java application. This
page contains links to a paper, the source code and both
platform-independent and Windows-specific executables. [new]

a StarLogoT implementation of flocking from Connected Mathematics("Making
Sense of Complex Phenomena Through Building Object-Based Parallel
Models.") Includes links to a movie of the simulation and a
page of
background. [new]

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: