Selfish herd theory
The selfish herd theory states that individuals within a population attempt to reduce their predation risk by putting other conspecifics between themselves and predators. A key element in the theory is the domain of danger, the area of ground in which every point is nearer to a particular individual than to any other individual. Such antipredator behavior inevitably results in aggregations. The theory was proposed by W. D. Hamilton in 1971 to explain the gregarious behavior of a variety of animals. It contrasted the popular hypothesis that evolution of such social behavior was based on mutual benefits to the population. The basic principle governing selfish herd theory is that in aggregations, predation risk is greatest on the periphery and decreases toward the center. More dominant animals within the population are proposed to obtain low-risk central positions, whereas subordinate animals are forced into higher risk positions. The hypothesis has been used to explain why populations at higher predation risk often form larger, more compact groups. It may also explain why these aggregations are often sorted by phenotypic characteristics such as strength. Hamilton's selfish herd

W. D. Hamilton proposed the theory in an article titled "Geometry for the Selfish Herd". To date, this article has been cited in over 2000 sources. To illustrate his theory, Hamilton asked readers to imagine a circular lily pond which sheltered a population of frogs and a water snake. Upon seeing the water snake, the frogs scatter to the rim of the pond, and the water snake attacks the nearest one. Hamilton proposed that in this model, each frog had a better chance of not being closest to, and thus vulnerable to attack by, the water snake if he was between other frogs. As a result, modeled frogs jumped to smaller gaps between neighboring frogs. Domain of danger
This simple example was based on what Hamilton identified as each frog's domain of danger, the area of ground in which any point was nearer to that individual than it was to any other individual. The model assumed that frogs were attacked from random points and that if an attack was initiated from within an individual's domain of danger, he would be attacked and likely killed. The risk of predation to each individual was, therefore, correlated to the size of his domain of danger. Frog jumping in response to the water snake was an attempt to lower the domain of danger. Hamilton also went on to model predation in two-dimensions, using a lion as an example. Movements that Hamilton proposed would lower an individual's domain of danger were largely based on the theory of marginal predation. This theory states that predators attack the closest prey, who are typically on the outside of an aggregation. From this, Hamilton suggested that in the face of predation, there should be a strong movement of individuals toward the center of an aggregation. A domain of danger may be measured by constructing a Voronoi diagram around the group members. Such construction forms a series of convex polygons surrounding each individual in which all points within the polygon are closer to that individual than to any other. Movement rules
Movements toward the center of an aggregation are based upon a variety of movement rules that range in complexity. Identifying these rules has been considered the "dilemma of the selfish herd". The main issue is that movement rules that are easy to follow are often unsuccessful in forming compact aggregations, and those that do form such aggregations are often considered too complex to be biologically relevant. Viscido, Miller, and Wethey identified three factors that govern good movement rules. According to such factors, a plausible movement rule should be statistically likely to benefit its followers, should be likely to fit the capabilities of an animal, and should result in a compact aggregation with desired central movement. Identified movement rules include:

