h1=1 #Handling time of prey type 1 (s)
h2=60 #Handling time of prey type 2 (s)
a2=0.05 #abundance of prey type 2 (ind/s)2 Economic models of behavior: do animals optimize?
🚧 This chapter is under construction. Content may change.
Animals have to make decisions all the time: where and when to move, when and what to eat, whom to mate, etc. How do animals make those decisions? One approach to study this question is to assume that animals take decisions that maximize their fitness. This approach is rooted in the idea that natural selection, under certain conditions, maximize the average fitness of individuals in a population. It underpins many of the studies in behavioral ecology, and lead to the development during the 1970’s and 1980’s of a sub-field dedicated to the study of foraging decisions, known as optimal foraging (see for instance Pyke 1984). The idea of optimal foraging is to develop economic models of foraging behavior, assessing the costs and benefits of different actions, and identifying in any particular circumstance the action that maximizes benefits and minimizes costs. This is, animals are seen as optimizer of decision-making. Here we consider models for two “idealized” types of foragers: searching predator and sit-and-wait predators.
2.1 Searching predator
The searching predator is typified as an animal that actively searchs for food. For instance, wolfs roam the landscape constantly searching for their prey (Figure 2.1). The question is then, any time that a forager comes across a prey whether to spend the time catching and eating it, or continuing to search for another prey, for instance a larger or easier prey item. Joan Roughgarden also liked this type of foraging to the sushi-bar problem where dishes are coming one after the other on a moving tray, and a person needs to decide whether to pick a given dish. This decision is particularly akin to the searching predator situation when one assumes that a person can have only one dish at a time in her or his table, We consider two types of searching predators: time minimizers and energy maximizers.
2.1.1 Time minimizer
Many searching predators are themselves preys to other animals. For instance shrews search for insects to eat, but can be themselves eaten by carnivores or owls. Therefore a reasonable assumption is that they are making foraging decisions that minimize the time foraging. Let’s assume there are two types of prey items, type 1 and 2. These two preys occur at different abundances in the environment, let’s name them \(a_1\) and \(a_2\). These abundances can be measured as encounter rates from the predator perspective, this is the number of prey items found per unit time. The two types of prey also have different handling times, this is the amount of time required to chase and process the prey, \(h_1\) and \(h_2\) . We also convention to call the type 1 prey the prey with the lowest handling time, i.e. \(h_1<h_2\),
A searching predator can adopt one of the following three strategies:
Strategy 1: to consume only prey items of type 1
Strategy 2: to consumer only prey items of type 2
Strategy 1&2: to consumer both types of prey
In order to find out which strategy should be adopted by the forager, one needs to calculate the average spent per food item in each of the strategies. For Strategy 1 the average time per item, \(T_1\) is the sum of the amount of time the predator needs to encounter a prey with the amount of time that it takes to process that prey. As the abundance is measured in encounter rates, i.e. prey items per unit time, the inverse of that is the waiting time for a prey. Therefore we have for Strategy 1,
\[T_1=1/a_1+h_1 \tag{2.1}\]
Similarly, for Strategy 2, the average time per item \(T_2\) is given by
\[T_2=1/a_2+h_2. \tag{2.2}\]
A more interesting case is Strategy 3. Here the waiting time is the inverse of the sum of the abundances of both times of prey, while the handling time is average of the handling times of both ypes of prey weighted by their relative abundance,
\[ T_{3}=\frac{1}{a_1+a_2}+\frac{a_1 h_1+a_2 h_2}{a_1+a_2} \tag{2.3}\]
We can now define the problem that the forager has to solve as to find the strategy \(i\) that minimizes \(T_i\):
\[ min(T_i) \quad \text{for} \quad i=1, 2, 3 \]
It is easy to demonstrate that Strategy 2 is always worse than Strategy 3, independently of the abundances of the two types of prey. This happens because Strategy 3 always implies a longer waiting time than the two other specialized strategies (i.e. one has to wait less time to find any item of an prey than items of a given prey time, \(1/(a_1+a_2)<1/a_2\)) and the handling time of strategy 3 can never be higher than the handling time of strategy 2 (it’s always a value betwen \(h_1\) and \(h_2\)). So we can exclude Strategy 2 from our analysis. The choice is then between Strategy 1, just taking items of the preferred prey item, and 3, taking items of both types of prey. Let’s assess this two strategies with a little bit of help from R. We start by assuming that the handling time of prey type 1 is 1 second while prey type 2 takes 60 seconds. Let’s also assume that the abundance of prey type 2 is 0.05 individuals per second, i.e. one individuals needs to wait in average 20 seconds to find prey type 2.
Let’s now plot the time per item of each of the strategies as a function of the abundance of the preferred prey.
a1<-seq(0.005,0.1,0.001) #abundance of prey time 1 (ind/s)
t1=1/a1+h1 #time per item of Strategy 1 (s)
t3=1/(a1+a2)+h1*a1/(a1+a2)+h2*a2/(a1+a2) #time per item of Strategy 2 (s)
plot(a1,t1, type="l", col="blue")
lines(a1,t3, type="l", col="red")
legend("topright",
legend = c("Strategy 1", "Strategy 3"), # Labels
col = c("red", "blue"), # Line colors
lwd = 2, # Line width
lty = 1) 
There is a critical threshold of the abundance of prey type 1 above which strategy 1 is preferrable, while below that threshold strategy 3 is the best strategy. Interestingly this threshold does not depend on the abundance of the less preferable prey. For instance, if we assume a low abundance of prey time 2 at 0.01, the resulting plot is:
a2 = 0.01
t1=1/a1+h1 #time per item of Strategy 1 (s)
t3=1/(a1+a2)+h1*a1/(a1+a2)+h2*a2/(a1+a2) #time per item of Strategy 2 (s)
plot(a1,t1, type="l", col="blue")
lines(a1,t3, type="l", col="red")
To determine this critical threshold one can compare the two vectors, T1 and T3, and find the first position at which T1 becomes smaller than T3,
pos=which(t1<t3)[1]
a1[pos][1] 0.017
So the critical threshold for these handling times occurs when \(a_1=0.017\) individuals per second.
2.1.2 Energy per time maximizer
Perhaps more often, animals try to maximize their energy yield (benefits) while minimizing the time foraging (costs). Or in another way of looking at it, they try to maximize their energy yield per unit time. We already know the time per item associated to each of the three strategies of the searching predator. We now need to caiculate the average energy yield per item. Consider now that the energy content of the prey items are \(e_1\) and \(e_2\) for prey of type 1 and 2, respectively. We define prey 1 as the preferred type of prey, so we assume that the ratio of the energic content (measured for instance in calories) to the handling time is higher for type 1 prey, i.e. \(e_1/h_1>e_2/h_2\). Now we calculate the energy yield per item for each strategy. We start with the energy content of the prey, but need to subtract the energy spent while waiting the prey and the energy spent chasing and processing the prey,
\[ E_1=e_1-ew*tw_1-eh*h_1 \tag{2.4}\]
where \(ew\) and \(eh\) are the energy spent per unit time while waiting for the prey and the energy spent per unit time while handling, respectively. They can both be measured for instance in cal/s. We already know from the time minimizer that the waiting time for the prey is the inverse of the abundance, \(tw_1=1/a_1\). Therefore substituting in Equation 2.4 we have
\[ E_1=e_1-\frac{ew}{a_1}-eh*h_1. \tag{2.5}\]
A similar expression can be written for Strategy 2, replacing 1 with 2 in Equation 2.4.
\[ E_2=e_2-\frac{ew}{a_2}-eh*h_2. \tag{2.6}\]
More interesting is to derive the expression for Strategy 3, where the foragers takes both types of prey. The energy content of the prey is the average of the energetic contents of each prey type, weighted by their abundances, \((e_1*a_1+e_2*a_2)/(a_1+a_2)\). The waiting time is the inverse of the sums of the abundances of preys of both types, as in Equation 2.3. The handling time is the average of the handling times of each prey type, weighted by their abundances. So we have,
\[ E_3=\frac{e_1*a_1+e_2*a_2}{a_1+a_2}-\frac{ew}{a_1+a_2}-eh\frac{h_1*a_1+h_2*a_2}{a_1+a_2}. \tag{2.7}\]
Finally we can calculate the energy per unit time for each strategy by dividing Equation 2.5 by Equation 2.1 for Strategy 1, dividing Equation 2.6 by Equation 2.2 for Strategy 2, and dividing Equation 2.7 by Equation 2.3 for strategy 3,
\[ ET_i=\frac{E_i}{T_i} \]
Similarly to the time minimizer, it’s possible to show mathematically that strategy 2 is never an optimal strategy. So the interesting comparison is again between strategy 1 and strategy 3. Let’s use R to plot the energy per time yield for both strategies. We start by setting the parameter values of our model with some realistic numbers.
e1<-10 #Caloric content of prey 1
e2<-100 #Caloric content of prey 2
h1<-1 #Handling time of prey 1
h2<-60 #Handling time of prey 2
ew<-1 #Energy spend per unit time while waiting (cal/s)
eh<-1 #energy spend per unit time handling the prey (cal/s)We will examine the energy yields for strategy 1 and strategy 3 for a fixed abundance of prey type 2 and a sequence of abundances of prey type 1 from 0.005 individuals per second to 0.5 individuals per second
a1<- seq(0.005,0.5,0.001) #Sequence of abundances of prey 1
a2<-0.05With the parameter and abundance values defined, we can calculate \(E_1\), \(E_3\), \(T_1\), \(T_3\), and then \(ET_1\) and \(ET_3\) based on the equations above, resulting in vectors for these variables with each entry in the vector corresponding to an abundance value in the vector of abundances a1.
E1 = e1 -(eh*h1) - ew/a1 #energy per item of Strategy 1 (s)
E3 = (e1*a1+e2*a2)/(a1+a2)-
eh*(h1*a1+h2*a2)/(a1+a2)-ew/(a1+a2) #energy per item of Strategy 3 (s)
T1=1/a1+h1 #time per item of Strategy 1 (s)
T3=1/(a1+a2)+h1*a1/(a1+a2)+h2*a2/(a1+a2) #time per item of Strategy 3 (s)
ET1 = E1/T1 #energy per time of strategy 1
ET3 = E3/T3 #energy per time of strategy 3Next we plot the energy yields against the values of abundance of prey of type 1, and add a nice legend:
plot(a1,ET1,type="l",xlab="Abundance of prey 1", ylab="Energy per time", col="blue")
lines(a1,ET3,type="l",col="red")
legend("topright",
legend = c("Strategy 1", "Strategy 3"), # Labels
col = c("red", "blue"), # Line colors
lwd = 2, # Line width
lty = 1) 
Similarly to the the time minimizer, for the energy maximizer there is also a critical threshold of the abundance of prey type 1 above which strategy 1 is preferrable, while below that threshold strategy 3 is the best strategy.
2.2 Sit-and-wait predator
In contrast to the searching predator, the sit-and-wait predator forages by patiently ambushing its prey. For instance, the lizard Anolis gingivinus (Figure 2.2) waits in a perch, often a tree trunk, for a prey to come into its reach, sprinting then down the trunk or into the ground to capture its prey, returning then to its perch again. So here the decision that the predator has to take after seeing the prey is whether it should run an capture the prey or if it should ignore it.
We will build on the model we developed for the energy per time maximizer searching predator to develop a model for the decisions of the sit-and-wait predator. The energy per prey item consumed is,
\[ E=e-e_p t_p-e_w t_w \tag{2.8}\]
where \(e_p\) is the energy per unit time while pursuing the prey, \(t_p\) is the average time it takes to sprint to the prey and come back to the perch, \(e_w\) is the energy per unit time while waiting for the prey, and \(t_w\) is the average time it takes to wait for a prey item to show up within the home-range or territory of the predator. We will use these two terms interchangeably, although they are sometimes used in the literature differently.
Let’s consider that the home-range of the lizard is shaped as a semi-circle centered in the perch. This is the lizard has a viewing angle of \(180\deg\) from its perch (Figure 2.3). Then the total abundance of the the prey in the territory is the integral of the prey point density over the territory. So, using polar coordinates for the integral this can be written as,
\[ A=\int_{0}^{r_c}a \pi r dr \tag{2.9}\]
This is an easy integral, but let’s see how we could solve it in R, as this will be handy for the next integral. We can do symbolic math in R using the package Ryacas. Ryacas provides an interface to Yacas, Yet Another Computer Algebra System. We use ysim() to tell Yacas to integrate the product \(a \ \pi \ r\) from 0 to \(r_c\) with the function integrate(),
library(Ryacas)
A=ysym("Integrate(r, 0, rc) a * Pi * r")Often we would like to see mathematical equations beautifully typeset. This can be done using TeX, and Ryacas does provide a way for layout the equation as a TeX command. However, for Quarto to recognize a TeX command, we need to start it and close it with a “$$”. As we will be doing this a lot, I wrote a little function, tex_quarto, that does this and also takes an optional prefix that can be put in the beginning (e.g. the variable name and an identity sign).
tex_quarto = function (x, prefix=NULL)
cat("$$", prefix, tex(x), "$$")Now, we can output the result of the integral from Equation 2.9 in a beautiful way as1,
tex_quarto(A, "A=")\[ A= \frac{rc ^{2} a \pi }{2} \]
The waiting time is just the inverse of the total abundance, \[t_w=1/A\] or in R code,
tw=1/A
The average pursuit time is a bit more complicated. For a prey landing at distance \(r\) from the predator, the pursuit time is the time the lizards needs to run to that location and back. This is can be calculated by dividing the double of the distance by the speed of the lizard, \(2r/v\). We have now to average these sprint times over the range of possible distance that the lizard can run, from 0 to the radius of its territory \(r_c\), weighted by the probability of a prey appearing at each distance. The probability of a prey appearing at distance \(r\) is the length of the semi-circle with radius \(r\) multiplied by the point density of prey divided by the total density of prey in the territory of the lizard, \(a \pi r / A\). So we now need to calculate the integral of the sprint times at each distance times the probability of running to a prey at that distance over the range of possible radius values,
\[ t_p=\int_{0}^{r_c} \frac{2r}{v} \frac{a \pi r}{A} \ dr \]
Let’s calculate this more complicated integral in R, substituting the value of the total abundance that we calculated above using the function with_value(), and simplifying the result with simplify(),
tp=ysym("Integrate(r, 0, rc) (2 * r / v) * (a * Pi * r) / A")
tp = with_value(tp, ysym("A"), A) |> simplify()
tex_quarto(tp, "t_p=")\[ t_p= \frac{4 rc}{3 v} \]
The average time per prey item consumed is simply the sum of the average pursuit time, \(t_p\), and the average waiting time \(t_w\),
\[ T=t_p+t_w \tag{2.10}\]
Therefore the energy per time that the optimal sit-and-wait predator wants to maximize is obtained by dividing Equation 2.8 by Equation 2.10,
\[ ET(r_c)=\frac{e-e_p t_p(r_c)-e_w t_w(r_c)}{t_p(r_c)+t_w(r_c)} \]
where we highlighted that the wating time and the pursuit time are functions of the territory size or cut-off radius \(r_c\). Let’s calculate this expression in R,
ET=ysym("(e-ep*tp-ew*tw)/(tp+tw)")
ET=with_value(ET,ysym("tp"),tp)
ET=with_value(ET,ysym("tw"),tw)
simplify(ET)y: (3*e*rc^2*v*a*Pi-4*ep*rc^3*a*Pi-6*v*ew)/(2*(2*rc^3*a*Pi+3*v))
Let’s plot the energy per time as a function of the territory size. We have to start by giving some values to the different paramerters.
ew=0.1
ep=1
v=0.5
a=0.005
e=10Next we convert the yacas expresssion for ET into a R expression using yac_expr() and then write a function that evaluates that R expression for a given value of rc,
ET_expr = yac_expr(ET)
ETfun <- function(rc)
eval(ET_expr)We can now produce the plot by creating a vector with a range of values for \(r_c\) and then plotting the function ETfun,
rc<-seq(0.001,4,0.001) #Radius of the hunting ground
plot(rc,ETfun(rc),type="l",
xlab="Radius of the territory",
ylab="Energy per unit of time (cal/sec) ")
abline(0,0)
This plot shows that the energy per time, \(ET\) is a uni-modal function of the territory size \(r_c\). At zero radius, the energy per time is negative and equals the energy per unit of time while waiting, i.e. there are only costs and no benefits of the territory. As the territory size increases, the energy per time starts to increase and becomes positive, reaching a maximum value at a bit more than 2m for the parameters above. Then, as the costs of running very far to chase prey start exceeding the benefits, the energy per unit time declines again.
The optimal decision is to find the cut-off radius \(r_c\) that maximizes the energy per time,
\[ \max_{r_c}(ET) \]
We can find the analytical solution of the maximum by differentiating ?eq-maxet in order to the cut-off radius and equalizing it to zero,
\[ \frac{\mathrm{d}ET}{\mathrm{d}r_c}=0 \]
This means that we try to find the place in which the tangent to the function has slope zero, i.e. it is horizontal. This can be the maximum or the minimum of a function, and often one has to investigate further by looking at the sign of the second derivative, but not in this case. So, let’s solve this in R,
dET = deriv(ET,"rc")
rcopt=solve(dET, "rc")
simplify(rcopt){rc-(((-243*((-3)*e*v^3*a^6*Pi^6)^2*e*v^4*a^5*Pi^5)/(54*((-3)*e*v^3*a^6*Pi^6)^3)-Sqrt(((-3*e*v^3*a^6*Pi^6*((-6)*ep*v^3*a^5*P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6)^2*e*v^4*a^5*Pi^5)/(54*((-3)*e*v^3*a^6*Pi^6)^3))^2)-(9*((-3)*e*v^3*a^6*Pi^6)^2*e*v^4*a^5*Pi^5)/(2*((-3)*e*v^3*a^6*Pi^6)^3))^(1/3)-((-243*((-3)*e*v^3*a^6*Pi^6)^2*e*v^4*a^5*Pi^5)/(54*((-3)*e*v^3*a^6*Pi^6)^3)-Sqrt(((-3*e*v^3*a^6*Pi^6*((-6)*ep*v^3*a^5*Pi^5+6*v^3*ew*a^5*Pi^5))/((-3)*e*v^3*a^6*Pi^6)^2)^3+((-243*((-3)*e*v^3*a^6*Pi^6)^2*e*v^4*a^5*Pi^5)/(54*((-3)*e*v^3*a^6*Pi^6)^3))^2))^(1/3)))==0}
If you wanna read about an empirical test of this model, I suggest the paper by Shaffir and Rougharden (1998).
2.3 Does natural selection maximizes fitness?
Animals do not solve mathematical equations, at least in the way we do. So, how can animals find this optimal home-range sizes or choose the optimal strategy? One way of doing this is by learning, and there are simple models of reinforcement learning that can produce decisions that are optimal (see for instance Roughgarden (1998)). Another way is through natural selection and evolutionary processes. The importance of evolution in shaping animal behavior was at the core of the research of Karl von Frisch, Konrad Lorenz and Nikolaas Tinbergen, who received the Nobel Prize in Physiology or Medicine in 1973. These three scientists played a key role in developing the science of ethology, the comparative study of behavior across species and ecological contexts. Until their work, studies of behavior were focusing on the dichotomy between stimulus-response behavior or the idea of the idea of learning as an explanation to all behavioral variations. Lorenz and Tinbergen’s work showed that fixed action patterns observed in many animals were the response to particular stimuli and were done without any previous learning. Lorenz and Timbergen often worked with birds, but my favorite fixed action patterns are the pushup displays of Anolis in response to predators or the presence of conspesifics. von Frish discovered the “bee language”, this is, how foraging bees communicate to nestmates upon their return to the nest the location of nectar an pollen resources.
So the idea that some behaviors are genetically “programmed” allows us to model the dynamics of behavior acquisition in a population of individuals, and explore the question of whether natural selection maximizes fitness. We consider a very simple model of one genetic loci with two alleles in [for a diplod model see for instance Roughgarden et al]
Simple models of population genetics for frequency independent selection.
main theorem of natural selection and climbing the fitness landscape or Fisher’s fundamental theorem-
This approach is rooted in the idea that natural selection, under certain conditions, maximizes the average fitness of individuals in a population.
2.4 Statistical confrontation: finding the maximum
- Explain how to find the maximum of a function with R. Parallel between genetic algorithms and optimization.
Note that this only displays the typeset equation when you render the Quarto document into html or PDF, and it is not shown directly on the notebook output mode. You also need to add the command “#| output: asis” in the beginning of the R chunk to tell Quarto it needs to take the output literally.↩︎