Flocking is the behavior exhibited when a group of birds, called a flock, are foraging or in flight. Sheep and goats also exhibit flocking behavior.
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.[1]
Flocking is considered an emergent behaviour arising from simple rules that are followed by individuals and does not involve any central coordination.