# Anti-predator adaptation

Anti-predator adaptations are mechanisms developed through evolution that assist prey organisms in their constant struggle against predators. Throughout the animal kingdom, adaptations have evolved for every stage of this struggle, namely by avoiding detection, warding off attack, fighting back, or escaping when caught.
The first line of defence consists in avoiding detection, through mechanisms such as camouflage, masquerade, apostatic selection, living underground, or nocturnality.
Alternatively, prey animals may ward off attack, whether by advertising the presence of strong defences in aposematism, by mimicking animals which do possess such defences, by startling the attacker, by signalling to the predator that pursuit is not worthwhile, by distraction, by using defensive structures such as spines, and by living in a group. Members of groups are at reduced risk of predation, despite the increased conspicuousness of a group, through improved vigilance, predator confusion, and the likelihood that the predator will attack some other individual.

## Avoiding detection
### Staying out of sight

Animals may avoid becoming prey by living out of sight of predators, whether in caves, burrows, or by being nocturnal. Nocturnality is an animal behavior characterized by activity during the night and sleeping during the day. This is a behavioral form of detection avoidance called crypsis used by animals to either avoid predation or to enhance prey hunting. Predation risk has long been recognized as critical in shaping behavioral decisions. For example, this predation risk is of prime importance in determining the time of evening emergence in echolocating bats. Although early access during brighter times permits easier foraging, it also leads to a higher predation risk from bat hawks and bat falcons. This results in an optimum evening emergence time that is a compromise between the conflicting demands. Another nocturnal adaptation can be seen in kangaroo rats. They forage in relatively open habitats, and reduce their activity outside their nest burrows in response to moonlight. During a full moon, they shift their activity towards areas of relatively dense cover to compensate for the extra brightness.

### Camouflage

Camouflage uses any combination of materials, coloration, or illumination for concealment to make the organism hard to detect by sight. It is common in both terrestrial and marine animals. Camouflage can be achieved in many different ways, such as through resemblance to surroundings, disruptive coloration, shadow elimination by countershading or counter-illumination, self-decoration, cryptic behavior, or changeable skin patterns and colour. Animals such as the flat-tail horned lizard of North America have evolved to eliminate their shadow and blend in with the ground. The bodies of these lizards are flattened, and their sides thin towards the edge. This body form, along with the white scales fringed along their sides, allows the lizards to effectively hide their shadows. In addition, these lizards hide any remaining shadows by pressing their bodies to the ground.

### Masquerade

Animals can hide in plain sight by masquerading as inedible objects. For example, the potoo, a South American bird, habitually perches on a tree, convincingly resembling a broken stump of a branch, while a butterfly, Kallima, looks just like a dead leaf.

### Apostatic selection

Another way to remain unattacked in plain sight is to look different from other members of the same species. Predators such as tits selectively hunt for abundant types of insect, ignoring less common types that were present, forming search images of the desired prey. This creates a mechanism for negative frequency-dependent selection, apostatic selection.

## Warding off attack

Many species make use of behavioral strategies to deter predators.

### Startling the predator

Many weakly-defended animals, including moths, butterflies, mantises, phasmids, and cephalopods such as octopuses, make use of patterns of threatening or startling behaviour, such as suddenly displaying conspicuous eyespots, so as to scare off or momentarily distract a predator, thus giving the prey animal an opportunity to escape. In the absence of toxins or other defences, this is essentially bluffing, in contrast to aposematism which involves honest signals.

### Pursuit-deterrent signals

Pursuit-deterrent signals are behavioral signals used by prey to convince predators not to pursue them. For example, gazelles stot, jumping high with stiff legs and an arched back. This is thought to signal to predators that they have a high level of fitness and can outrun the predator. As a result, predators may choose to pursue a different prey that is less likely to outrun them. White-tailed deer and other prey mammals flag with conspicuous (often black and white) tail markings when alarmed, informing the predator that it has been detected. Warning calls given by birds such as the Eurasian jay are similarly honest signals, benefiting both predator and prey: the predator is informed that it has been detected and might as well save time and energy by giving up the chase, while the prey is protected from attack.

### Playing dead

Another pursuit-deterrent signal is thanatosis or playing dead. Thanatosis is a form of bluff in which an animal mimics its own dead body, feigning death to avoid being attacked by predators seeking live prey. Thanatosis can also be used by the predator in order to lure prey into approaching.
An example of this is seen in white-tailed deer fawns, which experience a drop in heart rate in response to approaching predators. This response, referred to as "alarm bradycardia", causes the fawn's heart rate to drop from 155 to 38 beats per minute within one beat of the heart. This drop in heart rate can last up to two minutes, causing the fawn to experience a depressed breathing rate and decrease in movement, called tonic immobility. Tonic immobility is a reflex response that causes the fawn to enter a low body position that simulates the position of a corpse. Upon discovery of the fawn, the predator loses interest in the "dead" prey. Other symptoms of alarm bradycardia, such as salivation, urination, and defecation, can also cause the predator to lose interest.

