CS266 Assignment 4 - Behavioral Motion Control System


The purpose of this assignment was to implement a system to generate flocking motion such as that presented by Craig Reynolds in his 1987 paper.

Five basic behaviors have been implemented:

Predator avoidance is given the most weight, followed by collision avoidance, flock centering, and then velocity matching. In the animation below, there are 20 boids (red) in the scene and one "predator" (yellow) which simply moves in a circle. As the boids get close to the "predator," they become scared and fly away. Note that the flock can split up into smaller distinct flocks as necessary and rejoin again. This is due to the localization of the flocking behavior; for flock centering and velocity matching, each boid is only concerned with those neighbors within a certain radius. As the boids near the ground, they will land and stay there for some random amount of time.

Download/view the animation: Ass4.avi (540 KB)

Please note that you need to have the DivX codec installed to view the animation. It can be downloaded from http://www.divx.com.