Boids, originally written by Craig Reynolds in 1986, is an artificial life program which simulates
flocking birds (but in this case just in 2D). It is an example of emergent behaviour; that is, the
complexity of Boids arises from the interaction of individual agents adhering to a set of simple
rules, (i) separation: steering to avoid crowding local flockmates, (ii) alignment: steer towards
the average heading of local flockmates, and (iii) cohesion: steer to move toward the average
position (center of mass) of local flockmates.