### Distraction

Marine molluscs such as sea hares, cuttlefish, squid and octopuses give themselves a last chance to escape by distracting their attackers. To do this, they eject a mixture of chemicals, which may mimic food or otherwise confuse predators. In response to a predator, animals in these groups release ink, creating a cloud, and opaline, affecting the predator's feeding senses, causing it to attack the cloud.
Distraction displays attract the attention of predators away from an object, typically the nest or young, that is being protected, as when some birds feign a broken wing while hopping about on the ground.

### Mimicry and aposematism

Mimicry occurs when an organism (the mimic) simulates signal properties of another organism (the model) to confuse a third organism. This results in the mimic gaining protection, food, and mating advantages. There are two classical types of defensive mimicry: Batesian and Müllerian. Both involve aposematic coloration, or warning signals, to avoid being attacked by a predator.
In Batesian mimicry, a palatable, harmless prey species mimics the appearance of another species that is noxious to predators, thus reducing the mimic's risk of attack. This form of mimicry is seen in many insects. The idea behind Batesian mimicry is that predators that have tried to eat the unpalatable species learn to associate its colors and markings with an unpleasant taste. This results in the predator learning to avoid species displaying similar colours and markings, including Batesian mimics, which are in effect parasitic on the chemical or other defences of the unprofitable models. Some species of octopus can mimic a selection of other animals by changing their skin color, skin pattern and body motion. When a damselfish attacks an octopus, the octopus mimics a banded sea snake. The model chosen varies with the octopus's predator and habitat. Most of these octopuses use Batesian mimicry, selecting an organism repulsive to predators as a model.
In Müllerian mimicry, two or more aposematic forms share the same warning signals, as in viceroy and monarch butterflies. Birds avoid eating both species because their wing patterns honestly signal their unpleasant taste.

### Defensive structures

Many animals are protected against predators with armour in the form of hard shells (such as most molluscs and turtles), leathery or scaly skin (as in reptiles), or tough chitinous exoskeletons (as in arthropods).
A spine is a sharp, needle-like structure used to inflict pain on predators. An example of this seen in nature is in the sohal surgeonfish. These fish have a sharp scalpel-like spine on the front of each of their tail fins, able to inflict deep wounds. The area around the spines is often brightly colored to advertise the defensive capability; predators often avoid the Sohal surgeonfish. Defensive spines may be detachable, barbed or poisonous. Porcupine spines are long, stiff, break at the tip, and in some species are barbed to stick into a would-be predator. In contrast, the hedgehog's short spines, which are modified hairs, readily bend, and are barbed into the body, so they are not easily lost; they may be jabbed at an attacker.
Many species of slug caterpillar, Limacodidae, have numerous protuberances and stinging spines along their dorsal surfaces. Species that possess these stinging spines suffer less predation than larvae that lack them, and a predator, the paper wasp, chooses larvae without spines when given a choice.

## Safety in numbers

Group living can decrease the risk of predation to the individual in a variety of ways, as described below.

### Dilution effect

A dilution effect is seen when animals living in a group "dilute" their risk of attack, each individual being just one of many in the group. George C. Williams and W.D. Hamilton proposed that group living evolved because it provides benefits to the individual rather than to the group as a whole, which becomes more conspicuous as it becomes larger. One common example is the shoaling of fish. Experiments provide direct evidence for the decrease in individual attack rate seen with group living, for example in Camargue horses in Southern France. The horse-fly often attacks these horses, sucking blood and carrying diseases. When the flies are most numerous, the horses gather in large groups, and individuals are indeed attacked less frequently. Water striders are insects that live on the surface of fresh water, and are attacked from beneath by predatory fish. Experiments varying the group size of the water striders showed that the attack rate per individual water strider decreases as group size increases.

### Selfish herd

The selfish herd theory was proposed by W.D. Hamilton to explain why animals seek central positions in a group. The theory's central idea is to reduce the individual's domain of danger. A domain of danger is the area within the group in which the individual is more likely to be attacked by a predator. The center of the group has the lowest domain of danger, so animals are predicted to strive constantly to gain this position. Testing Hamilton's selfish herd effect, Alta De Vos and Justin O'Rainn (2010) studied brown fur seal predation from great white sharks. Using decoy seals, the researchers varied the distance between the decoys to produce different domains of danger. The seals with a greater domain of danger had an increased risk of shark attack.