Nearest Neighbor Rule
This rule states that individuals within a population move towards their nearest neighbor. It is the mechanism originally proposed by Hamilton. This rule, however, may not be beneficial in small aggregations, where moving toward nearest neighbor does not necessarily correlate to movement from the periphery. Time Minimization Rule
This rule states that individuals within a population move toward their nearest neighbor in time. This rule has gained popularity as it considers the biological constraints of an animal, as well as its orientation in space. Local Crowded Horizon Rule
This rule states that individuals within a population consider the location of many, if not all, other members within the population in guiding their movements. Research has revealed a variety of factors that may influence chosen movement rules. These factors include initial spatial position, population density, attack strategy of the predator, and vigilance. Individuals holding initially central positions are more likely to be successful at remaining in the center. Simpler movement strategies may be sufficient for low density populations and fast-acting predators, but at higher densities and with slower predators, more complex strategies may be needed. Lastly, less vigilant members of a herd are often less likely to obtain smaller domains of danger as they begin movement later. Escape-route strategies
The selfish herd theory may also be applied to the group escape of prey in which the safest position, relative to predation risk, is not the central position, but rather the front of the herd. The theory may be useful in explaining the escape strategy chosen by a herd leader. Members at the back of the herd have the greatest domain of danger and suffer the highest predation risk. These slow members must choose whether to stay in the herd, and thus be the most likely targets, or whether to desert the herd, and signal their vulnerability. The latter may entice the pursuit of the predator to this sole individual. In light of this, the decision of the escape route by the front members of the herd may be greatly affected by actions of the slowest members. If the leader chooses an escape strategy that promotes the dispersal of the slowest member of the herd, he may endanger himself—causing dissipation of his protective buffer. Five types of herd leadership have been proposed based on the decisions of the leader:

 Seemingly cooperative leadership: route chosen by the leader happens to be beneficial to the entire herd
 Openly selfish leadership: route chosen by the leader minimizes their predation risk, but does not minimize the total predation risk of the herd
 Seemingly altruistic leadership: route chosen by the leader may be favorable to the majority of the herd, but may be difficult for the fastest members
 Seemingly populist leadership: route chosen by the leader is easier for the slowest members to follow, but may be harder for other members
 Apparently spiteful leadership: route chosen by the leader is difficult for all to follow, but is nearly impossible for the slowest members to follow

Although some types of escape are seemingly altruistic, they promote the stability of the herd, and thus decrease the predation risk of the leader. This choice is often affected by the terrain of the area. Evolution
Gregarious behavior occurs in a wide variety of taxa and thus, has likely evolved independently on several occasions. Dilution of predation risk is one of many proposed benefits that have facilitated the selection of such behavior. Much research has been devoted to understanding the possible evolution of the selfish herd and thus, the plausibility of the theory. In order for the selfish herd to have evolved, movement rules that decreased domains of danger within a population must have been selected. Because such rules are often complex, it is unlikely that they would have evolved in a single step. Rather, simple rules that considered solely the nearest neighbor in guiding movement may have given rise to the evolution of more complicated rules. This proposed succession would only occur if individuals who moved toward their nearest neighbor in the face of predation showed a higher survival than those who did not. Furthermore, individuals must have benefited from such movements more often than they were harmed (i.e. forced onto the periphery and attacked). This idea has, in fact, gained support. A study conducted by Reluga and Viscido found that natural selection of localized movement rules of members within a population could, in fact, promote the evolution of the selfish herd. Further, it has been shown that how the predator attacks plays a crucial role in whether or not selfish herd behavior can evolve. Trade-offs
Although the selfish herd promotes decreased predation risk to many of its members, a variety of risks have been associated with such aggregations. Groupings may make prey more conspicuous to predators and may increase intraspecific competition. Furthermore, individuals in the desired central positions may have lower feeding rates and may be less vigilant. Examples

An extensively studied example is the fiddler crab. When exposed to a predator, fiddler crabs move in ways that are consistent with the selfish herd theory. Dispersed groups are more likely to form an aggregate when subjected to danger and crabs attempt to run toward the center of a forming group. Selfish herd behavior is seen also in:

 Fish, such as minnows, school to reduce predation risk. Adelie penguins frequently wait to jump into the water until they have formed an aggregate to protect themselves from seal predation. Redshanks in widely spaced groupings are 35% more likely to be targeted by sparrowhawk predators. Mammals that inhabit open plains typically form aggregations likely to be associated with reduced predation risk. Sheep move to the centre of the herd upon the presence of a predator. Gregarious caterpillars, such as of the forest tent moth, always forage in groups to reduce predation risk. Limitations

Although the selfish herd theory is widely accepted, it has been deemed implausible in certain situations. It may not fully account for aggregations in 3-dimensional space, in which predatory attacks may come from above or below. This means that the grouping behavior of flying birds and some aquatic animals is unlikely to be explained by the selfish herd theory. The theory may require complex movement rules that are too difficult for an animal to follow. Other mechanisms have been proposed to better explain the grouping behavior of animals, such as the confusion hypothesis. Research has indicated that this hypothesis is more likely in small groups (2-7 members), however, and that further increasing group size has little effect. References

Ethology