Basic flocking is controlled by three simple rules:
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.
Flocking is a common technology in screensavers, and has found its use in animation. Flocking has been used in many films to generate crowds which move more realistically. Tim Burton's Batman Returns (1992) featured flocking penguins, and Disney's The Lion King (1994) included a wildebeest stampede.
From a practical perspective, flocking has been considered as a means to control the behavior of Unmanned Air Vehicles (UAVs) .
Measurements of bird flocking have been made (Feder 2007) using high-speed cameras, and a computer analysis has been made to test the simple rules of flocking mentioned above. It is found that they generally hold true in the case of bird flocking, but the long range attraction rule (cohesion) applies to the nearest 5-10 neighbors of the flocking bird and is independent of the distance of these neighbors from the bird. In addition, there is an anisotropy with regard to this cohesive tendency, with more cohesion being exhibited towards neighbors to the sides of the bird, rather than in front or behind. This is no doubt due to the field of vision of the flying bird being directed to the sides rather than directly forward or backward.
A basic implementation of a flocking algorithm has complexity - each bird searches through all other birds to find those who falls into his environment.
Possible improvements:
Lee Spector, Jon Klein, Chris Perry and Mark Feinstein studied the emergence of collective behavior in evolutionary computation systems.