Various algorithms have been introduced to aid in the study of biological flocking. These algorithms have different origins, from computer graphics to physics, each offering a unique perspective on the real phenomena. Computer simulations and mathematical models that have been developed to emulate the flocking behaviours of birds can also generally be applied to the "flocking" behaviour of other species. As a result, the term "flocking" is sometimes applied, in computer science, to species other than birds, to mean collective motion by a group of self-propelled entities, a
collective animal behaviour exhibited by many living beings such as
fish,
bacteria, and
insects.
Reynolds' models Flocking behaviour was simulated on a computer in 1987 by
Craig Reynolds with the program
Boids. This program simulates simple agents (boids) that move according to a set of three basic rules: separation, alignment and cohesion. The result, akin to a
flock of
birds, a
school of
fish, or a
swarm of
insects, was developed for motion picture visual effects.
Rules Reynolds' models of flocking behaviour are controlled by three simple rules: ;Separation :Avoid crowding neighbours (short range repulsion) ;Alignment :Steer towards average heading of neighbours ;Cohesion :Steer towards average position of neighbours (long range attraction) With these three simple rules, the flock moves in an extremely realistic way, creating complex motion and interaction that would be extremely hard to create otherwise.
Rule variants The basic model has been extended in several different ways since Reynolds proposed it. For instance, C. Delgado-Mata et al. extended the basic model in 2007 to incorporate the effects of fear. Olfaction was used to transmit emotion between animals, through pheromones modelled as particles in a free expansion gas. Christopher Hartman and Bedr̆ich Benes introduced in 2006 a complementary force to the alignment that they call the change of leadership. This steer defines the chance of the bird to become a leader and try to escape.
Vicsek models An early model from the domain of physics, the Vicsek model (named after
Tamás Vicsek) from 1995 gained attention in the study of flocking as a form active matter, a system where energy is continually added (unlike thermodynamic models). Applied to collective motion and swarming, Vicsek models demonstrate that a simpler set of rules with just fixed speed, self-propelled particles, and neighbor alignment, are able to achieve sub-group flocking and milling (vortex structures). These models are attractive in physics due to their simplicity and universality. Such models however, do not exhibit speed changes due to climbing and diving in flight, or complex phenomena such as orientation waves due to perceptual vision.
Aerodynamic models Charlotte K. Hemelrijk and Hanno Hildenbrandt in 2011 used attraction, alignment, and avoidance, and extended this with a number of traits of real starlings: • birds fly according to fixed wing aerodynamics, while rolling when turning (thus losing lift); • they coordinate with a limited number of interaction neighbours of 7 (like real starlings); • they try to stay above a sleeping site (like starlings do at dawn), and when they happen to move outwards from the sleeping site, they return to it by turning; and • they move at relative fixed speed. The authors showed that the specifics of flying behaviour as well as large flock size and low number of interaction partners were essential to the creation of the variable shape of flocks of starlings.
Orientation models Rama Carl Hoetzlein introduced the orientation-model in 2024 which separates the perceptual aspects of bird flight from the underlying aerodynamic model, linking these two control systems only by a heading target similar to real flight control. The perceptual model of each bird is orientation-based, mapped to a sphere, which more closely matches the biological vision system. The output of perception is a target heading angle (not a vector), which is used to control an aerodynamic model much like a flight simulator. Energy and frequency analysis in this work bridge the study of real bird kinetics with simulation models. This model demonstrates emergent, spontaneous orientation waves for the first time, a key feature in flocking murmurations. == Complexity ==