Successful acquisition of resources is essential to an individual’s survival and reproduction. The acquisition problem is especially challenging in seasonal or otherwise dynamic landscapes where the spatial location of resources changes over time. This absence of consistently available resources leaves consumers with several options. Consumers may track the shifting positions of resources that themselves move across the landscape, they may move to other regions to take advantage of different resources, or they may stay local but switch to alternative resources. Each of these foraging strategies requires that consumers monitor resource availability and respond through movement or changes in feeding style. However, many routes to resource monitoring and movement decision-making exist, and different strategies are unlikely to exhibit the same level of profitability with regard to resource acquisition (Grünbaum 1998). Historically, researchers working on foraging-related movement have sought to understand the contributions of three elements: search strategies, behavioral changes, and cues for movement. Here, we bring together these three elements in a synthetic approach that investigates how consumers’ responses to alternative ‘resource gradients’ translate into foraging success.

As consumers seek out resources, they can employ a wide variety of search strategies. Some of these strategies operate on large scales and are long-term in nature. For example, some birds and ungulates ‘surf the green wave’ as they time their migratory journeys to match seasonal changes in the availability of palatable, nutrient-rich resources as functions of latitude or elevation (Aikens et al. 2020). In other taxa, such as some Brazilian marsupials, perceptual range plays a key role in determining whether the animals move randomly (when no forest was nearby) or in a directed fashion (when they could perceive a nearby forest patch) (Prevedello et al. 2011). Similarly, Holdo et al. (2009) found that long-distance perception that allowed tracking of conditions over large spatial scales was crucial to the success of wildebeests’ migratory journeys in the Serengeti and attention solely to small-scale gradients was insufficient for migratory success. In contrast, blue whales appear to rely not on perception per se, but rather on spatial memory as they migrate. The whales time their patterns of space use to exploit those regions in which resources have been both on average abundant and reliably available over many years (Abrahms et al. 2019; Fagan 2019).

Evidence suggests that such search strategies do not exist in isolation, but rather are used by consumers in different combinations, often as a function of context. With regard to switching between search strategies, a key tension is between searching for new resources and not wandering too far. This is particularly important when resources are spatiotemporally heterogeneous. Mathematically, this tension can appear as a balance between random search (diffusion) and range residency (movement with a central tendency) as animals switch between movement modes as a function of their spatial context. A growing list of empirical examples demonstrates that such context-dependent behavioral switching between movement modes is quite widespread. A few examples include mosquitoes (Raji and DeGennaro 2017), tuna (Newlands et al. 2004), opossums (Prevedello et al. 2011), elk (Morales et al. 2004), and woodpeckers (Vergara et al. 2019). Moreover, robust statistical tools are increasingly available for deconstructing empirical movement paths into alternative movement modes and identifying behavioral change points (Morales et al. 2004; Gurarie et al. 2009, 2016). Key open questions center on the factors that precipitate such changes in behavior and how different forms of context-dependent switching influence resource acquisition.

To some degree, modeling studies have also explored the consequences of combining movement modes in various mixtures. Frequently, diffusion (random search) and advection (gradient following) are explored together, often with the goal of identifying optimally blended movement strategies that yield evolutionarily stable strategies (Cantrell et al. 2008, 2018, 2020; Lam and Lou 2014). Other modeling studies have directly considered switching between alternative movement modes; that is, they explored situations where, rather than simultaneously blending two movement modes, individuals could be considered to be in either one movement mode or another. Skalski and Gilliam (2003) explored how switching between slow and fast movement states (which occurred independent of spatial context) influenced a population’s spatial distribution. More recently, Tyson et al. (2011) considered spatially independent behavioral switching terms for a model where foragers had both fast-moving diffusive and slow-moving advective–diffusive states. They found that single-movement-mode models (in which the forager population was homogeneously diffusive or advective–diffusive) provided a worse fit to data for both caribou and honeybees than did the model with behavioral switching. Different types of intermittent movement (Gleiss et al. 2011), especially so-called burst-and-coast movement by fish (Kramer and McLaughlin 2001; McLaughlin and Grant 2001), provide yet more examples in which animals sequentially switch between movement types. Burst movement is thought to provide rapid propulsion that alternates with coast movement during which fish can better perceive their surroundings. Fagan et al. (2020) analyzed a model in which switching between movement modes depended on spatial context. They found that behavioral switching was most beneficial when an organism’s gradient-following abilities were weak compared to its overall capacity for movement. Moreover, they found that an organism’s perceptual range was a key determinant of whether behavioral switching was advantageous or disadvantageous in the search for resources.

Just as different movement strategies and opportunities for switching between strategies present consumers with a range of options for mobility, so too do the proximal cues on which resource-related movement decisions are based. For example, Dusenberry (1998) demonstrated that free-swimming bacteria can be differentially advantaged by using temporal gradients versus spatial gradients in their quest for resources. In that system, movements based on following temporal gradients were especially valuable in providing superior access to resources when those resources were at low densities. In another example, numerous species of tropical frugivorous birds appear to track temporal changes in fruit abundance, shifting their spatial activity in response to increases and decreases in fruit abundance (Loiselle and Blake 1991). In other cases, following spatial rather than temporal gradients appears essential to success, and small-scale spatial gradients are particularly useful for consumers that rely on chemosensation. For example, catfish follow centimeter-scale spatial (rather than temporal) gradients in nutrient concentration as they seek out resources (Johnson and Teeter 1980). Similarly, rats effectively ‘smell in stereo’ as they respond to highly localized bilateral differences in the concentration of odorants (Rajan et al. 2006), whereas moles combine serial scent detection (i.e., repeated ‘sniffing’) with bilateral olfaction to identify the gradients that guide their search for resources (Catania 2013).

Here, we seek to synthesize these three factors (i.e., alternative search strategies, switching between movement modes, and diverse cues for movement) into a single modeling framework to explore in detail how these features influence the abilities of consumers to track and match the spatiotemporal distribution of resources in dynamic landscapes. Intriguingly, we find that different search-movement strategies perform best under different resource situations, suggesting conditions under which alternative resource dynamics might select for the evolution of alternative foraging strategies.