### Predator satiation

A radical strategy for avoiding predators which may otherwise kill a large majority of the emerging stage of a population is to emerge very rarely, at irregular intervals. Predators with a life-cycle of one or a few years are unable to reproduce rapidly enough in response to such an emergence. Predators may feast on the emerging population, but are unable to consume more than a fraction of the brief surfeit of prey. Periodical cicadas, which emerge at intervals of 13 or 17 years, are often used as an example of this predator satiation, though other explanations of their unusual life-cycle have been proposed.

### Alarm calls

Animals that live in groups often give alarm calls that give warning of an attack. For example, vervet monkeys give different calls depending on the nature of the attack: for an eagle, a disyllabic cough; for a leopard or other cat, a loud bark; for a python or other snake, a "chutter". The monkeys hearing these calls respond defensively, but differently in each case: to the eagle call, they look up and run into cover; to the leopard call, they run up into the trees; to the snake call, they stand on two legs and look around for snakes, and on seeing the snake, they sometimes mob it. Similar calls are found in other species of monkey, while birds also give different calls that elicit different responses.

### Improved vigilance

In the improved vigilance effect, groups are able to detect predators sooner than solitary individuals. For many predators, success depends on surprise. If the prey is alerted early in an attack, they have an improved chance of escape. For example, wood pigeon flocks are preyed upon by goshawks. Goshawks are less successful when attacking larger flocks of wood pigeons than they are when attacking smaller flocks. This is because the larger the flock size, the more likely it is that one bird will notice the hawk sooner and fly away. Once one pigeon flies off in alarm, the rest of the pigeons follow. Wild ostriches in Tsavo National Park in Kenya feed either alone or in groups of up to four birds. They are subject to predation by lions. As the ostrich group size increases, the frequency at which each individual raises its head to look for predators decreases. Because ostriches are able to run at speeds that exceed those of lions for great distances, lions try to attack an ostrich when its head is down. By grouping, the ostriches present the lions with greater difficulty in determining how long the ostriches' heads stay down. Thus, although individual vigilance decreases, the overall vigilance of the group increases.

### Predator confusion

Individuals living in large groups may be safer from attack because the predator may be confused by the large group size. As the group moves, the predator has greater difficulty targeting an individual prey animal. The zebra has been suggested by the zoologist Martin Stevens and his colleagues as an example of this. When stationary, a single zebra stands out because of its large size. To reduce the risk of attack, zebras often travel in herds. The striped patterns of all the zebras in the herd may confuse the predator, making it harder for the predator to focus in on an individual zebra. Furthermore, when moving rapidly, the zebra stripes create a confusing, flickering motion dazzle effect in the eye of the predator.

## Fighting back

Defensive structures such as spines may be used both to ward off attack as already mentioned, and if need be to fight back against a predator. Methods of fighting back include chemical defences, mobbing, defensive regurgitation, and suicidal altruism.

### Chemical defences

Many prey animals, and to defend against seed predation also seeds of plants, make use of poisonous chemicals for self-defence. These may be concentrated in surface structures such as spines or glands, giving an attacker a taste of the chemicals before it actually bites or swallows the prey animal: many toxins are bitter-tasting. A last-ditch defence is for the animal's flesh itself to be toxic, as in the puffer fish, danaid butterflies and burnet moths. Many insects acquire toxins from their food plants; Danaus caterpillars accumulate toxic cardenolides from milkweeds (Asclepiadaceae).
Some prey animals are able to eject noxious materials to deter predators actively. The bombardier beetle has specialized glands on the tip of its abdomen that allows it to direct a toxic spray towards predators. The spray is generated explosively through oxidation of hydroquinones and is sprayed at a temperature of 100 °C. Armoured crickets similarly release blood at their joints when threatened (autohaemorrhaging). Several species of grasshopper including Poecilocerus pictus, Parasanaa donovani, Aularches miliaris, and Tegra novaehollandiae secrete noxious liquids when threatened, sometimes ejecting these forcefully. Spitting cobras accurately squirt venom from their fangs at the eyes of potential predators, striking their target eight times out of ten, and causing severe pain. Termite soldiers in the Nasutitermitinae have a fontanellar gun, a gland on the front of their head which can secrete and shoot an accurate jet of resinous terpenes "many centimeters". The material is sticky and toxic to other insects. One of the terpenes in the secretion, pinene, functions as an alarm pheromone. Seeds deter predation with combinations of toxic non-protein amino acids, cyanogenic glycosides, protease and amylase inhibitors, and phytohemagglutinins.
A few vertebrate species such as the Texas horned lizard are able to shoot squirts of blood from their eyes, by rapidly increasing the blood pressure within the eye sockets, if threatened. Because an individual may lose up to 53% of blood in a single squirt, this is only used against persistent predators like foxes, wolves and coyotes (Canidae), as a last defence. Canids often drop horned lizards after being squirted, and attempt to wipe or shake the blood out of their mouths, suggesting that the fluid has a foul taste; they choose other lizards if given the choice, suggesting a learned aversion towards horned lizards as prey.
The slime glands along the body of the hagfish secrete enormous amounts of mucus when it is provoked or stressed. The gelatinous slime has dramatic effects on the flow and viscosity of water, rapidly clogging the gills of any fish that attempt to capture hagfish; predators typically release the hagfish within seconds. Common predators of hagfish include seabirds, pinnipeds and cetaceans, but few fish, suggesting that predatory fish avoid hagfish as prey.

