Optimal foraging theory (OFT) is a behavioral ecology model that helps predict how an animal behaves when searching for food. Although obtaining food provides the animal with energy, searching for and capturing the food require both energy and time. To maximize fitness, an animal adopts a foraging strategy that provides the most benefit (energy) for the lowest cost, maximizing the net energy gained. OFT helps predict the best strategy that an animal can use to achieve this goal.

OFT is an ecological application of the optimality model. This theory assumes that the most economically advantageous foraging pattern will be selected for in a species through natural selection. When using OFT to model foraging behavior, organisms are said to be maximizing a variable known as the currency, such as the most food per unit time. In addition, the constraints of the environment are other variables that must be considered. Constraints are defined as factors that can limit the forager's ability to maximize the currency. The optimal decision rule, or the organism's best foraging strategy, is defined as the decision that maximizes the currency under the constraints of the environment. Identifying the optimal decision rule is the primary goal of the OFT.Sinervo, Barry (1997). "Optimal Foraging Theory: Constraints and Cognitive Processes" , pp. 105–130 in Behavioral Ecology. University of California, Santa Cruz. The connection between OFT and biological evolution has garnered interest over the past decades. Studies on optimal foraging behaviors at the population level have utilized evolutionary birth-death dynamics models. While these models confirm the existence of objective functions, such as "currency" in certain scenarios, they also prompt questions regarding their applicability in other limits such as high population interactions.

Building an optimal foraging model An optimal foraging model generates quantitative predictions of how animals maximize their fitness while they forage. The model building process involves identifying the currency, constraints, and appropriate decision rule for the forager.Stephens, D. W. and Krebs, J. R. (1986) "Foraging Theory" . 1st ed. Monographs in Behavior and Ecology. Princeton University Press. .

Currency is defined as the unit that is optimized by the animal. It is also a hypothesis of the costs and benefits that are imposed on that animal.Krebs, J. R. and Davies, N. B. (1989) An Introduction to Behavioral Ecology. 4th ed. Oxford: Blackwell Scientific Publications. For example, a certain forager gains energy from food, but incurs the cost of searching for the food: the time and energy spent searching could have been used instead on other endeavors, such as finding mates or protecting young. It would be in the animal's best interest to maximize its benefits at the lowest cost. Thus, the currency in this situation could be defined as net energy gain per unit time. However, for a different forager, the time it takes to digest the food after eating could be a more significant cost than the time and energy spent looking for food. In this case, the currency could be defined as net energy gain per digestive turnover time instead of net energy gain per unit time. Furthermore, benefits and costs can depend on a forager's community. For example, a forager living in a hive would most likely forage in a manner that would maximize efficiency for its colony rather than itself. By identifying the currency, one can construct a hypothesis about which benefits and costs are important to the forager in question.

Constraints are hypotheses about the limitations that are placed on an animal. These limitations can be due to features of the environment or the physiology of the animal and could limit their foraging efficiency. The time that it takes for the forager to travel from the nesting site to the foraging site is an example of a constraint. The maximum number of food items a forager is able to carry back to its nesting site is another example of a constraint. There could also be cognitive constraints on animals, such as limits to learning and memory. The more constraints that one is able to identify in a given system, the more predictive power the model will have.

Given the hypotheses about the currency and the constraints, the optimal decision rule is the model's prediction of what the animal's best foraging strategy should be. Possible examples of optimal decision rules could be the optimal number of food items that an animal should carry back to its nesting site or the optimal size of a food item that an animal should feed on. Figure 1, shows an example of how an optimal decision rule could be determined from a graphical model. The curve represents the energy gain per cost (E) for adopting foraging strategy x. Energy gain per cost is the currency being optimized. The constraints of the system determine the shape of this curve. The optimal decision rule (x*) is the strategy for which the currency, energy gain per costs, is the greatest. Optimal foraging models can look very different and become very complex, depending on the nature of the currency and the number of constraints considered. However, the general principles of currency, constraints, and optimal decision rule remain the same for all models.

To test a model, one can compare the predicted strategy to the animal's actual foraging behavior. If the model fits the observed data well, then the hypotheses about the currency and constraints are supported. If the model does not fit the data well, then it is possible that either the currency or a particular constraint has been incorrectly identified.

Different feeding systems and classes of predators Optimal foraging theory is widely applicable to feeding systems throughout the animal kingdom. Under the OFT, any organism of interest can be viewed as a predator that forages prey. There are different classes of predators that organisms fall into and each class has distinct foraging and predation strategies.