A dynamic resource

We will assume a one-dimensional binary resource landscape of habitat patches and non-habitat that is temporally dynamic. Fagan et al. (2017) explored how alternative resource functions influence the ability of consumers to match the distribution of their resources. Here, we consider one of the resource functions studied in that paper, the Pulsed Gaussian resource:

$$m(x,t)=\frac{1}{\sqrt{2\pi }\sigma }\mathrm{exp}\left(-\frac{(x-\mu {)}^{2}}{2{\sigma }^{2}}\right)\hspace{0.17em}{\mathrm{sin}}^{2}(\omega \hspace{0.17em}t/2)$$

where μ and σ are, respectively, the mean and standard deviation of the resource pulse and \(\omega\) is the temporal frequency of the pulse. Equation (1) corresponds to a resource patch with smoothly varying edges that does not change position spatially but does increase and decrease in abundance over time.

We consider situations in which there either is a single resource patch that pulses in time or two identical pulsing resource patches that are shifted by half a period relative to one another. The latter scenario corresponds to a strongly seasonal landscape where there exists opportunity for migration to emerge between the two resource patches that are oscillating out-of-phase.

Consumers switch between random search and range-residency

Living on this dynamic resource landscape is a population of consumers. We consider a population in which the consumers can switch between two distinct modes of dispersal. Tyson et al. (2011) and Fagan et al. (2019) explored scenarios in which consumers switch between a random search mode and a mode in which there exists movement in response to a resource gradient. Here, motivated by recent developments in the statistical analysis of animal tracking data (Fleming et al. 2014; Noonan et al. 2019), we do something a bit different. Specifically, we consider the spatial dynamics of consumers that may have home ranges, but which can switch between a random search mode and a range-resident mode. Note that this pair of movement modes is different than the pair of modes involved in chemotaxis (Keller and Segel 1971) and area-restricted search models (Kareiva and Odell 1987). In those cases, organisms can switch between random turning (employed within a resource patch) and ballistic motion (a tendency to move in a straight line, employed between resource patches). Here, motivated by recent studies on some vertebrate species (Prevedello et al. 2011; Tyson et al. 2011), our foragers use random motion between resource patches and their more sophisticated (and more spatially intensive) movement mode (here, home ranging) in the vicinity of resource patches.

To build our model of movement, we assume that the density of the population engaged in diffusive (random search) behavior at position x and time t is denoted u(x,t), and the density engaged in range-resident behavior is denoted v(x,t). We write

$$\begin{aligned}\frac{\partial u(x,t)}{\partial t} &= \overset{\begin{array}{c}random \\ search\end{array}}{\overbrace{D \frac{\partial^2}{\partial x^2}u}} - \overset{\begin{array}{c}switching \, from \\ random \; search\end{array}}{\overbrace{\alpha (x,t)u}} + \overset{\begin{array}{c}switching \, to \\ random \; search\end{array}}{\beta (x,t) v} \\\frac{\partial v (x,t)}{\partial t} &= \begin{bmatrix} \overbrace{\overset{\begin{array}{c}low \, level \\ random \\ movement\end{array}}{\overbrace{\varepsilon \frac{\partial^2}{\partial x^2}v}}+\overset{\begin{array}{c}home \, ranging \\ central \, tendency\end{array}}{\overbrace{\theta \frac{d}{dx}((x-\mu)v)}}} \end{bmatrix} \\ & \quad + \overset{\begin{array}{c} switching \, to \\ range \\ residency \end{array}}{\overbrace{\alpha (x,t)u}} - \overset{\begin{array}{c} switching\ from \\ range \\ residency \end{array}}{\overbrace{\beta (x,t)v}}\end{aligned}$$

where the parameter D is the rate of diffusion undertaken by the portion of the population that is in the random search mode. The functions \(\alpha \left(x,t\right)\) and \(\beta \left(x,t\right)\), defined below, are generic functional forms for the rates of switching between the random-search and range-resident movement modes. The term

$$\varepsilon \frac{{\partial }^{2}}{\partial {x}^{2}}v+\theta \frac{d}{dx}\left(\left(x-\mu \right)v\right)$$

represents the overall movement of the portion of the population engaged in range resident behavior. In Eq. (3), \(\varepsilon \ll 1\) represents a small amount of background random movement (this is necessary for certain theorems about partial differential equations to hold true), and \(\theta\) quantifies the rate of mean reverting (home ranging) movement. The term \(\mu\) (from Eq. (1)) represents the consumers’ ‘attractive target.’ This corresponds to the center of the resource patch in scenarios where there is only a single, fluctuating area with resources. This location \(\mu\) could also be thought of as the location of a den or nest site. In more complicated scenarios, \(\mu\) could be generalized to a function μ \(\left[\bullet \right]\) that allows for more than one attractive target, and these could correspond to the physical centers of multiple or temporally oscillating resource patches. In other scenarios, where consumers are able to distinguish resource habitat from non-habitat, but where perception is limited and the physical center of a resource patch may not be detectable, the attractive target could correspond to a location with favorable conditions inside the patch at the limit of detection.

Six scenarios for switching between movement modes

To explore the interplay between movement modes, search strategies, and cues for movement, we focus on the switching functions \(\alpha \left(x,t\right)\) and \(\beta \left(x,t\right)\) and the impacts that these terms have on the ability of the consumers to track their resources. To explore the importance of the context of behavioral switching, we simplify other aspects of the model, and depart from previous treatments in Fagan et al. (2017, 2020) and Gurarie et al. (2021). We consider six different scenarios, of increasing complexity, in which different considerations govern the consumers’ switching between random movement and home-ranging behavior. All six of these scenarios, which range from simple density dependence through more complicated situations involving perception or spatial memory, have either been utilized previously in theoretical studies of animal movement or discussed verbally in papers on animal movement and decision-making behavior (e.g., Noonan et al. 2019; Abrahms et al. 2019; Aikens et al. 2020).

Scenario 1: switching depends on consumer density

