Animals in groups – like fish schools, bird flocks, and insect swarms – frequently exhibit complex and coordinated behaviours that result from social interactions among individuals. These emergent properties of interacting units span systems and scales, from cells forming biological tissues, fish schools moving in synchrony, animal migrations across continents, and robot swarms.
This project started during McGill Physics Hackathon 2019 and took inspiration from Sebastian Lague's Coding Adventure. We were mesmerized by the emergent patterns in the flocks of `boids` (short for `bird-oids`) and, in particular, the physics forces that were driving these patterns. After a brief overview of the literature we found out that all the way back in 1987 Craig Reynolds was able to animate a flock of boids using particle simulation technique. Each boid was represented as an independent agent that used its sensorimotor observations for navigation and whose motion was governed by the laws of simulated physics. Three laws have been established, that determined the formations emerged in the simulation:
Below are some beautiful visualizations of boids that are flocking according to the three laws above.
The models for our predator and prey in the boid simulation.