Introduction

An ecological truth that has become apparent in recent decades is that predators act to shape the structure and dynamics of communities in ways more intricate and subtle than once thought (Lima 1998a; Werner and Peacor 2003). By interacting with other trophic levels, predators act powerfully in shaping the adaptations of organisms to their environments. Many antipredator behaviours and morphological traits are the evolutionary products of an endless antagonism between predators and prey (Edmunds 1974; Harvey and Greenwood 1978; Sih 1987). This antagonism necessarily gives rise to trade-offs between the costs and benefits of antipredator behaviours that affect evolution of these traits. Organisms evolve to choose between alternative behaviours to deal with the threat of predation under different circumstances (Lima and Dill 1990). The evolution of antipredator, reproductive and foraging behaviours under the constraints of time, energy and predation risk can impact not only individual fitness but also population dynamics (Yoshida et al. 2003). Ecological modelling offers a solution for studying the complexity of predator-prey interactions and for integrating the effects of various predation-sensitive behaviours to predict outcomes on fitness and population changes.

Nonlethal effects of predators on prey have been the subject of increasing attention and have been referred to as the ecological effects of ’scaring’ prey (Brown et al. 1999). Non-lethal behavioural responses to predators are not only ubiquitous in nature (Dill 1987; Lima and Dill 1990; Lima 1998b; Werner and Peacor 2003) but have also been implicated as very strong influences on the outcomes of predator-prey interactions across many taxa, even rivaling the effects of direct predation. Their far-ranging nature has been observed on prey behaviours, population structures and resources densities (Preisser et al. 2005; Lima 1998a; Verdolin 2006; Cresswell 2008). It then seems imperative that any study on the outcomes of predator-prey interactions considers trait-mediated effects.

Recent studies have paved the way for a new link between predators and community dynamics through the non-lethal effects of predators on prey’s behaviour, energy and fitness (Creel and Christianson 2008). Mathematical models have been proposed to study predation risk-foraging trade-offs that can affect energy gain, for example, the Risk Allocation Hypothesis (RAH) (Lemma and Bednekoff 1999); see (Ferrari et al. 2009) for a review of empirical tests of the Risk Allocation Hypothesis). Empirical work has shown that decreased foraging efficiency while under predation risk can directly limit energy transfer up the food chain by reducing both the energy acquired by prey and the energetic conversion of food to growth in intermediate consumers, thereby reducing the biomass available for predation by higher trophic levels (Trussell et al. 2006). Thus, energy flow through an ecosystem is greatly influenced by the behavioural interactions between predators and prey.

Trait-mediated effects can be major influences on prey populations in several ways. Antipredator behaviours are well known to induce habitat shifts that influence accessibility to good foraging areas (Biro et al. 2003). Trait-mediated predator-prey interactions are important influences on the abundance of prey resources through cascading effects (Schmitz et al. 2004), which affect the dynamics of food chains (Ripple and Beschta 2004). Changes in feeding activity will influence energy gained by prey, which can influence population growth rates (Lemon 1991). Predators can also alter prey reproductive behaviours by reducing prey recruitment in subsequent generations, thereby altering population structure (Zanette et al. 2011). These behaviours and their resulting effects on reproduction, fitness and population dynamics can best be understood within the framework of predation risk trade-offs (Cresswell 2008).

