Artificial Life: Modeling Flocking Behavior
Chad Schaefer
A drove of dinosaurs race up the valley floor, chased by a ravenous T-Rex in the film, Jurassic Park (1993). In Godzilla (1998), a mob of infant offspring of the giant mutant navigates through the debris and destruction of an underground warren in their pursuit of the protagonists.
How did they do that? In the films, both scenes are comprised of a great number of individual creatures each navigating through the confusion on a unique path, each with its own obstacles and obstructions. Did the CGI wizards behind these works lovingly hand-animate each creature as it ran through its paces? Considering the difficulty behind animating a single creature convincingly, which requires a minimum of 12 images in sequence per second of film--A sixty second sequence would require at least 720 images per creature--the answer is probably a resounding no. With dozens or even hundreds of individual creatures in the shot, the expense and man-power required would be unbelievable, even with the help of computer animation tools such as key-framing and inverse-kinetics models--which are beyond the scope of this paper, but were none-the-less revolutions in the field of computer animation. Obviously, another solution had to be found. That solution involved using computer technology for what it does best, tedious and repetitive algorithms.
The premise is simple: use the
computer to animate each creature automatically based on the following rules:
![]() |
1)
Each creature must find a path from its
starting point towards a goal, or perform an action to be determined by
the animator.
2) A creature may not occupy space filled by an obstacle, and must maneuver to avoid them. 3) A creature may not occupy the space occupied by another creature and must maneuver to avoid collisions. |
By adding more rules, one can model the behavior of schools of fish, flocks of birds, crowds of people, or even herds of cattle.
![]() |
4)
If possible, a creature is to head towards
the mean center of its peers within its range of perception. 5) If possible, a creature is to match the velocity of its peers within its range of perception.
|
The significance of these two additional rules cannot be understated. Without them, our flock of artificial-birds--or more humorously, Boids--would never perform the same behaviors exhibited by the real thing in nature, they would instead more closely resemble gas molecules in extremely rarefied conditions. In this paper, I will attempt to describe the theories and methods behind this powerful modeling technique and apply them towards the flocking behavior of Boids.