Boids are an artificial life simulation developed by Craig Reynolds in 1986 that models the flocking behavior of birds.
Each boid (an abbreviation of the word "birdoid" which refers to a simulated flocking birds or schooling fish) follows three simple rules from which the flocking behavior you see above emerges.
The three rules are:
- Fly towards the average position of your neighbors (cohesion)
- Match your neighbors' average velocity (alignment)
- Don't get too close to your neighbors (separation)
Boids are a common example of emergent behavior because each boid follows simple local rules which leads to complex global behavior.