Understanding how prey populations respond to predators is of critical importance if we are to model population dynamics. Luttbeg and Kerby (2005) point out that the variability in predation risk effects across terrestrial, freshwater and marine taxa call for more studies examining behavioural responses to predation risk. Empirical studies measuring how prey respond to changes in predation risk, densities of other prey species and resource availability will provide the groundwork for future modelling of prey populations (Bolker et al. 2003). However, this approach may be limited in what it can reveal about the perceived level of risk in prey because fear is typically measured by proxies such as the intensity of prey behavioural response, time spent hiding and active or giving up densities (GUD which is the density of food in a patch at which foraging stops (Valone and Brown 1989). Behaviours are complicated by the influence of many unobservable internal states such as hunger and motivation. In addition, a mechanistic understanding of how behavioural and morphological traits arise through evolution in predator-prey systems may lead to theories which predict how and when prey effects will be largest. This may be achieved in models of predator-prey interactions which allow evolution of multiple behaviours to occur (Luttbeg and Schmitz 2000).

Given the recent evidence for strong and ubiquitous trait-mediated interactions, there is growing sense of need to capture these behaviours in ecosystem models. Such models aim to capture the complexity of real ecosystems and describe ecologically accurate outcomes by linking individual-level behaviours to population- and community-level dynamics. There has been an increasing interest in studying the non-lethal effects of predators which can critically affect prey population growth and prey resource densities through cascading effects (Preisser and Bolnick 2008). With a few exceptions of some equation-based models (e.g. Abrams 2007; Křivan 2007; Cressman et al. 2004; Luttbeg and Trussell 2013; Peacor et al. 2007), most models do not account for the non-lethal effects of predators and changes to prey resource densities through, for example, cascading effects or have unrealistic simplifying assumptions about functional responses, interaction coefficients, population ceilings, population dynamics, foraging behaviours etc. However, some studies are probing deeper into ecological modelling to overcome these limitations (e.g. Křivan and Schmitz 2004; Ives and Dobson 1987). Other models link individuals to population outcomes by assuming adaptive behavioural decisions aimed at optimizing energy intakes while foraging under predation risk (i.e. GEEM, general equilibrium models: Tschirhart 2004; Kim et al. 2007). Much of the recent theoretical literature involving mathematical models is centered on population stability and consequences for ideal free distribution (IDF) when both predators and prey are allowed to behave adaptively by responding to each other. The strength of behavioural responses between prey and predators is an important factor in ecological outcomes and has been investigating in modeling studies looking at prey cognition, perceptual ability and memory of experience with predation events (Luttbeg and Trussell 2013). Studies also attempt to draw connections between short-term behavioural interactions and long-term population changes (Kṙivan 2007) over an evolutionary timescale (Kṙivan and Cressman 2009). These models are mathematically based which means that they lacks the level of details that can be found in individual-based models (IBM). Integrating individual behavioural, population and evolutionary changes is central to ecology and has recently been explored through predator-prey models incorporating phenotypic plasticity (Kṙivan and Cressman 2009). IBM ecosystem simulations offer an alternative to mathematical models by allowing predator and prey behaviours to evolve, thus increasing complexity allowing to avoid making critical assumptions affecting population size and dynamics. The use of IBM is a more natural way to capture interactive entities that are able to evolve while providing access to more levels of useful details. Such individual-based simulations offer the advantage to integrate space and time parameters, and to include more details than mathematical models of ecosystems. The use of IBM in ecology and evolutionary biology has increased greatly in the past decade (DeAngelis and Mooij 2005; Grimm 2005; Peacor et al. 2007). Smith used parallel supercomputers that produced Volterra type oscillations to study migration in a predator prey system (Smith 1991), whereas Schmitz used rule-based IBM simulation to study interactions in a food web (Schmitz and Booth 1997; Schmitz 2000). Despite the progress being made by incorporating trait-mediated effects in theoretical models, there is much room for improvement in this area.

In this study, we used an individual-based, evolutionary ecosystem simulation called EcoSim (Gras et al. 2009) to investigate foraging-predation risk trade-offs and the energy-fitness consequences on prey at an unprecedented scale of population size, evolutionary time and behavioural complexity. The high complexity of EcoSim comes from both the physical aspects of the world (the size of the world in EcoSim greatly exceeds previous systems) and the number and behavioural capabilities of the individuals. The semantics of EcoSim allow comprehensive analysis of new genes and behaviours as they arise through a Darwinian evolutionary process where natural selection is modelled and selection is not forced nor the population size is restricted. This tri-trophic system consists of hundreds of thousands of behavioural and genetically distinct individuals organized into hundreds of species of prey and predators. The strength of our model, similarly to the ones proposed by Strand et al. (2002); Giske et al. (2013) and based on evolving neural network behavioral models, also comes from the fact that we do not rely on a pre-defined fitness function, nor maximum value of fitness. The fitness of the individuals is determined by the efficiency of their behavioral model for their current environment. The environment itself is constantly changing because of the co-evolution of prey and predators and because of the dynamic distribution of the primary producer resource. Moreover, there is no any specification of the rate of reproduction controlling the population size. Therefore, in our model, individual fitness emerged as the result of the individuals’ decision making which itself rely on the artificial evolution of their behavioral model. Neither the evolution of the behavioral models nor the decision taken by the individuals are imposed by the modeler. Since EcoSim is a flexible evolutionary ecosystem which was not designed specifically to assess trait-mediated predator-prey interactions, we explore these interactions first and compare our results to current literature in this area, then suggest future theoretical and empirical work.

We asked the following questions about prey in EcoSim: do trait-mediated effects on prey exist in the form of predation risk-foraging trade-offs? How does the trade-off affect the energy of prey and allocation of energy to movement and reproduction? How do prey reproductive strategies change in response to predation risk? What are the effects of predation risk on prey populations? We hypothesized that prey would be risk-aversive in high-risk conditions and show increased movement to escape from predators. Risk aversion should also affect foraging patterns resulting in reduced food consumption and lower energy. Therefore, we hypothesized that predation risk will have negative effects on fitness in two ways: by lowering energy allocation to reproduction and by reducing reproductive behaviour. The ultimate effect of predation risk on prey population structures will reflect differences in these behaviours, simulating trait-mediated effects at the population level. We predicted that prey exposed to predation pressure would have lower population levels compared to prey without predation pressure. Finally, the evolutionary adaptation of prey to different levels of predation risk will affect the stability of prey populations when those risk levels are changed.

Methods

Overview of EcoSim

The evolutionary ecosystem simulation EcoSimFootnote 1 (Gras et al. 2009) was designed to investigate broad ecological and evolutionary patterns and processes. EcoSim models a tritrophic food chain consisting of hundreds of species of prey and predator coevolving in a dynamic, torus shaped 2D environment of 1000 X 1000 discrete cells. Prey individuals act as ’herbivores’ by feeding on a single type of non-evolving and behaviourally-inert ’primary producer’ called grass. EcoSim is unique in the implementation of a behavioural model that allows interactions between and within trophic levels. For more details, please refer to Supplementary Material.

EcoSim can run indefinitely in a series of time steps allowing the conceptualization of evolution in terms of events happening within a timescale. At every time step, all individuals in the world must complete certain tasks: they perceive their surrounding environment (including the amount of surrounding grass, presence of other individuals, etc), evaluate their internal states (level of fear, desire to mate, etc) and finally perform one action (escaping, eating, foraging, etc). Only one action can be performed in a single time step. Individuals are not forced to choose any particular action at a given time step; instead, all actions are a by-product of the interaction between all current dynamic biotic factors and an individual’s FCM. Individuals that survive are better adapted to their environment. The success of an individual, i.e. its fitness, depends on both its lifespan and offspring production. Since reproduction occurs only if individuals choose this action, there is no pre-defined fitness function, i.e. there is no forced mating, no maximum or minimum fitness values or other limitations. Therefore, the average fitness of prey does not always increase (Khater and Gras 2012). The lifespan of an individual is the number of time steps occurring before it dies. Prey individuals can die for several reasons: being predated, lacking energy or reaching maximum age. Most importantly, natural selection is not forced in any way, but rather selection acts through the behavioral model.

Genomes and behaviour in EcoSim

The fundamental component of EcoSim which codes for the behaviors of individuals and allows evolution to happen is the Fuzzy Cognitive Map (FCM) (Kosko 1986) that each individual carries. Each FCM is a complex representation of sensory abilities, internal cognitive-emotional concepts and motor outputs that individuals use to navigate their environment, interpret external stimuli and initiate appropriate responses. It is represented by a weighted graph where nodes represent these concepts and edges represent excitatory or inhibitory influences between concepts. The FCM is coded within the genome of each unique individual. We use an FCM to model an agent’s behavior and to compute the next action of the agent, i.e. through the dynamics of the map. Formally, an FCM is a graph which contains a set of nodes C, each node C i being a concept, and a set of edges I, each edge I ij representing the influence of the concept C i on the concept C j. A positive weight associated with the edge I ij corresponds to an excitation of the concept C j from the concept C i, whereas a negative weight is related to an inhibition (a zero value indicates that there is no influence of C i on C j). The influence of the concepts in the FCM can be represented in an nn matrix, L, in which L ij is the influence of the concept C i on the concept C j. If L ij = 0, there is no edge between C i and C j (see Supplementary Material).

In EcoSim, there are several types of behavioural interactions. Predators feed on prey, and prey feed on grass; thus, between-trophic level interactions are essentially predatory. In addition, predators and chase prey and prey can evade predators by running away. Within-trophic level interactions include competition for food. Since food patches may be overexploited and become permanently empty (grass cannot evolve defenses such as chemical deterrents to avoid being eaten), this competition resembles scramble competition in which individuals compete for a finite food source; we do not model contest competition within trophic levels. Other within-trophic level interactions include reproduction and searching for mates (socializing).

Throughout their lives, the individual agents are moving across the EcoSim world. There are four types of movement actions for prey (escape, search food (referred to as foraging from here-on), socialize and explore) and for predators (hunt, search food (foraging), socialize and explore). With respect to predation, EcoSim does not assume a constant predation risk, but instead risk is allowed to vary as predators chase prey and prey escape from predation or to stabilize to an optimal level through evolution. Movement actions have associated speeds that depend on the level of activation of the movement concept. A higher speed also consumes the individual’s energy more than a lower speed. The choice of a prey to engage in the movement actions escape and foraging depends on the sensitivity of their perception (i.e. detection) of objects in the environment such as food, predators and mates. The escape action may be chosen if prey detect predators, and it results in movement in a direction opposite to the direction of the closest predators. After an escape action, the internal concept ’fear’ is reduced. Foraging may occur when prey detect that their energy is low from the internal concept of ’hunger,’ and prey respond by searching for food in neighbouring cells. Just as a predator may not be successful in capturing a prey in nature, foraging may be unsuccessful in EcoSim. An individual may choose to search for food because its internal hunger state is high, but may be unsuccessful in obtaining food if it cannot detect grass nearby, if it does not have high enough speed to reach the food, if it does not choose the eating action once near the food in the following time step, or if there is no more food in the cell they are in. If foraging and eating are successful then the individual’s energy will increase and their hunger decreases. Socialization actions may fail if there are no other individuals from the same trophic level in nearby cells (Fig. 1).

Fig. 1
figure 1

Initial FCM prey map including concepts and edges. The width of each edge represents the influence value of a concept on another. The initial predator map has different concepts. The initial values of these edges (for both predator and prey) are presented in Table ?? A2 in the Appendix of Supplementary Materials. Color of an edge shows inhibitory (red) or excitatory (blue) effects

Reproduction

Two individuals sharing similar genomes (based on a certain threshold), being in the same cell and having enough energy may reproduce if they both choose the mating action in the same time step. Successful reproduction increases fitness for an individual, which we define in EcoSim as the sum of its age of death plus the death ages of its offspring. The fitness computation is performed only after termination of a run of the simulation for analysis purposes, and therefore, it does not affect the prey during the simulation itself, for example, by select them or altering reproduction rates. The measured fitness is an emerging property of the co-evolution of the behavioral models, the resulting interactions between individuals and the change in the environment. In the event of successful mating, the two parents will produce one offspring that has a genome which is a combination of its parents’ genomes, plus some mutations. Mutations allow new connections between concepts of the FCM to form, old ones to disappear, or they may change the strengths of connections between concepts.

Energy

Energy flow in EcoSim starts at the level of grass. Through their lifespan, prey can gain energy by eating grass and expend energy with every action they make. There is only one type of grass and each unit of grass contains a fixed amount of energy which prey gain through consumption. Grass is uniformly randomly distributed throughout the world at the start of a simulation. Grass also grows in the system over time, but can become depleted. Moreover, a diffusion mechanism is implemented which allows re-growth of grass in any depleted cell depending on whether neighbouring cells have grass in them. If there is no grass in a particular cell or in any of its eight neighbouring cells then no grass will grow in that cell and there will be a locally empty food patch; otherwise, if one of the eight cells around the empty patch does have grass in it then there is a probability that grass will re-grow in the empty patch. Each cell can hold up to a certain amount of grass. Over-exploitation of resources is possible if the prey population grows too large making re-growth of grass impossible. The energy content of prey depends on a balance between energy inputs and outputs. One type of energy expenditure takes the form of a parental investment. When two parents produce an offspring, they each donate a percentage of a certain maximum amount of energy that can be deducted from both parents and transmitted to the offspring at birth. This parental investment feature is also subject to evolution and can change within a range of values. The amount of energy expended on other actions (including the waiting action) depends on the type of action (see Results Section “Does the trade-off affect the energy of prey and allocation of energy to movement and reproduction”). Furthermore, a more complex genome may evolve to give prey more effective strategies to cope with predators, but more complex genomes are also slightly more energetically expensive. A more complex genome in EcoSim means that the FCM contains more connections (edges) between concepts. Because such complexity evolves under the constraints of energy, there exists a trade-off that is also under selection pressure. For details about rest of possible actions of prey and predator, please refer to supplementary material “Submodels” section and see energy penalty function 1 in “Entities, state variables, and scales” section in supplementary material.

Emergence

The evolutionary process is rooted in the evolution of the individuals FCM through the emergence of new edges, disappearing of others and modification of edge values. This allows the apparition of more complex and potentially more adaptive behaviours. If they show a selective advantage, such behaviours will be preserved and thus transmitted through generations by the process of natural selection. New behaviours that were not ’programmed’ emerge through the course of evolution in order to adapt to a dynamic environment. For example, in the beginning of the simulation, the individuals are scattered randomly throughout the world and after some time steps grouping patters forming spiral shapes are observed. For more information about emergence and emerging behaviours in EcoSim, please refer to the Supplementary Material.

Procedure

In this study, we ran several different simulations to examine the long-term effects of predation risk trade-offs on prey energy, activity and population changes. We executed ten replicates (here on - runs) for each of three conditions: prey coevolving with predators (’high-risk’ prey runs), prey evolving in the absence of predators (’low-risk’ prey runs) and predator-removal after 15,000 time steps of coevolution (’high-then-low-risk’ prey runs). The predator-removal runs are similar to behavioural ecology studies in which predators are excluded from controlled areas (often these studies investigate changes to prey foraging, vigilance, dispersal and fitness when predation risk is partially or completely removed), except for one main difference: these studies are generally conducted over ecological time scales rather than evolutionary time scales and typically do not allow time for evolutionary adaptation to different predation risk regimes. Each run for each condition was allowed to reach 30,000 time steps (about 4000 generations). The data from these runs were previously used to study the effect predators have on the genomic evolution of prey (Khater et al. 2014). All results, figures and summary statistics are presented as averages of all individuals within a trophic level (i.e. all prey individuals and all predator individuals) across the ten runs for each of the three conditions.

Testing significant difference

To evaluate the statistical significance of the differences between the three cases, we use the Welch’s t test which is an adaptation of student t test for two samples with unequal variances. As we plot behavioural characteristics at every time step, we end up with comparing time series. In order to remove any time dependency within the time series known as autocorrelation, we form a sample set for each time series by taking an observation every 500 time steps and calculating the Welch t test for every couple of sample sets that we want to compare (Fig. 2).

Fig. 2
figure 2

The proportion of the total prey population for high risk (blue curve), low-risk (red curve) and high-then-low-risk (green curve) runs that chose a movement action (escape, foraging, socialize or explore) at each time step. Total movement is the sum of all four of these actions and includes all successful and failed foraging and socialization actions

Results

Comparison of high-risk and low-risk prey runs

Do trait-mediated interactions on prey exist in the form of predation risk-foraging trade-offs?

Prey movement was strongly affected by the presence/absence of predation risk (Table 1 and Fig. 3; also in Fig. 2 from Khater et al. (2014)). The total movement (sum of all escape, forage, socialize plus exploration actions) of prey was significantly higher throughout evolution in the simulation when predators were present (paired t test between prey movement for high and low risk prey runs, p value <0.001). On the other hand, low-risk prey evolved to be progressively more sedentary as they chose the waiting action more frequently over the movement actions as seen in Fig. 3 and Table 1. Predation pressure mainly affected the proportion of the prey population that chose escape and foraging actions, and only slightly affected exploration and socialization actions. The most common actions for high-risk prey were escape and exploration, while for low-risk prey they were foraging and exploration (Fig. 3). All four movement actions differed significantly between high-and low-risk prey (p value<0.001). This indicates a foraging-predation risk trade-off and the presence of strong non-lethal predatory effects on prey populations, particularly through the risk-induced escape behaviour of prey. Choosing the escape action give the prey the possibility to increase their distance from predator. However, this action has a direct energy cost, as energy cost is a function of speed (see Supplementary Material section “Entities, state variables, and scales”), and an indirect energy cost (not being able to eat or to go toward a source of food). It has also a direct cost in term of fitness as choosing the escape action prevent the individual from choosing reproduction. Escape action change in time due to behavioural evolution, between low and high risk environment as it is not obvious which strategy will be the most beneficial for the prey.

Fig. 3
figure 3

The proportion of all movement actions that high- and low-risk prey runs spent. The bars show a behavioural tradeoff between time spent foraging and time spent responding to predation risk through escape actions. For high-then-low-risk results refer to Section “Comparison of prey before and after predator removal

Table 1 Average frequency of movement actions of all prey as a percent (%) of the total population of prey, for high- and low-risk prey except for speed which is expressed as number of cells

Ecological studies of prey movement under predation risk (also studied in terms of vigilance, e.g. Brown 1999, or activity, e.g. Skelly 1994) typically report reduced movement (or increased vigilance) in response to predation risk, and foraging is often used as the activity under study. In the present study, although foraging contributes to total movement, these two activities represent different effects of predators. Under high predation risk, prey are more active overall but forage less frequently, but when there is no predation risk they are less active overall and forage more frequently (significant paired t test between foraging in high and low risk prey runs, p value <0.001). High-risk prey were not only more active but they also moved faster than low-risk prey by traversing more cells in the world: on average, high-risk prey moved 3.61 times faster than low-risk prey (significant paired t test between prey speed in high and low risk prey runs, p value <0.001)(Figs. 4, 5).

Fig. 4
figure 4

Grass density is the total units of grass divided by the number of prey population in the world, for high-risk (blue curve), and low-risk(red curve) and high-then-low-risk (green curve) prey

Fig. 5
figure 5

Average grass units for high-risk (blue curve), low-risk (red curve) and high-then-low-risk (green curve) prey

Although there was a large difference between high-risk and low-risk prey in their foraging behaviour, the difference in frequency of successful eating actions was smaller but also significant. On average, 18.61 % (std of 4.6 %) of high-risk prey and 17.48 % (std of 10.8 %) of low-risk prey successfully obtained food throughout the simulations (significant paired t test between prey eat in high and low risk prey runs, p value <0.001). Thus, high-risk prey foraged less frequently than low-risk prey but were more successful at eating grass. The main factor accounting for the difference in successful eating may have been the movement of prey because this affected the frequency of encountering food in the world, and therefore, its consumption and availability in the world, which differed significantly between high- and low-risk prey as seen in Fig. 5 (Khater et al. 2014) and Fig. 4. Predation risk-induced prey movement was in fact beneficial to the recruitment of grass because it prevented overgrazing of local food sources, as can be seen by a steady grass density for high-risk prey and steady level of grass in the world, and a dramatic decline in grass density and grass level for low-risk prey (all significant paired t test between grass levels in high and low risk prey runs, p value <0.001). Without predator, the prey population grows very fast depleting most of the grass which in turn lead to a very strong decrease of the prey population which can be seen as a peek in low-risk prey population 8. Then, the system needs a lot of time to recover from this ’catastrophic’ event . As grass became progressively depleted, the proportion of failed eating actions also increased for low-risk prey. These types of interactions where predators modify consumer-resource interactions—in this case causing predation-sensitive foraging and overgrazing—can even overcome the density effects of predation itself (Peacor and Werner 2004). Here, we add that these third-party effects can hold over much longer time scales than considered by these authors, even allowing for evolutionary processes to occur such as adaptation to variable predation-risk environments and density effects. Overall, the trends in grass abundance between the two prey groups show evidence for indirect (cascading) effects in EcoSim as predators kept grass levels stable for high-risk prey, while their absence led to a dramatic decline in the long run for low-risk prey.

Does the trade-off affect the energy of prey and allocation of energy to movement and reproduction?

Average energy consumption and budgets are presented in (Table 2). On average, high-risk prey had significantly greater energy budgets of 329.33 units (std of 13.74 units) compared to 282.28 units (std of 9.33 units) for low-risk prey (paired t test between prey energy budget in high- and low-risk prey runs, p value <0.001). Furthermore, predators greatly influenced the way in which prey allocated energy to their actions, both in terms of the proportion of their energy budgets they spent on each type of action and also in the trends of energy expenditures throughout evolution. Of all movement actions foraging was the most energy costly action for low-risk prey, while explore and escape were the most energy costly for high-risk prey. These differences indicate unique behavioural adaptations to managing energy budgets.

Table 2 Average energies (with std between brackets) consumed by prey while engaging in each type of action

Energy investment in reproduction also differed significantly (paired t test between prey reproduction in high- and low-risk prey runs, p value <0.001), with high-risk prey consuming more energy for reproduction in proportion to their average energy budgets. For both high-risk and low-risk prey groups, the energy spent on reproduction represents the largest single portion of energy budgets. Despite having higher energy budgets (in part due to higher rates of successful eating than low-risk prey), high-risk prey spent proportionally more energy on reproduction compared to low risk. This results reflects the adaptation of low-risk prey to achieve higher reproduction rates and can also be seen as a significant reduction in the energy invested in offspring compared to high-risk prey (paired t test between percentage of energy transmitted to offspring in high and low risk prey runs, p value <0.001). Comparing the energies of movement actions and reproduction actions reveals another trade-off for prey in EcoSim. The antipredator behaviour escape may be a good temporary strategy for survival from an energy and survival perspective, but it still makes substantial decreases in overall energy so less will be available for future reproduction. Thus, individuals have to balance current survival with future reproductive potential. Through the evolutionary process, prey would have adapted their behaviour strategy to allow reproduction and survival under the constraints of energy budgets. This trade-off was not present at the beginning of the simulation but emerged through evolution as prey adapted to a high-predation risk environment.

Do prey adjust their reproductive strategies in response to predation risk?

Predation risk directly influenced prey fitness through reproductive behaviour, as shown in Table 3. High-risk prey attempted reproduction much less frequently compared to low-risk prey, so predators effectively suppressed reproduction (significant paired t test between prey reproduction in high and low risk prey runs, p value <0.001). While the reproduction action was chosen at a relatively constant frequency by high-risk prey, it was chosen with increasing frequency by low-risk prey, indicating a behavioural adaptation through evolution (Fig. 6). However, reproduction actions were more often successful for low-risk prey than for high-risk prey. High-risk prey were less likely to choose reproduction because they engaged in other actions such as escape and explore more frequently. Although low-risk prey gained more energy from more frequent successful eating actions than high-risk prey (Table 2), the energy budgets of prey were affected more by expenditures than by energy intake. Not only is reproduction much more energetically expensive than movement, but the birth rate was also greater for low-risk prey than high-risk prey (significant paired t test between prey birth rate in high- and low-risk prey runs, p value <0.001). Higher birth rates also took an energetic toll on parental investment of energy as low-risk prey invested smaller and decreasing amounts of energy in their offspring throughout evolution compared to high-risk prey (significant paired t test between percentage of energy transmitted to offspring in high and low-risk prey runs, p value <0.001) (Fig. 7). This shows that there is a trade-off between reproduction rates (Fig. 6) and parental investment (Fig. 7) due to limitations in energy budgets, and their reproductive strategies are context-dependent. High-risk prey exhibited a reproduction pattern characteristic of K-selected species due to evolution in relatively stable environment of constant risk (see Predator Population section below) and food resources, i.e. they had lower reproduction rates, longer lifetimes (Table 5) and invested more in their offspring. In contrast, low-risk prey exhibited a reproduction pattern similar to r-selected species due to evolution in a highly unstable environment with respect to food resources, i.e. they had higher reproduction rates, shorter lifetimes and invested less in their offspring.

Fig. 6
figure 6

Proportion of high-risk (blue curve), low-risk (red curve) and high-then-low-risk (green curve) prey populations choosing reproduction action, including all successful and failed attempts

Fig. 7
figure 7

Percentage of maximum allowed transmitted energy to offspring at birth for high-risk (blue curve), low-risk(red curve) and high-then-low-risk (green curve) prey

Table 3 Demographic characteristics as a percent (%) of population for high- and low-risk prey conditions)

