Starling flock at sunset in Denmark
Collective animal behavior is a form of social behavior involving the coordinated behavior of large groups of similar animals as well as emergent
 properties of these groups. This can include the costs and benefits of 
group membership, the transfer of information across the group, the 
group decision-making process, and group locomotion and synchronization.
 Studying the principles of collective animal behavior has relevance to 
human engineering problems through the philosophy of biomimetics.
 For instance, determining the rules by which an individual animal 
navigates relative to its neighbors in a group can lead to advances in 
the deployment and control of groups of swimming or flying micro-robots 
such as UAVs (Unmanned Aerial Vehicles).
Examples
Examples of collective animal behavior include: 
- Flocking birds
- Herding ungulates
- Shoaling and schooling fish
- Schooling Antarctic krill
- Pods of dolphins
- Marching locusts
- Nest building ants
Proposed functions
Many
 functions of animal aggregations have been proposed. These proposed 
functions may be grouped into the four following categories: social and 
genetic, anti-predator, enhanced foraging, and increased locomotion 
efficiency.
Social interaction
Support
 for the social and genetic function of aggregations, especially those 
formed by fish, can be seen in several aspects of their behavior. For 
instance, experiments have shown that individual fish removed from a 
school will have a higher respiratory rate than those found in the 
school. This effect has been partly attributed to stress, although 
hydrodynamic factors were considered more important in this particular 
study.
 The calming effect of being with conspecifics may thus provide a social
 motivation for remaining in an aggregation. Herring, for instance, will
 become very agitated if they are isolated from conspecifics. Fish schools have also been proposed to serve a reproductive function since they provide increased access to potential mates.
Protection from predators
Several anti-predator functions of animal aggregations have been proposed. One potential method by which fish schools or bird flocks may thwart predators is the ‘predator confusion effect’ proposed and demonstrated by Milinski and Heller (1978).
 This theory is based on the idea that it becomes difficult for 
predators to pick out individual prey from groups because the many 
moving targets create a sensory overload of the predator's visual 
channel. Milinski and Heller's findings have been corroborated both in 
experiment and computer simulations.
A second potential anti-predator effect of animal aggregations is
 the "many eyes" hypothesis. This theory states that as the size of the 
group increases, the task of scanning the environment for predators can 
be spread out over many individuals. Not only does this mass collaboration presumably provide a higher level of vigilance, it could also allow more time for individual feeding.
A third hypothesis for an anti-predatory effect of animal aggregation is the "encounter dilution"
 effect. Hamilton, for instance, proposed that the aggregation of 
animals was due to a "selfish" avoidance of a predator and was thus a 
form of cover-seeking.
  Another formulation of the theory was given by Turner and Pitcher and 
was viewed as a combination of detection and attack probabilities.
 In the detection component of the theory, it was suggested that 
potential prey might benefit by living together since a predator is less
 likely to chance upon a single group than a scattered distribution. In 
the attack component, it was thought that an attacking predator is less 
likely to eat a particular animal when a greater number of individuals 
are present. In sum, an individual has an advantage if it is in the 
larger of two groups, assuming that the probability of detection and 
attack does not increase disproportionately with the size of the group.
Enhanced foraging
A
 third proposed benefit of animal groups is that of enhanced foraging. 
This ability was demonstrated by Pitcher and others in their study of 
foraging behavior in shoaling cyprinids.
 In this study, the time it took for groups of minnows and goldfish to 
find a patch of food was quantified. The number of fishes in the groups 
was varied, and a statistically significant decrease in the amount of 
time necessary for larger groups to find food was established. Further 
support for an enhanced foraging capability of schools is seen in the 
structure of schools of predatory fish. Partridge and others analyzed 
the school structure of Atlantic bluefin tuna from aerial photographs 
and found that the school assumed a parabolic shape, a fact that was 
suggestive of cooperative hunting in this species (Partridge et al., 
1983).
Increased locomotion efficiency
This
 theory states that groups of animals moving in a fluid environment may 
save energy when swimming or flying together, much in the way that 
bicyclists may draft one another in a peloton. Geese flying in a Vee formation are also thought to save energy by flying in the updraft of the wingtip vortex generated by the previous animal in the formation. Ducklings have also been shown to save energy by swimming in a line. Increased efficiencies in swimming in groups have also been proposed for schools of fish and Antarctic krill.
Group structure
The
 structure of large animal groups has been difficult to study because of
 the large number of animals involved. The experimental approach is 
therefore often complemented by mathematical modeling of animal 
aggregations.
Experimental approach
Experiments
 investigating the structure of animal aggregations seek to determine 
the 3D position of each animal within a volume at each point in time. It
 is important to know the internal structure of the group because that 
structure can be related to the proposed motivations for animal 
grouping. This capability requires the use of multiple cameras trained 
on the same volume in space, a technique known as stereophotogrammetry.
 When hundreds or thousands of animals occupy the study volume, it 