### Communal defence

In communal defence, prey groups actively defend themselves by grouping together, and sometimes by attacking or mobbing a predator, rather than allowing themselves to be passive victims of predation. Mobbing is the harassing of a predator by many prey animals. Mobbing is usually done to protect the young in social colonies. For example, red colobus monkeys exhibit mobbing when threatened by chimpanzees, a common predator. The male red colobus monkeys group together and place themselves between predators and the group's females and juveniles. The males jump together and actively bite the chimpanzees. Fieldfares are birds which may nest either solitarily or in colonies. Within colonies, fieldfares mob and defecate on approaching predators, shown experimentally to reduce predation levels.

### Defensive regurgitation

Some birds and insects use defensive regurgitation to ward off predators. The northern fulmar vomits a bright orange, oily substance called stomach oil when threatened. The stomach oil is made from their aquatic diets. It causes the predator's feathers to mat, leading to the loss of flying ability and the loss of water repellency. This is especially dangerous for aquatic birds because their water repellent feathers protect them from hypothermia when diving for food.
European roller chicks vomit a bright orange, foul smelling liquid when they sense danger. This repels prospective predators and may alert their parents to danger: they respond by delaying their return.
Numerous insects utilize defensive regurgitation. The eastern tent caterpillar regurgitates a droplet of digestive fluid to repel attacking ants. Similarly, larvae of the noctuid moth regurgitate when disturbed by ants. The vomit of noctuid moths has repellent and irritant properties that help to deter predator attacks.

### Suicidal altruism

An unusual type of predator deterrence is observed in the Malaysian exploding ant. Social hymenoptera rely on altruism to protect the entire colony, so the self-destructive acts benefit all individuals in the colony. When a worker ant's leg is grasped, it suicidally expels the contents of its hypertrophied submandibular glands, expelling corrosive irritant compounds and adhesives onto the predator. These prevent predation and serve as a signal to other enemy ants to stop predation of the rest of the colony.

## Escaping
### Flight

The normal reaction of a prey animal to an attacking predator is to flee by any available means, whether flying, gliding, falling, swimming, running, jumping, burrowing or rolling, according to the animal's capabilities. Escape paths are often erratic, making it difficult for the predator to predict which way the prey will go next: for example, birds such as snipe, ptarmigan and black-headed gulls evade fast raptors such as peregrine falcons with zigzagging or jinking flight. In the tropical rain forests of Southeast Asia in particular, many vertebrates escape predators by falling and gliding. Among the insects, many moths turn sharply, fall, or perform a powered dive in response to the sonar clicks of bats. Among fish, the stickleback follows a zigzagging path, often doubling back erratically, when chased by a fish-eating merganser duck.

### Autotomy

Some animals are capable of autotomy (self-amputation), shedding one of their own appendages in a last-ditch attempt to elude a predator's grasp or to distract the predator and thereby allow escape. The lost body part may be regenerated later. Certain sea slugs discard stinging papillae; arthropods such as crabs can sacrifice a claw, which can be regrown over several successive moults; among vertebrates, many geckos and other lizards shed their tails when attacked: the tail goes on writhing for a while, distracting the predator, and giving the lizard time to escape; a smaller tail slowly regrows.

## History of observations

Aristotle recorded observations (around 350 BC) of the antipredator behaviour of cephalopods in his History of Animals, including the use of ink as a distraction, camouflage, and signalling.
In 1940, Hugh Cott wrote a compendious study of camouflage, mimicry, and aposematism, Adaptive Coloration in Animals.
By the 21st century, adaptation to life in cities had markedly reduced the antipredator responses of animals such as rats and pigeons; similar changes are observed in captive and domesticated animals.