What are the effects of predation risk on prey population?

Birth rates and death rates were significantly higher (paired t test between prey birth rate and death rate in high-risk and low-risk prey runs, p value <0.001) in low-risk prey than in high-risk prey (Table 3). While birth and death rates were relatively stable for high-risk prey, they increased gradually for low-risk prey. The consequences on population growth were very different for the two prey groups (Fig. 8 Khater et al. 2014). Increasing birth rates resulted in population growth for low-risk prey, while the high-risk prey population was relatively stable over time with very slight oscillations (Kṙivan 2007). This indicates that predators exerted population control on high-risk prey. Death rates are reported here as total causes of death, although EcoSim records three different causes of death (predation, low energy and old age) for the high-risk condition, and two different causes for the low-risk condition (low energy and old age). Causes of death were similar in ranking for both prey groups: for both prey groups, the most frequent cause of death was energy and the least frequent cause of death was old age. Average death rate from low energy as a proportion of the population was 5.75 % for low-risk prey and 3.14 % for high-risk prey. Average death rate from old age as a proportion of the population was 0.23 % for low-risk prey and 0.39 % for high-risk prey.

Fig. 8
figure 8

Total prey population for high-risk (blue curve), low-risk (red curve) and high-then-low-risk (green curve)

Comparison of prey before and after predator removal