In this scenario, we assume that consumers change between the random search and range resident behavior only as a function of their own density. That is, these consumers are not able to detect or react to changes in resource availability (in space, or in time) but they can tell when they are crowded, and switch behaviors as functions of the density of their conspecifics.We write.

$${\alpha }_{S1}\left(x,t\right)=\left\{\begin{array}{l} s\text{ if }u+v>{w}_{0}\\ 0\text{ if }u+v\le {w}_{0}\end{array}\right.,$$

which means that consumers will switch from random search mode to range resident mode at rate \(s\) if the local total consumer density (\(u+v\)) exceeds a threshold value, \({w}_{0}\), and will otherwise remain in random search mode. Similarly,

$${\beta }_{S1}\left(x,t\right)=\left\{\begin{array}{l} 0\text{ if }u+v>{w}_{0}\\ s\text{ if }u+v\le {w}_{0}\end{array}\right.,$$

such that consumers will switch from range residency to random search mode at rate \(s\) if the local total consumer density (\(u+v\)) remains below a threshold value, \({w}_{0}\), and will otherwise remain in range resident mode. For simplicity, we will consider the switching rates in Eqs. (4)–(5) to be the same, but these could certainly differ as a function of the consumers’ current behavioral mode, as could the threshold density for switching between movement modes.

These assumptions correspond roughly to assumptions of the ‘local enhancement’ framework for seabirds foraging from colonies (Buckley 1997). Likewise, there are conceptual connections to results described in Cvikel et al. (2015) and Egert-Berg et al. (2018), wherein bats cue in on the location of their own kind in determining where to forage. However, the model does not lead to aggregation on conspecifics per se (unless \(\theta =0\)). Instead, the model would be better interpreted as representing aspects of social learning with discovery. To see this, consider the subpopulation with density \(u\) as ‘uninformed about resources’ and the subpopulation with density \(v\) as ‘informed.’ Then, note that \(v\left(x,0\right)=0\ \mathrm{and}\ u\left(x,0\right)= {u}_{0}\) is an equilibrium if \({u}_{0}< {w}_{0}\). If the model starts with \(v=0\) and u small everywhere, then the system will tend to stay with \(v=0.\) However, if initially, u is sufficiently large somewhere, then some u will switch to v. As the subpopulation with density v gets concentrated near \(\mu\), the switching rate might then favor further increase in v and further concentrate the population near \(\mu\). Modifying the movement mechanism to include actual aggregation on the density of conspecifics might produce a more concentrated population density on a smaller home range, but it is not clear that it can produce home ranging behavior in the absence of other movement components.

Scenario 2: switching depends on resource density

Here, consumers change their movement behavior as a function of the density of resources instantaneously available at their immediate location. This kind of temporal tracking of resource density is at the heart of the marginal value theorem from optimal foraging theory (e.g., Charnov 1976; McNair 1982), but in that case (unlike here) such temporal tracking is tied to globally omniscient knowledge of resource conditions elsewhere. Assuming a threshold resource density, \({m}_{0}\), to which the consumers respond by switching their movement mode, we write.

$${\alpha }_{S2}\left(x,t\right)=\left\{\begin{array}{l} s\text{ if }m(x,t)>{m}_{0}\\ 0\text{ if }m(x,t)\le {m}_{0}\end{array}\right.,$$

which means that consumers will switch from random search mode to range resident mode at rate \(s\) if the resource density and position x and time t exceeds a threshold value, \({m}_{0}\), and will otherwise remain in random search mode. Similarly,

$${\beta }_{S2}\left(x,t\right)=\left\{\begin{array}{l} 0\text{ if }m(x,t)>{m}_{0}\\ s\text{ if }m(x,t)\le {m}_{0}\end{array}\right.,$$

such that consumers will switch from range residency to random search mode at rate \(s\) as resource availability deteriorates below the threshold density. Note that the structure of Eqs. (6)–(7) effectively creates an aggregative response to areas of abundant resources.

Scenario 3: switching depends on spatial changes in resource density

Whereas Scenario 2 focused on resource density per se, in this scenario, consumers change their movement behavior as a function of the magnitude of the spatial gradient in the resources available, \(\left|\frac{\partial m\left(x,t\right)}{\partial x}\right|\). We write.

$${\alpha }_{S3}\left(x,t\right)=\left\{\begin{array}{l}s\text{ if }\left|\frac{\partial m\left(x,t\right)}{\partial x}\right| >{\varphi }_{0}\\ 0\text{ if }\left|\frac{\partial m\left(x,t\right)}{\partial x}\right| \le {\varphi }_{0}\end{array}\right.,$$

where the rate of switching is \(s\) if the spatial gradient in resource availability is greater than the threshold magnitude \({\varphi }_{0}\), and 0 otherwise. Similarly,

$${\beta }_{S3}\left(x,t\right)=\left\{\begin{array}{l}0\text{ if }\left|\frac{\partial m\left(x,t\right)}{\partial x}\right| >{\varphi }_{0}\\ s\text{ if }\left|\frac{\partial m\left(x,t\right)}{\partial x}\right| \le {\varphi }_{0}\end{array}\right.,$$

such that consumers will switch from range residency to random search mode at rate \(s\) as the spatial gradient in resource availability weakens.

Scenario 4: switching depends on perceived spatial changes in resource density

Here, consumers again change their movement behavior as a function of the spatial gradient in the resources available, but we augment their perceptual abilities to detect those spatial gradients. Specifically, we assume that the consumers possess a perceptual range, R (Zollner and Lima 1997; Mech and Zollner 2002; Fagan et al. 2017). Thus, for a distance |x—y| from position x, the consumers can perceive the existence of resources according to a detection function.

$$g\left(x,y, R\right)=\left\{\begin{array}{cc}1& -R\le x-y\le R\\ 0& else\end{array}\right..$$

The perceived resource function, \(h\left(x\right),\) is then written

$$h\left(x,t\right)=\frac{1}{2R}\underset{x-R}{\overset{x+R}{\int }}\overset{\begin{array}{c}available\\ resources\end{array}}{\overbrace{m\left(y,t\right)}}\overset{\begin{array}{c}detection\\ function\end{array}}{\overbrace{g\left(x,y,R\right)}}dy$$

which in the case of \(g(x,y,R)\) from Eq. (10) simplifies to

$$h\left(x,t\right)=\frac{1}{2R}\underset{x-R}{\overset{x+R}{\int }}m\left(y,t\right)dy$$

We make these choices of \(g\left(x,y, R\right)\) and \(h\left(x\right)\) to simplify comparisons with the other scenarios developed in this paper. The consequences of choosing different functional forms for \(g\left(x,y, R\right)\) are explored extensively in Fagan et al. (2017).

To model the effects of switching movement modes as a function of perceived spatial resource gradients, we write.

$${\alpha }_{S4}\left(x,t\right)=\left\{\begin{array}{l}s\text{ if }\left|\frac{\partial h\left(x,t\right)}{\partial x}\right| >{\varphi }_{0}\\ 0\text{ if }\left|\frac{\partial h\left(x,t\right)}{\partial x}\right| \le {\varphi }_{0}\end{array}\right.,$$

where the rate of switching is \(s\) if the spatial gradient in resource availability is greater than the threshold magnitude \({\varphi }_{0}\), and 0 otherwise. Similarly,

$${\beta }_{S4}\left(x,t\right)=\left\{\begin{array}{l}0\text{ if }\left|\frac{\partial h\left(x,t\right)}{\partial x}\right| >{\varphi }_{0}\\ s\text{ if }\left|\frac{\partial h\left(x,t\right)}{\partial x}\right| \le {\varphi }_{0}\end{array}\right.,$$

such that consumers will switch from range residency to random search mode at rate \(s\) when the spatial gradient in resource availability is sufficiently weak. Note that because of our choices of \(g\left(x,y, R\right)\) and \(h\left(x,t\right)\) in Eqs. (4)–(4) we can use the same threshold magnitude, \({\varphi }_{0}\), in Eqs. (12)–(13) as in Scenario 3 Eqs. (8)–(9).

Scenario 5: switching depends on temporal changes in resource density

In this penultimate scenario, we depart from the previous two scenarios that focused on reaction to spatial gradients, and instead assume that the consumers have some modest ability to detect and respond to temporal changes in resource density at their specific spatial location (e.g., Loiselle and Blake 1991; Dusenberry 1998). The assumptions in this scenario of our model mean that consumers are able to identify whether their access to immediately local resources is instantaneously getting better or worse, but they have no knowledge of long-term trends in resource availability nor any information about trends beyond their current location. Mathematically, we can write this detection of immediate trends in terms of the temporal gradient of the resource, \(\frac{\partial m}{\partial t}\), such that

$${\alpha }_{S5}\left(x,t\right)=\left\{\begin{array}{l}s\text{ if }\frac{\partial m\left(x,t\right)}{\partial t} >{\delta }_{0}\\ 0\text{ if }\frac{\partial m\left(x,t\right)}{\partial t} \le {\delta }_{0}\end{array}\right.,$$

where the rate of switching is \(s\) if the temporal gradient in resource availability is greater than the threshold magnitude \({\delta }_{0}\), and 0 otherwise. This means that the consumers only switch from random search mode into range resident mode if resource density is improving sufficiently quickly. Note that we must use a different threshold, \({\delta }_{0},\) and not \({\varphi }_{0}\), because we are dealing with a temporal rather than a spatial gradient in resource density. However, because of our choices of \(m\left(x,t\right)\;\mathrm{and}\; g(x,t)\), we can, under some circumstances, use the same magnitude for these thresholds and just allow the dimensional units to differ. More specifically, because the resource equation for \(m\left(x,t\right)\)(and by extension for \(h\left(x,t\right))\) has a natural time scale of 4 π/ω and a natural spatial scale of σ built into it (Eq. (1)), we can equate the thresholds \({\delta }_{0}\) and \({\varphi }_{0}\) if we equate the magnitudes of the two intrinsic scales. With different choices for these intrinsic scales, we can make the same transition from spatial to temporal gradients with a rescaling coefficient.


$${\beta }_{S5}\left(x,t\right)=\left\{\begin{array}{l}0 \qquad\qquad \text{ if } \quad \frac{\partial m}{\partial t} >{\delta }_{0}\\ s \qquad\qquad \text{ if } \quad \frac{\partial m}{\partial t} \le {\delta }_{0}\end{array}\quad\right.,$$

which means that the consumers only switch into random foraging mode if resource density is deteriorating sufficiently quickly. Collectively, Eqs. (1415) imply that the consumers switch their behavioral modes only if local resource density is instantaneously changing by a substantial amount, and that they ignore any near-term fluctuations in resource density less than \({\delta }_{0}\) in magnitude.

Scenario 6: switching depends on consumers’ memory of resource density

Here, we assume that the consumers possess a simple, but spatially detailed form of memory that allows them to keep track of the long-term resource dynamics of an area. If we were building models of movement trajectories for individual animals, we would want to structure each consumer’s memory around the resources encountered along those trajectories (Schlaegel and Lewis 2014; Bracis et al. 2015; Abrahms et al. 2019; Lin et al. 2021). However, because we are working within a PDE modeling framework, and need to characterize the collective memory of a group of organisms, we need a different approach.

To do this, we consider a situation in which the consumers base their decisions to switch between movement modes on how much they can remember of the resource cycle and where they are within that cycle. From Eq. (1), the temporally dynamic resource has period \(^1/_{\omega}\) and repeats endlessly for any given spatial location. We use the parameter \(Q\), where \(Q\le \, ^1/_\omega\), to represent the memory length, i.e., \(Q\omega\) is the proportion of the full resource cycle that the consumers can remember. The consumers’ memory, \(M\), of the resource conditions leading up to time t can thus be written

$$M=\frac{\underset{t-Q}{\overset{t}{\int }}m\left(x,t\right)dt}{Q}.$$

Note that a given value of \(Q\) will yield a different memory depending on what point in the resource cycle the system is in. We then base the movement switching rates on this memory by writing

$${\alpha }_{S6}\left(x,t\right)=\left\{\begin{array}{l}s\text{ if }M >{M}_{0}\\ 0\text{ if }M \le {M}_{0}\end{array}\right.,$$

where the rate of switching is \(s\) if the consumers’ memory of resource availability at location x exceeds the threshold magnitude \({M}_{0}\), and 0 otherwise. This means that the consumers only switch from random search mode into range resident mode if their memory of a location, at a particular time, is sufficiently positive. Similarly,

$${\beta }_{S6}\left(x,t\right)=\left\{\begin{array}{l}0\text{ if }M >{M}_{0}\\ s\text{ if }M \le {M}_{0}\end{array}\right.,$$

such that consumers switch from range-resident mode into random search mode if their memory of a location, at a particular time, is sufficiently unfavorable, but remain in range resident mode otherwise.

Summary of modeling effort

Table 1 provides a summary of the different scenarios and the functions and parameters involved.

Table 1 Summary of the six modeling scenarios and a listing of functions and parameters. Scenarios are listed in a 2 × 3 array that matches the presentation style of figures in Results. Entries are to be read as “Switching depends on …”

Quantifying foraging success

To quantify the consumers’ ability to track the distribution of their resources over space and time, we use the continuous form of the Bhattacharyya Coefficient (BC; Bhattacharyya 1943) for quantifying the overlap between two distributions. Because the BC was initially formulated for use with probability distributions, we use a normalized form. Specifically, we have

$$\Omega =\frac{{\int }_{{t}^{\mathrm{^{\prime}}}}^{{t}_{max}}{\int }_{0}^{100}\sqrt{\left[u\left(x,t\right)+v\left(x,t\right)\right]m\left(x,t\right)}dxdt}{\sqrt{{\int }_{{t}^{\mathrm{^{\prime}}}}^{{t}_{max}}{\int }_{0}^{100}\left[u\left(x,t\right)+v\left(x,t\right)\right]dxdt}\sqrt{{\int }_{{t}^{\mathrm{^{\prime}}}}^{{t}_{max}}{\int }_{0}^{100}m\left(x,t\right)dxdt}} \le 1.$$

The timeframe t’ to tmax represents some period after transient behaviors have settled down. For static resource distributions, which (with appropriate boundary conditions of mass conservation) always exhibit an equilibrium solution, the integral is only over space (Fagan et al. 2020). For dynamic landscapes, such as periodically fluctuating landscapes on which we focus, the time integral needs to be taken over a long enough period to discount the transient behaviors and instead capture long-term variation (Fagan et al. 2017). This metric of foraging success differs a bit from that used in Fagan et al. (2017, 2020), but the change is necessary to accommodate comparison across all six of the scenarios we consider here.

Equation (19) quantifies ‘resource matching’ in the sense that foragers must spatially and temporally overlap with resources to be successful. We do not consider mutual interference or resource depletion because we want to focus only on animal movement behavior and not population growth or decay. This is a reasonable assumption when population density is low (i.e., sparsely populated regions) and resources are ephemeral (i.e., resources degrade before their density can be reduced much by the foragers). In these systems, the question is more about capitalizing on transient resources, as opposed to avoiding competition. Such transient resource dynamics characterize, for example, the Eastern steppes of Mongolia that have motivated much earlier work on animal movement (Mueller and Fagan 2008; Mueller et al. 2011; Martínez-García et al. 2013; Fleming et al. 2014).

Throughout, we solved the initial-boundary value problem numerically using the method of lines by discretizing in space over the domain x = [0, 100] and solving the system of ordinary differential equations in time. We implemented a different scheme for the components of Eq. (2) as required by their respective structure. For example, for the random search equation, we used a simple forward-time, centered-space scheme, whereas for the gradient following equation, we used the Lax-Wendroff method, accounting for the method’s natural dispersion error in the term \(\varepsilon \frac{{\partial }^{2}}{\partial {x}^{2}}v\). To solve the resulting coupled system of ODEs, we used the variable-step, variable-order differential algebraic equation solver ODE15S (Shampine and Reichelt 1997).

For initial conditions, all the numerical experiments had u and v distributed uniformly with population density 1/L. Thus, at any time the total population u + v would integrate to 2 over space, while the total population in the individual u and v components varied with time. We used 0 flux boundary conditions on the rectangular domain (x, t) ∈ [0, 100] × [0,∞). For all of the simulations, we considered the pulsed Gaussian resource function detailed in Eq. (1).


Figure 1 shows the dynamic (pulsed Gaussian) resource landscapes on which the forager populations are moving. In both the single-patch and two-patch landscapes, resources are highly transient but are predictable with regard to their location and timing.

Fig. 1
figure 1

Heatmaps of the resource landscapes with one (left) and two (right) seasonally pulsed Gaussian resource peaks. Note that the variations in the resources are sufficiently intense that the resource density drops to near zero during the troughs between the resource peaks. Parameters: L=100, μ=50, μ1=33.3, μ2=66.6, σ=5.5, ω=0.2

The six advection scenarios involve starkly different locations and times at which the consumers are switching from the diffusive foraging mode to the home ranging mode (Fig. 2). For example, in Scenario 1, switching into the home ranging mode is constant after the population equilibrates, with no influence from the underlying periodicity in resource availability. In contrast, the resource conditions that favor switching to home ranging are strongest at the time and location of the resource peak in Scenario 2 (tracking the resource density, Fig. 2b) whereas the resource conditions that favor switching are strongest on the ‘shoulders’ of the resource peak in Scenarios 3 and 4 (tracking changes and perceived spatial changes in resource density, respectively) (Fig. 2c, d). Provided R in Eq. (10) (perception scenario) is sufficiently small, the resource conditions favoring switching regions for scenario 4 are nearly identical to those of scenario 3 for low R (Supplementary Fig. F). Different still are the resource conditions that promote the switching behavior in Scenario 5 (tracking temporal changes in resource density) where the switching behavior is greatest as the resource begins to increase in density (Fig. 2e). Provided Q in Eq. (16) (memory scenario) is sufficiently large, resource conditions will lead to some portion of the consumer population constantly switching into the diffusive foraging mode regardless of what part of the seasonal cycle the system is in (Fig. 2f). In contrast, for sufficiently small Q, the resource conditions promoting this constancy of switching disappears and the results from Scenario 6 converge on those from Scenario 2 (Supplementary Fig. G). Resource conditions that promote switching from home ranging to diffusive foraging mode are largely complementary to these results for all six scenarios for switching from diffusive to home ranging.

Fig. 2
figure 2

Location and timing of the resource conditions that promote the consumer population actively switching into home ranging mode for the landscape with a single resource patch (see Fig. 1a). Note how the intensity of the resource conditions that promote switching behavior as well as the timing and location of those favorable locations vary strongly depending on how the gradient of the resource is defined (labeled as scenarios 1–6). Fixed parameters: θ=0.01; D = 0.1; Scenario 1: θ=0.01, D = 0.1, w0 = 0.01; Scenario 2: m0 = 0.035; Scenario 3 φ0=0.0037; Scenario 4: φ0=0.0018, R = 10; Scenario 5:δ0=0.0014, Scenario 6: M0 = 0.02, Q = 20.9. Blue region corresponds to α=0; yellow region corresponds to α=s 

Fig. 3
figure 3

Densities of the home-ranging component of the consumer population across the six switching scenarios for the landscape with a single resource peak. Scenarios differ with regard to both the timing and location of the density of the portion of the consumer population that is in the home-ranging mode. Note that densities fluctuate strongly in time in Scenarios 2 and 3. Note also that densities are concentrated on the ‘shoulders’ of the resource distribution in Scenario 3 and over a much broader area in Scenario 4. Fixed parameters: θ=0.01, s = 0.02, D = 0.1; Scenario 1: w0 = 0.01; Scenario 2: m0 = 0.035; Scenario 3: φ0=0.0037; Scenario 4: φ0=0.0018, R = 10; Scenario 5: δ0 =  + 0.0014, in Scenario 6 M0 = 0.02, Q = 20.9

The differences in switching behavior among scenarios alter the consumers’ movement behaviors and thus translate into differences in the location and timing of the consumer population densities. Scenario 1 (tracking conspecific density) shows a concentration of consumers to the location of the resource peak regardless of whether the resource is at high or low density. In contrast, Scenario 2 (tracking resource density) shows periodicity in the consumer population density, indicating a degree of matching of the consumers to both the location and timing of the resource peak. Scenario 3 (tracking spatial changes in resource density) shows the consumers concentrating on the shoulders of the resource peak, but not on the resource peak itself. In contrast, scenario 4 (tracking perceived spatial changes in resource density) shows advection occurring over a much broader area. In scenarios 5 (tracking temporal changes in resource density) and 6 (memory), the density of the advecting consumers is greatest on the resource peak. Both of these scenarios also feature a limited degree of oscillation in population density that mirrors the temporally dynamic nature of the resources. Supplementary Fig. A provides the corresponding densities for the diffusive component of the populations.

In the case of a single resource patch, considerable differences exist in Ω across scenarios, indicating that the different movement strategies allow for very different degrees of resource matching. Resource matching success (Ω) is clearly greatest in Scenario 5 where switching between diffusive and home ranging movement types depends on the temporal resource gradient, but only when the threshold for switching between movement behaviors is very small (Fig. 3). Peak Ω values (broad to concentrated in parametric extent) exist within each scenario, and the location of these Ω peaks differs across scenarios. Collectively, these results indicate that, within a given movement strategy, resource matching could potentially be optimized, but that the degree of switching and the switching thresholds that are necessary to provide optimal matching differ among scenarios. For example, in Fig. 3, low levels of switching provide marginally better resource matching in Scenarios 1 and 2, but switching needs to occur at a faster rate when it occurs in conjunction with temporal resource gradients (Scenario 5).

Fig. 4
figure 4

Resource matching success (Ω) for foragers in a landscape with a single periodic resource peak. Results for all scenarios are plotted as functions of switching rates (x axes) and scenario-specific parameters (y-axes). Fixed parameters θ=0.01, D=0.1: Scenario 4: R=10; Scenario 6: Q=20.9

In the case of two resource patches, the location and timing of the consumer population switching into home ranging mode become more complicated, reflecting the greater complexity of the resource conditions favoring such changes in behavior (Fig. 4). The timing and location of such switching vary strongly across scenarios depending how the gradient of the resource is defined. For example, switching to advection is consistently concentrated in the vicinity of the resource peaks in Scenario 1 even though the resource is periodic in time. Switching to advection occurs on the ‘shoulders’ of the double-peaked resource distributions in Scenarios 3 and 4, but occurs in the vicinity of, but in advance of, the resource peaks in Scenario 5 (excluding only the spatiotemporal region where the resource is most strongly waning in abundance). In Scenario 6, switching to advection again reflects the periodic nature of the resource, but, due to the effects of memory, there exists a lingering degree of switching near the centers of the resource peaks even though the resources are least abundant at these times (Fig. 4). Density plots for the component of the consumer population in the home ranging mode appear in Supplementary Fig. B. A counterpart to Fig. 4 that shows the location and timing of the population switching from foraging mode into diffusive mode appears in Supplementary Fig. C.

Fig. 5
figure 5

Location and timing of the consumer population switching into home ranging foraging mode for the landscape with two in-phase resource peaks (see Fig. 1b). Compare results with Fig. 2. Fixed parameters: θ=0.01, D=0.1; Scenario 1: w0=0.01; Scenario 2: m0=0.035; Scenario 3: φ0=0.0037; Scenario 4: φ0=0.0018, R=10; Scenario 5: δ0 = 0.0014; Scenario 6 M0=0.02, Q=20.9. Blue region corresponds to α=0; yellow region corresponds to α=s

Compared to Fig. 3, resource matching success is generally higher in the two patch case because the resources are better distributed within the landscape and easier to find with a given level of mobility (Fig. 5). This is especially true for Scenario 3 (spatial gradient) and Scenario 4 (spatial gradient with non-local perception) where resource matching success is now on par with the best performing parameters from Scenario 5 (following a temporal resource gradient). High levels of switching between diffusion and advection are generally deleterious unless the thresholds for undertaking such switches are sufficiently high. The thresholds at which optimal resource matching is reached tend to be higher in this two resource patch case than in the single resource patch.

Fig. 6
figure 6

Resource matching in the case of two in-phase resource patches. Compare results with Fig. 3. Fixed parameters θ = 0.01, D = 0.1: Scenario 4: R = 10; Scenario 6: Q = 20.9

The home ranging parameter, θ, also influences the degree of resource matching success. Supplementary Fig. D gives resource matching success in the case of one resource path (comparable to Fig. 3), except that θ is increased and, separately, decreased from the baseline level. For a fixed rate of diffusion, increasing θ affords greater resource matching success for almost all scenarios and decreasing θ has the opposite effect. Scenario 1 (advection on conspecifics) clearly differs in that increasing θ leads to a decrease in resource matching. For the case of two resource peaks (Supplementary Fig. E, compare with Fig. 5), θ has a different effect in that increasing the degree of home ranging tends to decrease Ω, at least somewhat, except in Scenarios 3 and 4. In these scenarios, where the behavioral switching depends upon a form of spatial resource gradient, resource matching clearly increases with increasing θ.

Perceptual range (R) plays an important role in the degree of resource matching success afforded by Scenario 4 by shifting the timing and location of the behavioral switching into the home ranging mode (Supplementary Fig. F). For sufficiently small R, results from Scenario 4 converge on those of Scenario 3. For sufficiently large R, the switching regions become more refined as the organisms’ increased perceptual radius affords more information on the full distribution of resources across the domain and the ideal times and locations to switch behaviors. Note that for R = 15, which is exactly half the distance between the centers of the two resource pulses, the switching regions turn on and off centered at x = 50 (Supplementary Fig. F).

Likewise, the duration of memory in Scenario 6 can also influence the timing and location of behavioral switching (Supplementary Fig. G). As memory duration, Q, increases, the lingering effects of memory tend to link the switching responses to consecutive resource peaks so that switching to advection occurs in a consistent location, even though the underlying resource is periodic in time. For sufficiently small Q, switching behavior of Scenario 6 converges on that of Scenario 2.


This synthetic overview makes clear that the ecological concept of ‘consumers tracking resource gradients’ can mean very different things in practice when implemented in movement models with continuous space. Furthermore, the detailed assumptions of how consumers actually track their resources can translate into radically different levels of success for consumers attempting to match the spatiotemporal distributions of their resources.

Overall, we found that Scenarios 3 (tracking spatial gradients), 4 (tracking spatial gradients with the benefit of non-local perception), and 5 (tracking temporal gradients) provided the highest level of resource matching for consumers. To some extent, these advantages may change with the distribution of resources. For example, if one considers a resource distribution function which is very flat around its global maximum point but peaked around a local maximum point, Scenario 3 would likely provide very poor resource matching levels. In this scenario, tracking perceived spatial gradients (Scenario 4) should perform better than tracking the immediately local gradients (Scenario 3). Results in Fagan et al. (2020), where we considered step functions for the resources, support this contention. Perception (Scenario 4) afforded good resource-matching success, comparable to the highest levels of resource matching that were obtained through Scenario 5 (tracking temporal gradients). The utility of perception, which was especially true in more complex two-patch resource landscapes, is in line with earlier studies suggesting the benefits of non-local information gathering in temporally variable resource landscapes (Fagan et al. 2017).

The general superiority of Scenario 5 (tracking temporal gradients) may be, in part, due to the mathematical model of movement that we explored. For example, because μ, the spatial location of resources, is built into the range-resident dispersal mode, there is spatial information built into that mode, but no temporal information. Then, adding temporal information via tracking of temporal gradients (Scenario 5) would add relatively more to an organism’s overall information about the environment than using additional spatial information, because there is already some spatial information implicitly available in the OU mode. The observation that Scenarios 3 and 4, especially 4, perform relatively better when there are two resource patches than where there is only one supports this argument, because with two resource locations getting extra spatial information might be more valuable.

In contrast to the more successful strategies (Scenarios 3, 4, and 5), other scenarios involving tracking the density of conspecifics (Scenario 1), tracking the abundance (rather than the gradient) of resources (Scenario 2), or employing a particular form of memory (Scenario 6) provided poorer spatiotemporal matches to resources. Consumers that switched their foraging behavior as a function of conspecific densities generally achieved very poor resource-matching success. The effect was especially pronounced when home-ranging behavior was strong, which limited the consumers’ spatial exploration. These results suggest that pure ‘local enhancement’ type mechanisms (Buckley 1997) wherein consumers aggregate in areas where others of their kind are already foraging cannot succeed in isolation. Instead, a modest level of directly tracking the resources themselves, together with cueing in on conspecific activity, would likely improve this strategy. This modification would also connect to the producer–scrounger dichotomy in studies of social group foraging behavior (Beauchamp 2000), wherein ‘producers’ behave directly according to resources but ‘scroungers’ base their decisions on producers.

Increasing evidence suggests that memory is important for consumers that must acquire resources in highly dynamic landscapes (Bracis and Mueller 2017; Abrahms et al. 2019). Consequently, we were surprised to see that memory-based movement also provided some of the worst tracking of available resources. This deviation from expectations may stem from the particular (rather crude) form of memory that we implemented in Scenario 6. Indeed, other modeling work that considered memory at the individual (rather than collective) level found that a rather sophisticated form of memory, including separate long- and short-term memory records, was necessary to track resources in dynamic landscapes (Lin et al. 2021).

Collectively, these results suggest that tracking gradients (Scenarios 3, 4, and 5) may, in general, be more effective than tracking resource density directly (Scenario 2) or indirectly (Scenario 1). One plausible reason for this is that gradients should be detectable over a broader range of conditions than density per se. This would accord with the underlying biology. Consider that, in practice, it would often be easier to assess the gradient of something than its magnitude. For example, discerning whether movement was up or down a hill would likely be easier than identifying the elevation. Such differential identifiability of gradients versus magnitudes would likely hinge on the rate of movement relative to the scale of the gradient.

Intriguingly, the different scenarios for switching between home ranging and diffusive movement did not rank consistently with regard to the level of resource matching that they afforded. Even something as simple as switching from a model with a single periodic resource peak to one with two periodic resource peaks changed the relative performance of the different scenarios for switching between home ranging and random movement (compare Figs. 3 and 5). These differences appear to arise, primarily, because changing the number of resource peaks changes the average location of resources relative to consumers with specific levels of mobility.

The degree to which consumers incorporate range-resident behavior in their movement also played an important role in determining how well they overlap the distribution of their resources in space and time. In particular, the strength of home ranging (relative to random dispersal) interacted with the behavioral cues for switching to shape resource overlap in a strong way. Switching based on spatial resource gradients (whether immediately local or perceived over a longer distance) provided particularly good matches to resource distributions when coupled with strong range-resident behavior. This result is intriguing given that a recent statistical analysis of home range behavior found that many animals’ movement patterns were well described by models that included elements of both diffusive and range-resident behavior (Noonan et al. 2019).

The conditional similarities between Scenarios 3 and 4 (Supplementary Fig. F), and separately, between Scenarios 2 and 6 (Supplementary Fig. G), are due to their underlying mathematics. Specifically, the switching functions in Scenarios 2 and 3 were based on a derivative, whereas in Scenarios 4 and 6 the switching functions were based on a slope which approximated the respective derivative for low enough R or Q. In contrast, for large values of R or Q, Scenarios 4 and 6 departed strongly from Scenarios 3 and 2, respectively, demonstrating how the introduction of additional information caused different behavior by the home-ranging component of the population (Supplementary Fig. F and G). This additional information may be either spatial (in the form of an increased perceptual range, Scenario 5) or temporal (in the form of a lingering memory, Scenario 6), but in either case, the additional information altered the basis for the behavioral decision-making.

Opportunities for optimal resource matching

The existence of parameter regions featuring higher levels of resource-matching success amidst a sea of lower-performing parameters (Figs. 3 and 5, Supplementary Fig. D and E) suggests that, within a given movement strategy, resource matching could potentially be optimized. However, the rate of switching (between home ranging and diffusive movement modes) and the switching thresholds that are necessary to provide optimal resource matching differ quite strongly among scenarios. For example, in Fig. 3, low rates of switching provide marginally better resource matching in Scenarios 1 and 6, but switching needs to occur at a faster rate when it occurs in conjunction with temporal resource gradients if consumers are to achieve the highest levels of resource matching (Scenario 5).

Although our study considered models with continuous space, the high levels of resource matching success observed in some scenarios brings to mind concepts like the marginal value theorem for optimal resource tracking (Charnov 1976; McNair 1982) and the ideal free distribution for optimal distribution of resources among consumers (Farnsworth and Beecham 1999; Křivan et al. 2008) that had their origins in patch-based models of consumers tracking resources. To our knowledge, there is nothing like the marginal value theorem in partial differential equation (PDE) models or other ecological models involving continuous space. However, there is a strong foundation for the ideal-free distribution in continuous space models (Arditi and Dacorogna 1988; Grunbaum 1998), and more recent PDE work demonstrates how certain kinds of resource-tracking strategies can lead to an ideal free distribution of consumers (Cantrell et al. 2008, 2010). Real-world complications, such as perceptual constraints, can cause departures from an ideal free distribution (Abrahams 1986), but ‘approximately optimal’ solutions are possible even when underlying assumptions are violated (Griffen 2009; Street et al. 2018).

In general, optimal movement in heterogeneous landscapes requires that consumers consider both space and time (Arditi and Dacorogna 1988; Cantrell et al. 2021). In this paper, Scenarios 2, 3, and 4 consider space, 5 considers time, and 6 considers both space and time (but considers time, via memory, in a rather crude way). However, all of these scenarios involve behaviors that are relatively simple, in that movement decisions are being made with respect to metrics observable by many animals. Of the switching cues we examined, that of Scenario 2 is closest to classical considerations of optimal foraging in patchy landscapes. From the marginal value theorem, we know that, for omniscient consumers, the best time to leave a patch is when the rate of resource uptake on that patch drops below the system-wide average (Charnov 1976). This criterion reflects elements present in both Scenarios 2 and 5. Scenario 2 is relevant because resource uptake should be proportional to the density of resources available. However, Scenario 5, where the focus is the temporal rate of change of resource density, is also relevant in that the rate of change of available resources shapes the rate of resource uptake. For example, knowing the rate of change in resource availability would offer consumers information on how much longer they have to gather resources. This information could be far more valuable than just knowing what resources are available at an exact spatiotemporal location. These conceptual links to the marginal value theorem are particularly strong for cases where behavioral changes are framed in terms of optimal ‘giving up times’ (McNair 1982) or residence times (Turchin 1991). Overall, Scenario 5 afforded much better opportunities for resource overlap than did Scenario 2 (Figs. 3 and 5, Supplementary Figs. D, E). This result raises intriguing questions about optimal foraging in dynamic landscapes, including the possibility that consumers tracking both the rate of change in local conditions and their own rate of change of resource uptake may be especially adept at maximizing resource gain. This will be explored in future work. Additional future directions could include models that combine memory and perception together, or that combine local enhancement type strategies (Scenario 1) with gradient-following behavior.

In summary, we compared the performance of alternative methods by which consumers can be reasonably said to be tracking gradients related to their resources. Optimal resource matching is achievable via all six scenarios, at least to some degree. Within most scenarios, a broad range of parameter values yields similarly high levels of resource matching success. Thus, even if consumers were channelized to possess particular resource-tracking abilities and were unable to switch among scenarios, wide parametric regions of ‘nearly optimal’ resource matching success would provide a broad evolutionary target wherein good foraging success is obtainable even when the parameters cannot be fine-tuned. Such broad targets would be advantageous given the high degree of temporal resource variability that exists in natural systems (e.g., Abrahms et al. 2019).