True predators attack large numbers of prey throughout their life. They kill their prey either immediately or shortly after the attack. They may eat all or only part of their prey. True predators include tigers, lions, whales, sharks and ants. Grazers eat only a portion of their prey. They harm the prey, but rarely kill it. Grazers include antelope, cattle, and mosquitoes. Parasites, like grazers, eat only a part of their prey (host), but rarely the entire organism. They spend all or large portions of their life cycle living in/on a single host. This intimate relationship is typical of tapeworms, liver flukes, plant parasites, such as the potato blight. Parasitoids are mainly typical of wasps (order Hymenoptera), and some flies (order Diptera). Eggs are laid inside the larvae of other arthropods which hatch and consume the host from the inside, killing it. This unusual predator–host relationship is typical of about 10% of all insects. Many viruses that attack single-celled organisms (such as bacteriophages) are also parasitoids; they reproduce inside a single host that is inevitably killed by the association.

The optimization of these different foraging and predation strategies can be explained by the optimal foraging theory. In each case, there are costs, benefits, and limitations that ultimately determine the optimal decision rule that the predator should follow.

Optimal diet model One classical version of the optimal foraging theory is the optimal diet model, which is also known as the prey choice model or the contingency model. In this model, the predator encounters different prey items and decides whether to eat what it has or search for a more profitable prey item. The model predicts that foragers should ignore low profitability prey items when more profitable items are present and abundant.

The profitability of a prey item is dependent on several ecological variables. E is the amount of energy (calories) that a prey item provides the predator. Handling time (h) is the amount of time it takes the predator to handle the food, beginning from the time the predator finds the prey item to the time the prey item is eaten. The profitability of a prey item is then defined as E/h. Additionally, search time (S) is the amount of time it takes the predator to find a prey item and is dependent on the abundance of the food and the ease of locating it. In this model, the currency is energy intake per unit time and the constraints include the actual values of E, h, and S, as well as the fact that prey items are encountered sequentially.

Model of choice between big and small prey

Using these variables, the optimal diet model can predict how predators choose between two prey types: big prey1 with energy value E1 and handling time h1, and small prey2 with energy value E2 and handling time h2. In order to maximize its overall rate of energy gain, a predator must consider the profitability of the two prey types. If it is assumed that big prey1 is more profitable than small prey2, then E1/h1 > E2/h2. Thus, if the predator encounters prey1, it should always choose to eat it, because of its higher profitability. It should never bother to go searching for prey2. However, if the animal encounters prey2, it should reject it to look for a more profitable prey1, unless the time it would take to find prey1 is too long and costly for it to be worth it. Thus, the animal should eat prey2 only if E2/h2 > E1/(h1+S1), where S1 is the search time for prey1. Since it is always favorable to choose to eat prey1, the choice to eat prey1 is not dependent on the abundance of prey2. But since the length of S1 (i.e. how difficult it is to find prey1) is logically dependent on the density of prey1, the choice to eat prey2 is dependent on the abundance of prey1.

Generalist and specialist diets

The optimal diet model also predicts that different types of animals should adopt different diets based on variations in search time. This idea is an extension of the model of prey choice that was discussed above. The equation, E2/h2 > E1/(h1+S1), can be rearranged to give: S1 > [(E1h2)/E2] – h1. This rearranged form gives the threshold for how long S1 must be for an animal to choose to eat both prey1 and prey2. Animals that have S1s that reach the threshold are defined as generalists. In nature, generalists include a wide range of prey items in their diet. An example of a generalist is a mouse, which consumes a large variety of seeds, grains, and nuts. In contrast, predators with relatively short S1s are still better off choosing to eat only prey1. These types of animals are defined as specialists and have very exclusive diets in nature. An example of a specialist is the koala, which solely consumes eucalyptus leaves. In general, different animals across the four functional classes of predators exhibit strategies ranging across a continuum between being a generalist and a specialist. Additionally, since the choice to eat prey2 is dependent on the abundance of prey1 (as discussed earlier), if prey1 becomes so scarce that S1 reaches the threshold, then the animal should switch from exclusively eating prey1 to eating both prey1 and prey2. In other words, if the food within a specialist's diet becomes very scarce, a specialist can sometimes switch to being a generalist.

Functional response curves

As previously mentioned, the amount of time it takes to search for a prey item depends on the density of the prey. Functional response curves show the rate of prey capture as a function of food density and can be used in conjunction with the optimal diet theory to predict foraging behavior of predators. There are three different types of functional response curves.