In this part of the study, we demonstrated the behavioural adaptation of prey to predator’s removal (’high-then-low-risk’ prey runs). The following sections compare prey before and after predator removal.

Comparison of behaviour

Predation risk kept prey much more active relative to when there was no predation risk (Fig. 2). When predators were removed the remaining prey quickly evolved to decrease overall activity and speed of movement (significant paired t test between first half and second half of runs, p value <0.001) (Table 4). Escape was the dominant form of movement for high-risk prey, but this changed to foraging when predators were removed. This was consistent with results from section “Do trait-mediated interactions on prey exist in the form of predation risk-foraging trade-offs” in showing that behavioural trade-offs between predation risk and foraging exist in EcoSim. Only escape actions decreased in frequency after removal while foraging, socialization and exploration actions increased in frequency and were all statistically significant (p value <0.001). Escape actions accounted for most of the change in the total movement. Overall, these results show that prey in EcoSim adapt quite readily to different predation regimes, although it requires a few hundred times steps for the transition to occur Table 5.

Table 4 Frequency of movement actions as a percent (%) of the prey populations in high-then-low-risk prey runs
Table 5 Average demographic characteristics of prey population in high-then-low-risk prey runs

Grass abundance in high-then-low-risk experiment followed the expected pattern consistent with results from section “Do trait-mediated interactions on prey exist in the form of predation risk-foraging trade-offs” (Fig. 5). Immediately following predator removal at time step 15,000, the grass declined to near zero density since prey were more free to eat and consume local food resources. As grass levels dropped toward zero, two things happened to let grass regrow in the world: (1) eating actions briefly dropped in frequency, and prey started becoming more sedentary which affected their encounter rate with food. As a result, over the next 15,000 time steps, grass density increased from an average of 25.48 grass units per individual (std of 7.4) before removal to 39.02 grass units per individual (std of 26.6) after predator removal (significant paired t test between first and second half of run, p value<0.001) see Fig. 4, which also agrees with the previous results showing cascading effects in EcoSim (Section “Do trait-mediated interactions on prey exist in the form of predation risk-foraging trade-offs”). Frequency of eating actions decreased from 18.08 % (std of 6.4) before removal to 16.90 % (std of 15.8 %) after removal (significant paired t test for both values between first and second half of runs, p value <0.001). Thus, the gradual decline after a peak in grass density around time step 18,000 resulted from overgrazing of local patches which reduced grass recruitment throughout the world.