becomes difficult to identify each one. In addition, animals may block 
one another in the camera views, a problem known as occlusion. Once the 
location of each animal at each point in time is known, various 
parameters describing the animal group can be extracted. 
These parameters include:
Density: The density of an animal aggregation is 
the number of animals divided by the volume (or area) occupied by the 
aggregation. Density may not be a constant throughout the group. For 
instance, starling flocks have been shown to maintain higher densities 
on the edges than in the middle of the flock, a feature that is 
presumably related to defense from predators.
Polarity: The group polarity describes if the group
 animals are all pointing in the same direction or not. In order to 
determine this parameter, the average orientation of all animals in the 
group is determined. For each animal, the angular difference between its
 orientation and the group orientation is then found. The group polarity
 is then the average of these differences (Viscido 2004).
Nearest Neighbor Distance: The nearest neighbor 
distance (NND) describes the distance between the centroid of one animal
 (the focal animal) and the centroid of the animal nearest to the focal 
animal. This parameter can be found for each animal in an aggregation 
and then averaged. Care must be taken to account for the animals located
 at the edge of an animal aggregation. These animals have no neighbor in
 one direction. 
Nearest Neighbor Position: In a polar coordinate 
system, the nearest neighbor position describes the angle and distance 
of the nearest neighbor to a focal animal. 
Packing Fraction: Packing fraction
 is a parameter borrowed from physics to define the organization (or 
state i.e. solid, liquid, or gas) of 3D animal groups. It is an 
alternative measure to density. In this parameter, the aggregation is 
idealized as an ensemble of solid spheres, with each animal at the 
center of a sphere. The packing fraction is defined as the ratio of the 
total volume occupied by all individual spheres divided by the global 
volume of the aggregation (Cavagna 2008). Values range from zero to one,
 where a small packing fraction represents a dilute system like a gas. 
Cavagna found that the packing fraction for groups of starlings was 
0.012.
Integrated Conditional Density: This parameter 
measures the density at various length scales and therefore describes 
the homogeneity of density throughout an animal group.
Pair Distribution Function:
 This parameter is usually used in physics to characterize the degree of
 spatial order in a system of particles. It also describes the density, 
but this measures describes the density at a distance away from a given 
point. Cavagna et al. found that flocks of starlings exhibited more 
structure than a gas but less than a liquid.
Modeling approach
The simplest mathematical models of animal aggregations generally instruct the individual animals to follow three rules:
- Move in the same direction as your neighbor
- Remain close to your neighbors
- Avoid collisions with your neighbors
A diagram illustrating the difference between 'metric distance' and 'topological distance' in reference to fish schools
An example of such a simulation is the Boids program created by Craig Reynolds in 1986. Another is the Self Propelled Particle
 model. Many current models use variations on these rules. For instance,
 many models implement these three rules through layered zones around 
each animal. In the zone of repulsion very close to the animal, the 
focal animal will seek to distance itself from its neighbors in order to
 avoid a collision. In the slightly further away zone of alignment, a 
focal animal will seek to align its direction of motion with its 
neighbors. In the outmost zone of attraction, which extends as far away 
from the focal animal as it is able to sense, the focal animal will 
seeks to move towards a neighbor. The shape of these zones will 
necessarily be affected by the sensory capabilities of the animal. For 
example, the visual field of a bird does not extend behind its body. 
Fish, on the other hand, rely on both vision and on hydrodynamic signals
 relayed through its lateral line. Antarctic krill rely on vision and on hydrodynamic signals relayed through its antennae. 
Recent studies of starling flocks have shown, however, that each 
bird modifies its position relative to the six or seven animals directly
 surrounding it, no matter how close or how far away those animals are.
 Interactions between flocking starlings are thus based on a topological
 rule rather than a metric rule. It remains to be seen whether the same 
rule can be applied to other animals. Another recent study, based on an 
analysis of high speed camera footage of flocks above Rome and assuming 
minimal behavioural rules, has convincingly simulated a number of 
aspects of flock behaviour.
Collective decision making
Aggregations
 of animals are faced with decisions which they must make if they are to
 remain together. For a school of fish, an example of a typical decision
 might be which direction to swim when confronted by a predator. Social 
insects such as ants and bees must collectively decide where to build a 
new nest.
 A herd of elephants must decide when and where to migrate. How are 
these decisions made? Do stronger or more experienced 'leaders' exert 
more influence than other group members, or does the group make a 
decision by consensus? The answer probably depends on the species. While
 the role of a leading matriarch in an elephant herd is well known, 
studies have shown that some animal species use a consensus approach in 
their collective decision-making process. 
A recent investigation showed that small groups of fish used 
consensus decision-making when deciding which fish model to follow. The 
fish did this by a simple quorum rule such that individuals watched the 
decisions of others before making their own decisions. This technique 
generally resulted in the 'correct' decision but occasionally cascaded 
into the 'incorrect' decision. In addition, as the group size increased,
 the fish made more accurate decisions in following the more attractive 
fish model. Consensus decision-making, a form of collective intelligence, thus effectively uses information from multiple sources to generally reach the correct conclusion. 
Some simulations of collective decision-making use the Condorcet method to model the way groups of animals come to consensus.



 