Comparison of life history traits and demographics

Predator removal had several effects on prey life history traits and demographics (Table 4). The average energy of prey significantly decreased from an average of 319.68 units (std of 14.7 units) before removal to 276.79 units (std of 13.5 units) after removal (p value <0.001). In addition, the percentage of energy transmitted to offspring significantly decreased from 30.33 % (std of 2.6 %) before removal to 28.90 % (std of 3 %) after removal (p value <0.001). Before predators were removed prey had a relatively stable population size, but the removal of predators caused a sudden spike in the population as prey reproduction actions and birth rates temporarily peaked (Fig. 6). Reproduction actions, birth rates and death rates all increased after predators were removed (all significant paired t tests between first and second half of run, p value <0.001), and death by low energy remained the main cause of prey death. Some differences exist in the results (Fig. 1, Figs. 37) between the first 15,000 time steps of high-risk and high-then-low-risk prey runs. This is due to the fact that EcoSim is a complex system with deterministic chaotic behaviour (Golestani and Gras 2010). Therefore, the initial random distribution of the individuals can lead to important differences in the system in long term. However, these differences are always much less than the ones with low-risk prey runs.

Predator population

Prey populations closely mirrored predator population growth. The initial growth of prey permitted exponential growth of predator populations, followed by a plateau and slowly oscillating population size. The level of predation risk exerted by predators depends on the level of observation. At the population level, and over an evolutionary time scale, it would appear that predators exert nearly constant predation risk; however, at the individual level and over just a few time steps, the risk of predation varies greatly. Small-scale fluctuations and large-scale stability in predation risk are shown in Fig. 9. The top-down control of predators is suggested from the first few hundred time steps at the start of all simulations, as well as after predators are removed in the high-then-low risk simulation see Fig. 10. Initially, prey populations increased allowing predator population sizes to grow until a peak was reached, after which both populations stabilized. But when predators were removed the prey population continued to rise and then suddenly declined due to decrease in grass levels; in these runs, grass level showed the opposite pattern as it lagged behind prey population growth.

Fig. 9
figure 9

Total prey (blue curve on left axes) and predator (black curve on right axes) population for high-risk runs

Fig. 10
figure 10

Total prey (blue curve on left axes) and predator (black curve on right axes) population for high-then-low risk runs

Discussion and conclusion

In this study we characterized the effects of predation pressure on prey behaviour, energy and fitness in a novel individual-based evolutionary simulation called EcoSim (Gras et al. 2009). We found that predation pressure plays a large role in structuring the virtual predator-prey ecosystem and in the outcomes of their interactions throughout evolution. Predation pressure had large non-lethal effects on prey foraging, movement and reproduction behaviours, which in turn influenced prey population structure. Prey exhibited predation risk-foraging trade-offs similar to those observed in nature. Although non-lethal effects of predators on prey is not a new topic in behavioural ecology, some recent studies have shown that these effects can be as important as or even more important than direct predation in structuring ecosystems (see Introduction) and are under continued investigation. Our theoretical results accurately replicate phenomena found in naturalistic predator manipulation studies. In particular, our results support the role of trait-mediated interaction in structuring ecosystems, for example, by affecting population size and by exerting top-down indirect effects where predators stabilize the recruitment of grass through cascading effects. EcoSim extends these findings to an unprecedented scale of population size and time frame, incorporating evolutionary processes that are lacking in ecological studies of non-lethal predator-prey interactions (Pelletier et al. 2009).

Trade-offs, prey movement and predators

The concept of trade-offs is central to our understanding of non-lethal effects in predator-prey interactions and their outcomes (Lind and Cresswell 2005; McNamara and Houston 1986). In EcoSim, we observed several types of trade-offs. First, prey exhibited trade-offs between foraging and predation risk: foraging effort was reduced where predation risk was higher. Second, prey exhibited trade-offs between survival and reproduction: antipredator activity (escape) coincided with reduced reproduction rates. Third, prey exhibited trade-offs between reproduction rates and parental investment: where reproduction rate was higher the parental investment was smaller and declined over time. While each of these relationships is well documented with countless examples in the ecology literature, their combined effects are less well understood because of the complexity of the underlying physiological mechanisms, temporal variability in predation-sensitive behaviours and diversity across taxa that make results less generalizable, among other factors (Lind and Cresswell 2005). In the present study, we suggest that these trade-offs can be studied in an integrated way through their combined effects on three main outcomes: prey migrations, fitness and adaptations. (Fitness and adaptations are discussed below.)

Antipredator behaviours that involve moving to safer areas to reduce risk may lead to prey migration over larger geographic areas (Fryxell et al. 1988; Fryxell et al. 2007; McCauley and Rowe 2010; Wooster and Sih 1995; Hebblewhite and Merrill 2007). In EcoSim, as in nature, predator-induced movement results in large-scale migration patterns as high-risk prey increased their activity (Kṙivan 2007) (see ?? Supplementary Materials). As individuals moved through the world they encountered variable quality food patches that resulted in reduced foraging; however, this also prevented overgrazing of local food patches and stabilized the availability of food in the world. The role of predators in chasing prey to new habitats over large distances cannot be underestimated (Lima 2002). The dynamic behaviours of predators are crucial to understanding phenomena of predator-prey interactions that arise at large spatial scales and would not be observable if predators were assumed inert or immobile or to exert constant predation risk on prey (Lima 2002). In EcoSim, we find that predator distributions match those of high-risk prey, as might be expected of prey that have effective strategies for reducing encounters with predators (Wirsing et al. 2010), but did not match the distribution of prey’s resource distribution, as predicted by predator and prey space games (Hugie and Dill 1994; Hammond et al. 2007). The assumptions of our model, including the distribution and growth of prey resources, population size and the behaviours that result in foraging-predation risk tradeoffs may account for this discrepancy in findings. However, our results were consistent with the predator-prey space game prediction that prey distribution would not be correlated with their resource distribution. Additionally, our findings suggest that the trait-mediated effects are more important for understanding the spatial distribution of prey in EcoSim than is patch quality. Still, the interaction between predation risk and resource availability remains important for predicting prey activity (Anholt and Werner 1995; Creel et al. 2005). Our results in EcoSim show how small-scale non-lethal predator-prey interactions can manifest to large-scale migrations (Hebblewhite and Merrill 2009) when predators and prey are allowed to behave dynamically (Kṙivan 2007). Future work will need to examine predator prey interaction at greater resolution to determine how small-scale tradeoffs in risk and foraging success translate to large-scale phenomena such as ’predator-prey shell games’ and ’predator pass-along effect’ (Lima 2002) and hierarchical distributions (Morris 1987; Russell et al. 1992). In future work, we also want to add prey hiding, as an anti predator behaviour alternative, by studying the effect of giving benefit to a no-movement ’wait’ action.

Energy and fitness

In reviewing the literature on antipredation behaviours and their effects on fitness (Lind and Cresswell 2005) showed that animals use complex, compensatory behavioural strategies in responding to predators that make predictions about ultimate effects on fitness very difficult. The authors suggested that by measuring the energy (or time) equivalents of these antipredator and compensatory behaviours, we can compare these various strategies unambiguously and their resultant effects on fitness will be clearer. Our findings of differences in energy budgets and expenditures suggest that the complexity of behavioural interactions between predators and prey can be captured by this measure and can help predict the true effect—accounting for non-lethal effects—of predation risk on fitness. We observed three key findings with respect to energy budgets of EcoSim prey. First, we found that energy budgets differed between prey groups: energy was greater for high-risk prey than for low-risk prey. Second, we found that prey allocated energy budgets differently between prey groups: high-risk prey spent proportionally more energy on reproduction compared to low-risk prey. Third, we found that maternal investment in offspring (in terms of offspring energy at birth) differed greatly: high-risk prey invested a constant amount of energy in their offspring, while low-risk prey invested a decreasing amount of energy in their offspring over time. These differences largely reflect a trade-off between reproduction rate and energy investment in offspring, which resulted in a higher death rate due to low energy for low-risk prey (5.75 %) than for high-risk prey (3.15 %). Therefore, energy budgets can not only directly impact fitness (Lemon 1991) but may also interact with reproduction rates to affect fitness (Downes 2001; Korpimaki et al. 1994; Peckarsky et al. 1993).

Empirical studies have shown situations when prey can allocate energy differently depending on the level of predation risk, whether by investing more resources in antipredator defenses or by reducing other energetically expensive activities such as reproduction (Trussell et al. 2011; Fraser and Gilliam 1992; Wisenden 1993), or by other means. For example, Daphnia carinata (a small water crustacean) grow defensive crests when predation risk is high which results in less energy being invested into offspring production, as seen by their smaller eggs relative to D. carinata grown in low-risk environments (Barry 1994). In this study, Daphnia did not change food intake, so there was a clear indication that energy was allocated differently as a function of predation risk. However, when foraging success does differ between prey under different levels of predation risk their energy budgets may also differ. Predators can effectively suppress prey foraging or can alter diet selectivity, and thus decrease their food intake or their energetic return (reviewed in Verdolin (2006)), a result that contrasts ours. The difference between our results and the empirical literature may arise from the assumptions of our model. We observed that energy budgets are affected more by energy expenditures, in particular by reproduction actions, than by energy intake since the high- and low-risk prey groups had similar successful eating rates (Table 2, section “Do trait-mediated interactions on prey exist in the form of predation risk-for aging trade-offs”). We may not expect in nature that when predation risk is low the reproduction rate increases so dramatically to result in reduced energy budgets relative to prey that are still under predation risk. However, the switch to a lower reproduction rate for the high-risk prey was beneficial because it offset the costs of reproduction, allowing them to invest proportionally more in energy in their offspring. We find this in nature when some organisms postpone reproduction during periods of high predation risk (Magnhagen 1990; Ylönen 1994), a strategy which may be beneficial in the long run under variable risk conditions (Candolin 1998). Future work in EcoSim will need to investigate the extent to which each individual behaviour affects energy budgets, and how behaviours interact to affect energy budgets and fitness.

Time scale, evolution and emergence

The time scale of our study differs from the time scale considered in behavioural ecology. To date, there have been several long-term ecological studies spanning from a few years to a few decades that have tracked prey population changes in response to predators, particularly with snowshoe hare in the Yukon and elk in Yellowstone National Park (Krebs et al. 1995; Creel et al. 2005). Although ecological and evolutionary processes can simultaneously affect the outcomes of predator-prey systems (Abrams 2000), few studies have considered the evolutionary consequences of adaptations to predation risk (Yoshida et al. 2003; Pelletier et al. 2009). EcoSim extends beyond ecological time scales by allowing prey to adaptively evolve to different predation regimes and giving rise to distinct gene pools of prey (Khater et al. 2014). Environmental stability, stabilizing or destabilizing selection pressure and, most importantly, predator and prey traits that affect capture rates all influence coevolution and stability of predator-prey systems (Abrams 2000). In EcoSim, the ability of predators to capture prey and the ability of prey to evade predators both depend on speed and vision distance. While vision distance does not exhibit phenotypic plasticity and is not susceptible to mutation in the current version of the simulation, speed is an outcome that is affected by the interactions between the FCM and the environment and hence can change (within a range of values). Thus, the speed of both predators and prey is under selection pressure. In addition, short-term behavioural interactions are not so clearly linked to long-term evolutionary outcomes as a short-term strategy of predator avoidance may not always be optimal in the long-run. For example, Watson et al. (2007) showed that when prey used a recurrent vigilance strategy coupled with low foraging activity in high-risk situations this led to long-term decreases in fitness, most likely caused by high risk of starvation and reduced energy intake. In future analyses, it will be interesting to see how other traits that affect pursuit and capture will affect stability and evolution of the system when plasticity is allowed.

The evolutionary processes built into EcoSim facilitated many emergent properties and temporal trends in behaviours. In addition to the behavioural tradeoffs and r- and K-selection traits discussed above, prey also evolved energy allocation strategies. We found that low-risk prey tended to act as ’energy maximizers’ (Schoener 1968; 1971): their fitness benefits from foraging increased with foraging effort, so they foraged as much as possible to meet energetic needs for continued reproduction while spending less time doing non-foraging activities. By contrast, high-risk prey tended to behave as ’time minimizers’ (Schoener 1968; 1971): they spent more time doing activities other than foraging such as escaping and socializing, and their energy benefits to fitness was fixed as seen by a relatively constant reproduction rate and near constant parental investment of energy. The relatively stable but different energies of high- and low-risk prey suggest that they evolved optimal energy strategies. Previous models have explicitly assumed that behaviour decisions are made to optimize energy (Tschirhart 2004). We add that behavioural decisions can be mediated by energy in a way leading to adaptive-evolutionary changes.

Modeling in ecology & ecosim

Ecological modeling is moving away from fixed interactions between prey and predators and toward flexible, adaptive models that consider trait-mediated interactions through both computational simulations and mathematical-analytical approaches (Bolker et al. 2003). Our study of prey behaviour in EcoSim extends the use of IBM to investigate several key areas of interest. For instance, many studies have focused on the links between phenotypic plasticity of predators and prey and consequences within food webs (e.g. Abrams and Matsuda 1993; Krivan 2003; Křivan and Schmitz 2004). In our model, the adaptive behaviour of prey and predators allow us to investigate the impact of nonlethal effects on resource persistence, bottom-up effects, trophic cascades and apparent competition. Second, modelling studies have revealed that adaptive behaviours can result in nonlinear effects to population changes, functional responses and population instability (Abrams 1987; van Baalen et al. 2001; Luttbeg and Schmitz 2000). Our study presents findings that link the plasticity of prey foraging and population stability in the presence of predators in a simulation that does not specify functional responses and instead treats them as an emergent property of the system. However, since both predators and prey behave adaptively, this will allow us to characterize functional responses in future studies, and probe further into the nature of population stability and persistence, but extends this to an evolutionary timescale. Third, studies suggest complex decisions are made with a context of ’informational space’, i.e. a set of cues that are hierarchically organized, vary spatially and temporally, influence organisms’ decisions about how to balance foraging and predation risk, where to find breeding habitats and other behaviours (Schmidt et al. 2010) and may be responsible for nonlinear and cyclical responses to predation risk (Luttbeg and Trussell 2013; Luttbeg and Schmitz 2000). EcoSim allows us to manipulate the complex underlying sensory and perceptual traits that drive trait-mediated interactions. In addition, the strength of the interaction between predators and prey is dependent on their knowledge of the presence of predators, the detection of predators (i.e. vision distance) and on the speed of both predators and prey (Luttbeg and Schmitz 2000).

Conclusion

Many authors stress the importance of more integrative work in the study of predator-prey systems. Although all behaviours that effect fitness are under selection pressure, the impact that any one behaviour has on fitness is very difficult to measure and can lead to counter-intuitive results if other behaviours are not accounted for (Lind and Cresswell 2005). Behavioural ecologists are particularly adamant about the need to consider multiple compensatory behaviours when determining the fitness consequences of antipredation behaviour (Lind and Cresswell 2005). Such a research agenda would work best if the full range of organisms’ compensatory behaviours were understood in terms of their energetic costs and benefits, but this has not been done (Bolker et al. 2003). Since energy budgets directly impact fitness through the allocation of energy to reproduction and to offspring (Lemon 1991), all behaviours that affect energy intake or expenditure should evolve to optimize energy budgets for allocation of energy to fitness, even under conditions of variable predation. Yet, among current models of prey behaviour, for example the Risk Allocation Hypothesis (Lima and Bednekoff 1999), there are limitations in accounting for the trait-mediated effects of predators on prey foraging, activity and reproduction in predicting community-level outcomes (Abrams 2007). Other ecologists have stressed that empiricists and theoreticians must work together to build models that make accurate predictions of evolutionary phenomenon based on small-scale and short-term ecological data, particularly by acknowledging trait-mediated effects (Bolker et al. 2003). The complexity of ecosystems and behaviours of organisms present real problems for ecologists looking to understand how nature works, but by integrating information from multiple fields and multi-dimensional studies this may be possible. EcoSim offers a flexible environment with many levels of complexity where large-scale evolutionary phenomenon can be examined. We have shown that it can be applied to study how prey behave in response to predators and how this behaviour affects their energy budgets and fitness, and generates ecologically accurate results comparable to many empirical studies. As we have made theoretical predictions for the evolutionary outcomes of predator-prey interactions in terms of energy and fitness, the next step would be to compare these results to more long-term observational studies in nature.