Abstract
Ecosystems greatly vary in their species composition and interactions, yet they all show remarkable resilience to external influences. Recent experiments have highlighted the significant effects of spatial structure and connectivity on the extinction and survival of species. It has also been emphasized lately that in order to study extinction dynamics reliably, it is essential to incorporate stochasticity and in particular the discrete nature of populations, into the model. Accordingly, we applied a bottomup modeling approach that includes both spatial features and stochastic interactions to study survival mechanisms of species. Using the simplest spatial extension of the LotkaVolterra predatorprey model with competition, subject to demographic and environmental noise, we were able to systematically study emergent properties of this rich system. By scanning the relevant parameter space, we show that both survival and extinction processes often result from a combination of habitat fragmentation and individual rare events of recolonization.
Introduction
Extinction and survival of species are the two extremes of population dynamics. Generations of theoretical ecologists tried to model different aspects of the rich dynamics observed in natural populations and communities. For example, the complex interactions between the various species in an entire ecosystem is mostly modeled by trophic networks^{1,2}. On the other end, for a single species, rigorous analytical treatment of the stochastic dynamics can be achieved^{3,4}. Moving from a singlepatch view, the incorporation of space into the model was initially pursued using the concept of metapopulation^{5,6}.
The patchoccupancy approach to metapopulations was used to study the steadystate fraction of occupied patches using the local probabilities of colonization and extinction^{7,8}. Later on, stochasticity was added to this approach, resulting in stochastic patchoccupancy models (SPOMs). SPOMs incorporate the probability of patches to be occupied as a function of local rates of colonization and extinction, which depend on factors such as patch quality and connectivity^{9}. However, SPOMs lack explicit population dynamics and thus do not include “mass effects”  a term referring to how variation in population densities can affect migration^{10,11}. Depending on rates of migration and local heterogeneity in the metapopulation, neighboring patches can be synchronized or asynchronized, leading mass effects to alter the probability of local recolonization^{12}. Furthermore, “rescue effects” whereby populations on the brink of extinction are recovered by an inflow of individuals from occupied patches can be generated by mass effects^{13}.
Combining space and species interactions resulted in the concept of metacommunity, a framework proposed to study interconnected communities of interacting species^{14,15}. Metacommunity models are used extensively in recent years^{16,17}, often with a simplification of using only a small number of species. In particular, victimexploiter models such as predatorprey systems are very popular first step approximations in studying more diverse ecosystems, dating back to the classical LotkaVolterra equations^{18,19}.
A long term paradox of spatially extended predatorprey systems is the fact that local dynamics tend to be unstable while the global dynamics escape extinction. The unstable properties of small systems were shown already in the 1930's by the seminal experiments of Gause^{20}. Recent experiments with predatorprey^{21,22,23,24,25} hostparasite^{24} and single species^{26,27} systems imply that migration amongst spatial patches is a twoedged sword: if too weak, it doesn't allow recolonization of empty patches by their neighbors hence leading to a short lifetime of the system. On the other hand, when too large, the system synchronizes, thus reducing the effect of local refuges, leading to the global extinction of all patches^{28,29,30}. The discrepancy between the system's behavior along the range of migration regimes could be understood by different stabilizing mechanisms^{31}. These involve limited migration coupled to either spatial heterogeneity^{32}, or to stochasticity that induces desynchronization between neighboring sites^{17,33,34}.
Both metacommunity and metapopulation models may still lack essential properties of real space and real migration patterns of individuals. To overcome this issue, hierarchical metapopulation models were recently proposed^{35}. Hereby, we take a different approach, by modeling the spatially extended system on a regular lattice. This approach is simpler compared to hierarchical metapopulation models and require less assumptions on the population structure. On the other hand, it is computationally more intense. Modeling population dynamics on regular lattices exhibits spontaneous emergence of local communities (“islands”)^{36}. These islands effectively move in a collective motion and interact with neighboring communities/islands. Using this framework we investigate predatorprey dynamics, based on the original LotkaVolterra local interactions terms^{18,19}. We add prey competition to the local dynamics^{37}, in order to limit the maximum prey population, thus allowing us to study how predators invade a stable prey population and how prey can survive this invasion using individual migration patterns.
Modeling scheme
We follow Durret and Levin^{38} by looking at four modeling categories for describing ecosystem dynamics (see Fig. 1). In this way, the impact that spatial features and discreteness of individuals have on these systems can be systematically evaluated^{39}. We begin by modeling the system using a set of Ordinary Differential Equations (ODE). This is a meanfield, singlepatch approach where a species population is described by a single continuous density. The addition of explicit space results in ReactionDiffusion (RD) equations, where spatial patterns and complexity emerge. A different approach uses stochastic singlepatch (SSP) models, that neglects space, but individuals are taken as autonomous entities that stochastically interact with each other. Finally, the combination of the RD and SSP approaches leads to Interacting Particle System (IPS)^{38,39}, in which discrete individuals interact locally and migrate between patches that are connected through an explicit spatial structure.
ODE models are used extensively in various fields and give good results when the modeled system is well mixed and the number of individuals is large^{4}. Analytical solutions can often be found for this set of models and otherwise numerical solutions are generally easy to obtain. One major drawback of this modeling approach is that in order to study extinction, arbitrary cutoff criteria need to be applied, which may invalidate predictions of extinction events based on this modeling approach.
In the context of ecological systems and predatorprey interactions, many ODE models use different non linear terms to include complex interactions. For example, Rosenzweig & Macarthur^{37} used the type II functional response^{40} to implicitly incorporate the time it takes one predator to handle a single prey unit. Here, we modeled the predation using the simple type I functional response^{40}, as we aim to capture the simplest possible model while maintaining the discrete and spatial properties of real systems, as described below.
The inclusion of space into a local continuous model naturally leads to the RD modeling approach, which is often analyzed with standard tools for solving partial differential equations^{41}. Using these tools, analytical approximations can be made in some cases, but more often, numerical methods are applied. Spatiotemporal dynamics, such as invasion fronts and scale free patterns, often emerge from basic model assumptions using the RD modeling approach^{42,43,44}. This is also a natural setting to study the effects of environmental noise, as it can easily be incorporated into the model^{45}. However, since the species densities are continuous, studying extinction is still problematic for the same reasons as described above.
A direct modeling approach to capture extinction events uses individual agents with stochastic interactions between them^{46}. In order to gain tractability, spatial structure is often not included, resulting in SSP models, where all interactions take place on the same site. With discrete numbers of individuals, the model is subject to demographic noise^{3}, naturally leading to the possibility of extinction. For the simple logistic growth dynamics, the timescales for extinction could be obtained using analytical tools under some simplifying assumptions^{4,47}. For more complex dynamics, stochastic simulations can be used^{46}, allowing the study of a wider set of systems.
If however, we do not neglect space, then we have the full blown spatial and stochastic IPS model. Analytical tools for these models are mostly absent and the numerical tools used are often similar to those used for SSP models. Due to the large systems described in this approach, as compared with the SSP case, simulation times are often a major limiting factor. A thorough examination of the model is therefore more problematic, requiring the use of methods that approximate the dynamics of the model^{48}. It is however in this group of models that complex behavior such as extinction due to spatial features of the system can be described. Moreover, since the basic model assumptions are still rather simple and straightforward, it is often possible to retrace complex emergent phenomena to its basic components^{17,34,36,49,50,51,52,53,54}. This contrasts with the more complex modeling approach of Agent Based Models (ABM), in which each particular individual is described separately. Simulations of ABM systems take much longer times and the connection between microscopic behavior and macroscopic phenomena is harder to obtain^{39}.
Current study approach
In this study we use an IPS model (the “ABC” model) to investigate the influence of spatial heterogeneity and discreteness of individuals on the dynamics of species survival and extinction. This model, described in detail in the methods section, follows the interactions between A (resource), B (prey) and C (predator) agents. The A agents, that never die out, act as catalysts in the system, allowing for B reproduction to occur in the same location and are thus the source of environmental noise. The B agents reproduce only in the presence of A agents and compete with other B agents. The C agents prey on the B agents, replacing a B agent with a C agent. All these agents interact locally and move stochastically on the underling migration matrix of the system.
By using approximate simulation methods on IPS, the effect of model parameters can be investigated in reasonable times^{55}. This is done by scanning the parameter space for specific relevant parameters and building a parameterspace map, where each point in the map describes the eventual state of numerous simulations under the same conditions. In the context of predatorprey interactions, we chose the predation rate and the prey mortality as the main parameters investigated, as they pertain to the robustness of predators and prey, respectively. We note that a wide set of parameter values has been studied and the specific parameter values chosen do not greatly affect the results described. Using this methodology a more general understanding of the behavior of the system can be gained, showing how the eventual state of the system depends on model parameters. In particular, we are able to trace back global extinction events to the individual migration events that cause them and find their dependence on model parameters.
Results
The importance of being spatial and discrete
We begin our investigation by taking the commonly used ODE representation of the LotkaVolterra equations and adding in turn first spatial heterogeneity, then discreteness of agents and finally combining these two features. For the simple ODE case, the system is generally in coexistence of predator and prey, except when either the predator or prey are very weak (low predation rate and high mortality rate respectively), which leads to survival of the prey or extinction of both, respectively. These three possible phases of the system can be seen in Fig. 2a, combined with phase transition lines derived from linear stability analysis of the ODE system, which are consistent with the simulation results. We move to an RD model with spatial heterogeneity, by randomly distributing a finite number of resource agents in a spatial system. We see no significant effect on the parameter space for this different model, as can be seen in Fig. 2b. This similarity stems from the fact that without discreteness of the predator and prey agents, extinction only occurs when the effective reproduction of the species is lower than its effective mortality. These effective values do not directly depend on the spatial structure, but only on the resource density in the system.
Adding discreteness of agents to the system, instead of spatial structure, has more dramatic effects. Results of the SSP model, seen in Fig. 2c, show a vast region of parameter space where the predators are more efficient in catching prey, leading to the extinction of both predator and prey. This well known consequence of overpredation^{56} occurs when the predators eliminate all of the prey in this singlepatch system, thus left with no food source and die out. It did not occur in the continuous model since prey levels never reach zero in such a setting, but only exponentially small numbers. Finally, by combining spatial heterogeneity with discrete numbers of predator and prey, we reach a more complete description of predatorprey interactions. In this system, resource agents diffuse throughout the system, enabling the reproduction of prey agents when in the same location. Islands of prey agents naturally form around the diffusing resource agents, which interact with other islands and predators, leading to complex emergent behavior^{36,57}. As seen in Fig. 2d, for values of high predation, the system reaches a state where the prey survives, but the predator is absent. This unintuitive result is surprising not only because it is the more efficient predators that die out, but because they go extinct without eliminating the prey in the process. We would like to focus on the survival mechanisms that allow this prey persistence to occur, not when the predators are too weak to hunt them, but when they are too efficient in doing so.
Survival mechanisms
In a predatorprey system, survival mechanisms may refer to the survival of the predators, a transition between Coexistence and Survival phases, or to the survival of prey instead of their extinction, which is the transition between Survival and Extinction phases. We focus on the prey survival and investigate two distinct mechanisms that enable it, stemming from microscopic interactions between discrete agents, moving around in a heterogeneous space. We term these mechanisms “Diaspora” and “Ebola” for reasons that will be explained below.
The Diaspora mechanism allows prey to survive for intermediate predation levels, when prey agents come back from fringe areas of the system to recolonize regions where the prey has been eliminated by predation. To understand this mechanism we look at a simpler system, a single island mesoscopic view, in which a single resource agent supports a population of prey agents around it.
To this island we then insert predator agents and see how this system reacts over time and how its final state depends on system parameters. The evolution of the system after the introduction of predator agents strongly depends on the predation rate, as seen in Fig. 3a. For very low predation rates (V), the predators are inefficient and simply die out without any significant effect on the prey population. With higher predation rate however (IV), the effective predation rate is high enough to overcome the predators own mortality and a coexistence of predator and prey is reached in a monotonic manner.
Coexistence is reached in a less direct manner for medium levels of predation (III). For these values of predation rate, a singlepatch system would end up in extinction, but here the addition of space plays a significant role. Shortly after the introduction of predators their numbers explode in the central site and the prey are eliminated from that site. The predators also spread to neighboring sites, but due to lower numbers of prey they cannot multiply as quickly and so the fringe prey populations are largely untouched. As the predator numbers drop in the central site the prey agents from the fringe slowly move back to the main site and are not killed as quickly by the predators, due to their low numbers. The prey agents now multiply by the use of the resource agent and the cycle can now go on, with predator numbers jumping due to high prey concentration. These cycles are damped by the limiting factor of the prey competition, so that the system settles to a coexistence state. The stabilizing effect of the fringe sites seen here, which leads to coexistence in spatial heterogeneous systems, has been previously described as a migration induced stability^{32,58}.
This rescue effect, of fringe prey population returning to repopulate an extinguished island, is what allows the Diaspora survival mechanism to take place. For higher predation rate (II), the prey population after a predator invasion is largely decimated, with only a sparse population of prey in the fringe. The probability of each prey agent to come back to the resource site is negligible, but taken as a whole, the prey have a viable chance to reform an island around the resource site. Thus, the Diaspora mechanism is directly affected by the probability of an agent to get to a given location in space, often termed a first passage problem^{59}. Given a very high predation rate (I), the number of prey agents to survive the predator invasion is insignificant and thus the probability that any of the remaining prey agent will return to the resource site quickly goes to zero. This transition of survival to extinction can therefore happen if either the prey have a shorter life span, or the predators are more efficient, as seen in Fig. 3b.
Considering how an island in decimated by predators given the opportunity, we are left to ask what happens if the predators cannot reach some of the islands. This scenario allows a different survival mechanism that we term the Ebola mechanism. When competent predators reach an island, they quickly invade into its main site that contains the resource and spread across the island. As described above, the future of the island depends on the predation rate, but regardless of the island's fate, the predators may move on to infect other islands if they are near enough. Thus, if there are enough resources in the systems, all islands become connected and the predators easily migrate across the system. In a system with only a few resource units however, the islands are not connected and the predators cannot migrate between them. In this scenario, if the predation is high enough, the islands reached by the predators will be decimated. The predators will soon follow and die out, leaving the distant islands untouched and given time, the prey will repopulate the system. Thus, the Ebola survival mechanism clearly depends on the spatial structure of the system. Moreover, since a single predator can create a whole new invasion wave if it reaches a distant island, its correct description requires discrete agents. An example of the dynamics of these two mechanisms can be seen in Fig. 4.
For the case of very high predation rate, we use a simple cluster toy model (see methods section) to validate our understanding of these two mechanisms. By assuming each island has an effective radius in which predators can propagate, we ask what part of the system is covered by the islands for this given radius. A system in which more than one cluster of islands exist, will end in a state of prey survival by the Ebola mechanism, while if all the clusters are connected, the Diaspora mechanism might allow prey survival. The results from the cluster toy model are compared to the IPS model in Fig. 5 a&b.
Extinction of the fittest
With the understanding of the mechanisms that allow prey survival in high predation regimes, we can turn to the general question of how predator and prey robustness effects their persistence. As seen in the topbottom arrow in Fig. 5e, we find that predators are more susceptible to extinction if they have a higher predation rate. This result can be seen as a specific case of the “Tragedy of the commons” of over predation^{56}, but we note two interesting additions. First, the predator persistence is increased by the spatial heterogeneity, as seen when comparing the coexistence range of a singlepatch system in Fig. 2c, to the IPS model shown in Fig. 5. Second, despite the over predation by efficient predators, the prey may persist due to the survival mechanisms previously described. This effect however, is largely dependent on the prey's own characteristics. As seen in the leftright arrow in Fig. 5e, more robust prey, with a longer lifespan, leads to extinction of the prey, rather than its survival. This is a side effect of the Ebola mechanisms, that depends on the prey scarcity in space for its survival. If the prey is too abundant throughout space, then the predators can reach all the prey communities and eliminate them. Thus, it is the weaker and scarcer prey, that might survive a predator invasion.
Enrichment and dimensionality
A closer look at the role of resource abundance, by comparing the different parameterspace maps of Fig. 5c–f, shows another paradoxical consequence of the Ebola mechanism. With more resource agents in the system, the region of Extinction of both predator and prey, prevalent for high predation and high prey life span, is enlarged. Taken together with a slight enlargement of the Coexistence region for low predation, these two effects contrast with the classic view of the “Paradox of Enrichment”^{60}. Here, instead of instability due to enrichment, we see that the predators actually benefit, even if only slightly, from the addition of more resources. Further, it is the prey that become unstable by the addition of resources. In the high predation regime, where a low resource density would allow prey survival, more resources bring a higher risk of prey extinction.
We finally look at the effect of system dimension on the results presented. As seen in Fig. 6a&b, the phase regimes are similar for both one dimensional (1D) and two dimensional (2D) systems, but some differences are noticeable. More specifically, we see that the Diaspora mechanism is more dominant in a 2D setting and that the both the Coexistence and the Extinction phases take up larger regions. This appears to be a specific case in which with higher dimensions, possible outcomes become more extreme, with larger coexistence and extinction domains. In the limit of a fully connected system, we nearly come back to the singlepatch system, in which a Survival phase is largely nonexistent and only Coexistence and Extinction prevail.
Discussion
The routes to extinction are numerous, yet natural populations manage to prelude them by various mechanisms. We have shown how having a population made of discrete individuals in a heterogeneous landscape can allow the system to retain its stability, even in adverse conditions. These mechanisms, which allow for the persistence of populations, depend on the probability of individuals to reach far away populations. For parameters in which the transition between survival and extinction occurs, a single individual's migration will determine the fate of the whole population. It is therefore instrumental to use explicit stochastic modeling when investigating the stability of the system and its dependence on system parameters. Moreover, since the migration probabilities depend on the spatial structure of the system, by allowing spatial heterogeneity to emerge from intrinsic properties of the system we can focus on the role of basic species interactions on its stability properties.
Indeed, the choice of predatorprey interactions allows us to do just that. The LotkaVolterra model is quite compelling in terms of the minimal number of assumptions from which the predatorprey systems properties are deduced. Yet its framework has two shortcomings: some of the empirically observed phenomenology cannot be explained and the effects of discreteness and spatial extension have not been followed to their last implications. As it turns out these two issues are solved together, as the effects of discreteness and spatial structure correspond very well to features which would a priori seem to be outside the LotkaVolterra original framework. Overfitness of the prey individuals as could be measured in the absence of predators leads to increased fragility of the prey population to predator attack and overfitness of the predator individuals (as could be measured on a single site) leads to the extinction of the predator population before it even exhausts the prey. Such effects, not expected in the original ODE formulation of the LotkaVolterra systems, are intrinsic to the discrete spatially extended system and are in agreement with the empirical observations^{11,24}.
One may speculate that it is the kind of mechanisms described above that put limits to the degree of individual fitness which is optimal from the point of view of species survival. This leads to the possibility that the ecology is inherently never in equilibrium: as individuals of a species increase their fitness the species survival expectation decreases. Instead of converging towards some optimal plateau, one may rater imagine the ecology as an ever evolving system in which new imperfect species are born, they evolve towards higher individual fitness by the usual Darwinian selection and are eliminated by their excess efficiency, destroying the very ecological basis of their existence. Thus one would have two levels of evolution: The usual Darwinian one that leads to individual fitness increase and an additional one that acts on species. This latter is actually destroying the species whose individuals are too fit, leaving space for new imperfect species to take their place. This macro overindividual mechanisms may facilitate a theoretical framework to account for major biological jumps that take the system out of local equilibrium and throw it into a more efficient but very different global states (unattainable by local optimization). In particular it may constitute a mechanism for the dynamics responsible for punctuated equilibrium.
It is rewarding that an entire series of empirical observations which seem contradictory to the assumptions of the LotkaVolterra model, are in fact are borne out by the LotkaVolterra original framework as soon as discreteness and spatial extension are properly accounted for.
Methods
The model
The “ABC model” considered in this paper describes a system with three types of agents interacting in it; namely: resource (A), prey (B) and predator (C). The system is composed of a finite number of sites linked through a coupling (migration) matrix to form a metapopulation system. Each agent is positioned on a specific site of the system. There is no limit to the number of agents allowed on a site. An agent can react only within that site, or diffuse to adjacent sites according to the connectivity matrix which defines the topology of the system. The probability of an agent migrating is density independent and as such is not affected by the number of agents in the site. Each of the possible reactions and migrations occurs with a specific probability per time unit (rate). The different types of reactions and migrations are described in table 1.
The objective of the current study is to investigate the stability features of the system. In the simulations, we create a semisteady state of the system by initializing the A's and B's randomly and simulating the system in the absence of C's until a time T. The time T is chosen such that there is no qualitative difference between the state system at time T and the state at time 2 · T.
We then introduce a number of seed C agents to the system at a randomly chosen position. We classify the various realizations of the systems in three phases according to their final state:

The Coexistence phase: both B (prey) and C (predator) agents coexist in the system for a long period of time.

The Survival phase: only B agents remain, having survived after the C agents were introduced into the system and eventually went extinct.

The Extinction phase: no B or C agents remain in the system.
Extinction is an absorbing phase  once the number of B and C agents has reached zero, no recovery is possible. Moreover, given the stochasticity of the system, internal fluctuations will eventually take all finite systems into the extinction phase for infinite time. We therefore consider a system to be in a specific phase if it remains in that phase for a long enough time so that only very rare fluctuations (with a probability exponentially small in the system size) will take the system out of its current phase.
Choice of parameters
The parameters chosen in this study represent the system's behavior for a wide range of parameters. The main parameters that were varied are the prey decay rate (β) and the per capita predation rate (γ). These relate to the robustness of the prey and predator, respectively and their values were varied between 10^{0} and 10^{−7}. The other reaction and diffusion rates were kept constant. The prey reproduction rate (α) was set to 0.5, since we are interested in the regime where prey can survive, in the absence of predators, with a few resource agents. The predator decay rate (δ) was set to 0.1 to ensure that the predators are dependent on the prey for long term survival. The prey competition rate () was set to 10^{−6}, to allow for large communities of prey to exist. Diffusion rates for all agent types (D_{A}, D_{B}, D_{C}) were set to 10^{−2}, except for the results shown in Fig. 3, where D_{A} was set to 0 for simplicity. We note that as long as the different diffusion rates have similar values, the effective movement of the A agents compared to the B and C agents is negligible, since many more B and C agents exist, so that at least some of them end up following the A agent whenever it moves to a different site.
Other alternatives to consider spatial heterogeneity exist. One such variation was considered by altering the original AB model^{36} to include mortal A agents that reappear randomly after they die^{61}. This variation showed very similar behavior to the original AB model in which A agents are immortal and move on a lattice similar the A's in the ABC model studied here. Nevertheless, we cannot rule out the possibility that the survival mechanisms described in this paper will change in some extreme limits of the diffusion coefficients or when considering consumable resources (A's).
Numerical methodology
To display the role of spatiality and discreteness, we compared the spatially extended discrete model (Fig. 2d) with models where either the discreteness (Fig. 2b) or the spatial extension (Fig. 2c) or both (Fig. 2a) were missing. The parameterspace maps for the discrete systems in Fig. 2c&d, were obtained by stochastic MonteCarlo simulations, using the following binomial algorithm^{62}:
We consider a time step, Δt, to be a sequence of updates of N sites, where N is the number of sites in the system. The choice of which site to update is drawn randomly from a uniform distribution, independent of previous choices. After updating the N sites, the time is progressed by Δt. A site update consists of the following operations:

The order in which actions are performed (migrations and reactions, as described below) is random with equal probabilities.

Migrations: for each agent type, the number of agents that migrate is drawn from a Binomial distribution b(p_{i}, N_{i}) where N_{i} is the number of agents of type i in the site and p_{i} = D_{i}Δt (D_{i} is the migration rate for agent of type i). The agents that were chosen to migrate are then randomly distributed amongst the adjacent sites, using a binomial distribution as well: if n_{D} agents were chosen to migrate and n_{N} is the number of nearest neighboring sites, n_{D}_{1} = b(n_{D}, 1/n_{N}) will migrate to the first neighbor, n_{D}_{2} = b(n_{D} − n_{D}_{1}, 1/(n_{N} − 1)) to the second nearest neighbor and so on.

Reactions: several different reactions are carried out simultaneously within the site, with reaction probabilities as listed below. The change in number of agents is computed for all reactions first and only later are these summed and the number of agents is updated.
The probabilities of the different reactions that take place, which were then used for the Binomial distribution for each site update, were calculated as:

Prey reproduction probability:

Prey death probability:

Predation probability:

Predator decay probability: P_{γ} = δΔt
where N_{A}, N_{B} are the number of A and B agents at the site where the reaction takes place respectively. The time step size was set to Δt = 0.1 in all simulations. This ensures that the probability for all linear reactions and diffusions are never more than 0.1. With smaller Δt the simulation becomes more like a Gillespie simulation^{46} and the set of equivalent simulations from both algorithms were compared to insure consistency of the results, (see the subsection below describing the comparison to the Gillespie algorithm).
The continuous simulations (Fig. 2a&b), were carried out in a similar fashion, but instead of a binomial distribution, the average probability was used to determine the fraction of agents that will undergo each process. As suggested by the name, the number of agents was allowed to take any nonnegative real value. A cutoff value of 10^{−50} was used at the end of the simulation to determine the fate of the system (A cutoff of unity gives similar results, but requires a much longer run time of the system). We note that these continuous simulations are not completely equivalent to true ODE and RD models, as they use discrete time steps with average probabilities. In practice however, within the parameter range in question, the differences are negligible, as can be gleaned from the phase transition lines in Fig. 2a. These lines were derived from a linear stability analysis of the true ODE system.
The systems were studied either on a 1D (Fig. 2,3,5,6,7) or 2D (Fig. 4,6) lattice with periodic boundary conditions, or a fully connected system, with each site connected to all others via migration (Fig. 6c). The system is initially seeded with a certain number of A agents which are randomly placed, as well as 4 · N B agents, a number large enough so that for all the simulations, sites with A agents will be potentially inhabited by B agents. The system is then run until it reaches a semisteady state of A's and B's (t = 10^{6} was found to be sufficient for that purpose, throughout the parameter space investigated). Here a steadystate indicates that doubling the system initialization time results in a qualitatively identical system. At that time, 10 C agents are put into the site with the highest B density (enough so that the predators can have a chance at predating before demographic fluctuations might eliminate them) and the simulation continues until the phase of the system is determined, as detailed below. All simulations were made using a custom code written in C, using the Tausworthe generator for random number generation available through the gsl library^{63}. For building a parameterspace, 100 different realizations were carried out, each realization having a different randomization seed used for the stochastic simulations. Averaging over additional realizations did not show any qualitative difference on the parameterspace and hence a 100 realizations was considered sufficient. This was repeated for different values of β and γ, mapping the range of these parameters from 10^{0} to 10^{−7} with logarithmic resolution of 10^{0.1}. The average result from these realizations was used for the analysis and for coloring each pixel in the parameterspace maps, with the different phases Coexistence, Survival and Extinction colored by cyan, green and black respectively. These phases were defines as:

Coexistence (cyan)  After the introduction of C agents a system is run for additional 2 · 10^{4} time steps and still has both B and C agents in it.

Survival (green)  A system that has no more C agents, after these were already introduced and has a viable number of B agents (N_{B} > 100) in sites with A agents, (that is, the B agents will continue to survive for a long time). Here we make no further time requirement as in the coexistence phase, since a system with only B agents is generally much more stable than when C's also inhabit the system.

Extinction (black)  A system that has neither B or C agents, before or after the C agents are introduced. No time requirement is necessary as this is an absorbing state.
The Survival phase was further differentiated into three cases, depending on the history of the system that led to this phase (as seen in Figs. 5–7). These are:

Survival by weak predator (red)  No islands of B agents have been wiped out by the C invasion.

Survival by Ebola (green)  At least one island of B agents is left untouched by the C invasion.

Survival by Diaspora (orange)  All islands of B agents have been wiped out by the C invasion.
Cluster toy model
The phase probabilities derived from the IPS model were also analyzed using a cluster model, see Fig. 5a&b. Here, it is assumed that for each A agent an island of B agents exists around it. Since the C's have a higher decay rate than diffusion rate, they can only (on average) pass through sites with a minimum number of B agents. In this respect, each island has an effective radius in which the C's are able to propagate, defined as a dsphere (d being the the dimension of the system). Under the assumptions of this model, if dspheres with a given radius are randomly placed in the system, then as one increases the radius and the number of spheres, initially the spheres will not be connected (NC), but eventually they will make one connected cluster (OC) and finally they will cover the whole system (WS). Although all systems that are WS are also OC, we will refer to these systems as only WS. For a given number of spheres with a certain radius, there is therefore a probability of having either a WS, OC or NC system. The WS state implies an Extinction phase, since the C's propagate through the whole system, killing off all B's, while the NC implies a Survival phase (via the Ebola Mechanism), since the C's cannot reach the different islands. Between these, the OC state gives either a Survival phase (via the Diaspora Mechanism), assuming the surviving B's on the fringe manage to reach an A agent, or an Extinction phase, if they fail to do so.
To calculate the probabilities of the three states, for each different sphere radius and sphere number, 10^{5} different realizations were run with the positions of the spheres randomly chosen from a uniform distribution. All these simulations were conducted for a 1D system with 500 sites. To calculate the effective radius of the island (the radius of the spheres), the profile of B density (its dependence on the distance from an A agent) was averaged from 100 different realizations of single island stochastic simulations (200 sites in a system with 1 A agent). Assuming the C's immediately change all B's in that site to C's (which is approximately the case for high predation rates), then the probability of C's propagating to the next site P_{i}, from a site with N_{B} B agents, is approximately given by the binomial distribution:
Where 1/δ approximates the lifetime of a single C agent and hence approximates the probability it will not diffuse to the next site. The probability P(r) of C's to reach the site that is r sites away from the A agent is therefore:
This function has a sigmoid shape and we can assume that the r value for which it changes rapidly between 0 and 1, is the effective radius in question. We therefore want to find the maximum of its derivative with respect to r. A good approximation for this value is the first moment of the difference function of the probabilities and we use it as the effective radius:
We note that for the calculation of probabilities of OC and WS we use a sphere size of R − 1 and R respectively, since for WS we do not require the C's to continue propagating the last hurdle, only to eliminate the last B's, while for OC we do. We finally note that given an OC state, the probability of the surviving B's to reach the A agent nearest them is approximately:
With N_{B} given by the original B number on a site just outside the effective radius and P_{pass} is a rough approximation of the probability of a single B agent to reach an A agent, assuming a lifetime of 1/β and considering the relation of mean square displacement for a random walker.
Comparison to Gillespie algorithm
The de facto standard method of simulating the dynamics of an agent base model is to use the Gillespie algorithm, as previously mentioned. While it allows to simulate a specific realization of a system with the exact probabilities for all processes, it is very inefficient, especially for a large number of agents. In this study we chose to use a binomial algorithm, as described in the Numerical methodology subsection, which although being an approximation to a correct realization of a system, is more computationally efficient. For example, when calculating the parameterspace (as previously done in this study) for a small system (64 sites), the binomial algorithm was approximately 500 times faster than the Gillespie algorithm. However, the question remains whether the binomial algorithm approximates the dynamics and more importantly, the values measured in the system. The main parameter controlling these values is the time step used for the binomial method, which for consistency, was taken as Δt = 0.1 throughout this study. We compare the results of the algorithms for a small system of 64 sites, choosing two values of prey decay rate and looking at the phase probabilities as a function of the predation rate (Fig. 7).
The Gillespie algorithm takes a specific state of the system and stochastically finds the next event to occur, as well as the elapsed time until it takes place. More specifically the algorithm is:

Choose some initial state of the system (see initial and final conditions below).

Calculate for each site in the system, the rates of all possible events in the system (as detailed below).

Choose at random which event will take place, with the probability of choosing each event taken at its rate as was computed in step 2.

Update the system according to the chosen event (that is, for the case of diffusion randomly choose an adjacent site to move the agent to, or, in the case of a reaction add and/or remove an agent in the given site).

Choose at random a time step, according to an exponential distribution with the mean value of one over the sum of rates of the different possible events.

Update the time using the time step chosen in step 5 and go back to step 2.
Steps 2–6 are repeated until a predefined final condition takes place. The rates of different events, calculated for each site, are:

Total prey reproduction rate: R_{α} = αN_{A}N_{B}

Total prey death rate:

Total predation rate: R_{γ} = γN_{B}N_{C}

Total predator decay rate: R_{δ} = δN_{C}

Total resource diffusion rate:

Total prey diffusion rate:

Total predator diffusion rate:
N_{A}, N_{B}, N_{C} are the numbers of the A,B,C agents in a specific site, respectively.
References
Ings, T. C. et al. Review: Ecological networks–beyond food webs. J. Anim. Ecol. 78, 253–269 (2009).
Montoya, J. M., Pimm, S. L. & Solé, R. V. Ecological networks and their fragility. Nature 442, 259–264 (2006).
May, R. M. Stability in randomly fluctuating versus deterministic environments. Am. Nat. 107, 621–650 (1973).
Ovaskainen, O. & Meerson, B. Stochastic models of population extinction. Trends Ecol. Evol. 25, 643–652 (2010).
Hanski, I. & Gilpin, M. Metapopulation dynamics: brief history and conceptual domain. Biol J. Linnean. Soc. 42, 3–16 (1991).
Hanski, I. & Ovaskainen, O. The metapopulation capacity of a fragmented landscape. Nature 404, 755–758 (2000).
Levins, R. Extinction. In: Some mathematical questions in biology, 75–107 (American Mathematical Society, ProvidenceRI, 1970).
Levins, R. Some demographic and genetic consequences of environmental heterogeneity for biological control. Bulletin of the ESA 15, 237–240(4) (1969).
Rampal, S., Etienne, C. C. V. a. & ter Braak Cajo, J. F. Application of stochastic patch occupancy models to real metapopulations. In: Ecology, Genetics and Evolution of Metapopulations, 105–132 (Academic Press, Burlington, 2004).
Shmida, A. & Wilson, M. V. Biological determinants of species diversity. J. Biogeogr. 12, 1–20 (1985).
Holyoak, M., Leibold, M. A. & Holt, R. D. Metacommunities: spatial dynamics and ecological communities (University of Chicago Press, Chicago, 2005).
Blasius, B., Huppert, A. & Stone, L. Complex dynamics and phase synchronization in spatially extended ecological systems. Nature 399, 354–359 (1999).
Brown, J. H. & KodricBrown, A. Turnover rates in insular bioassayaphy: Effect of immigration on extinction. Ecology 58, 445 (1977).
Wilson, D. S. Complex interactions in metacommunities, with implications for biodiversity and higher levels of selection. Ecology 73, 1984–2000 (1992).
Leibold, M. A. et al. The metacommunity concept: a framework for multiscale community ecology. Ecol. Lett. 7, 601–613 (2004).
Winegardner, A. K., Jones, B. K., Ng, I. S., Siqueira, T. & Cottenie, K. The terminology of metacommunity ecology. Trends Ecol. Evol. 27, 253–254 (2012).
Yaari, G., BenZion, Y., Shnerb, N. M. & Vasseur, D. A. Consistent scaling of persistence time in metapopulations. Ecology 93, 1214–1227 (2012).
Lotka, A. J. Contribution to the analysis of malaria epidemiology. Am. J. Hyg. 3, 1–121 (1923).
Volterra, V. Variations and Fluctuations of the Number of individuals in animal Species living together (Mc Graw Hill, NY, 1931).
Gause, G. F. The struggle for existence (Courier Dover Publications, Mineola, N.Y., 2003).
Kneitel, J. M. & Miller, T. E. Dispersal rates affect species composition in metacommunities of sarracenia purpurea inquilines. Am. Nat. 162, 165–171 (2003).
Ellner, S. P. et al. Habitat structure and population persistence in an experimental community. Nature 412, 538–543 (2001).
Holyoak, M. & Lawler, S. P. Persistence of an ExtinctionProne PredatorPrey interaction through metapopulation dynamics. Ecology 77, 1867 (1996).
Kerr, B., Neuhauser, C., Bohannan, B. J. M. & Dean, A. M. Local migration promotes competitive restraint in a hostpathogen ‘tragedy of the commons’. Nature 442, 75–78 (2006).
Kerr, B., Riley, M. A., Feldman, M. W. & Bohannan, B. J. M. Local dispersal promotes biodiversity in a reallife game of rockpaperscissors. Nature 418, 171–174 (2002).
Dey, S. & Joshi, A. Stability via asynchrony in drosophila metapopulations with low migration rates. Science 312, 434–436 (2006).
Molofsky, J. & Ferdy, J. Extinction dynamics in experimental metapopulations. Proc. Natl. Acad. Sci. U. S. A. 102, 3726–3731 (2005).
Earn, D. J. D., Levin, S. A. & Rohani, P. Coherence and conservation. Science 290, 1360–1364 (2000).
Earn, D. J. D. & Levin, S. A. Global asymptotic coherence in discrete dynamical systems. Proc. Natl. Acad. Sci. U. S. A. 103, 3968–3971 (2006).
Vasseur, D. A. & Fox, J. W. Phaselocking and environmental fluctuations generate synchrony in a predatorprey community. Nature 460, 1007–1010 (2009).
Abta, R., Schiffer, M., BenIshay, A. & Shnerb, N. M. Stabilization of metapopulation cycles: Toward a classification scheme. Theor. Popul. Biol. 74, 273–282 (2008).
Hastings, A. Spatial heterogeneity and the stability of predatorprey systems. Theor. Popul. Biol. 12, 37–48 (1977).
Abta, R., Schiffer, M. & Shnerb, N. M. AmplitudeDependent frequency, desynchronization and stabilization in noisy metapopulation dynamics. Phys. Rev. Lett. 98, 098104 (2007).
Zion, Y. B., Yaari, G. & Shnerb, N. M. Optimizing metapopulation sustainability through a checkerboard strategy. PLoS Comput. Biol. 6, e1000643 (2010).
Watts, D. J., Muhamad, R., Medina, D. C. & Dodds, P. S. Multiscale, resurgent epidemics in a hierarchical metapopulation model. Proc. Natl. Acad. Sci. U. S. A. 102, 11157–11162 (2005).
Shnerb, N. M., Louzoun, Y., Bettelheim, E. & Solomon, S. The importance of being discrete: Life always wins on the surface. Proc. Natl. Acad. Sci. U.S.A. 97, 10322–10324 (2000).
Rosenzweig, M. L. & MacArthur, R. H. Graphical representation and stability conditions of PredatorPrey interactions. Am. Nat. 97, 209 (1963).
Durrett, R. & Levin, S. A. Stochastic spatial models: A user's guide to ecological applications. Philos. Trans. R. Soc. Lond. B. Biol. Sci. 343, 329–350 (1994).
Black, A. J. & McKane, A. J. Stochastic formulation of ecological models and their applications. Trends Ecol. Evol. 27, 337–345 (2012).
Holling, C. S. The functional response of predators to prey density and its role in mimicry and population regulation. Memoirs; no. 45 (Entomological Society of Canada, Ottawa], 1965).
Holmes, E. E., Lewis, M. A., Banks, J. & Veit, R. Partial differential equations in ecology: spatial interactions and population dynamics. Ecology 75, 17–29 (1994).
Sherratt, J. A. Invading wave fronts and their oscillatory wakes are linked by a modulated travelling phase resetting wave. Phys. D 117, 145–166 (1998).
Sherratt, J. A. & Smith, M. J. Periodic travelling waves in cyclic populations: field studies and reaction–diffusion models. J. R. Soc. Interface 5, 483–505 (2008).
von Hardenberg, J., Kletter, A. Y., Yizhaq, H., Nathan, J. & Meron, E. Periodic versus scalefree patterns in dryland vegetation. Proc. R. Soc. B 277, 1771–1776 (2010).
McMurtrie, R. Persistence and stability of singlespecies and preypredator systems in spatially heterogeneous environments. Math. Biosci. 39, 11–51 (1978).
Gillespie, D. T. A general method for numerically simulating the stochastic time evolution of coupled chemical reactions. J. Comput. Phys. 22, 403–434 (1976).
Kessler, D. A. & Shnerb, N. M. Extinction rates for FluctuationInduced metastabilities: A RealSpace WKB approach. J. Stat. Phys. 127, 861–886 (2007).
Gillespie, D. T. Stochastic simulation of chemical kinetics. Annu. Rev. Phys. Chem. 58, 35–55 (2007).
McKane, A. J. & Newman, T. J. Predatorprey cycles from resonant amplification of demographic stochasticity. Phys. Rev. Lett. 94, 218102 (2005).
Ross, J. V. Stochastic models for mainlandisland metapopulations in static and dynamic landscapes. Bull. Math. Biol. 68, 417–449 (2006).
Challet, D., Solomon, S. & Yaari, G. The universal shape of economic recession and recovery after a shock. Economics 3, 1–24 (2009).
Yaari, G., Nowak, A., Rakocy, K. & Solomon, S. Microscopic study reveals the singular origins of growth. Eur. Phys. J. B 62, 505–513 (2008).
Simonis, J. L. Demographic stochasticity reduces the synchronizing effect of dispersal in predatorprey metapopulations. Ecology 93, 1517–1524 (2012).
Behar, H., Brenner, N. & Louzoun, Y. Coexistence of productive and nonproductive populations by fluctuationdriven spatiotemporal patterns. Theor. Popul. Biol. 96, 20–29 (2014).
PinedaKrch, M. Gillespiessa: Implementing the stochastic simulation algorithm in r. J. Stat. Softw. 25, 1–18 (2008).
Hardin, G. The tragedy of the commons. science 162, 1243–1248 (1968).
Agranovich, A., Louzoun, Y., Shnerb, N. & Moalem, S. Catalystinduced growth with limited catalyst lifespan and competition. J. Theor. Biol. 241, 307–320 (2006).
Yaari, G., Solomon, S., Schiffer, M. & Shnerb, N. M. Local enrichment and its nonlocal consequences for victimexploiter metapopulations. Phys. D 237, 2553–2562 (2008).
Redner, S. A guide to firstpassage processes (Cambridge University Press, Cambridge, United Kingdom, 2001).
Rosenzweig, M. L. et al. Paradox of enrichment: destabilization of exploitation ecosystems in ecological time. Science 171, 385–387 (1971).
Agranovich, A., Louzoun, Y., Shnerb, N. & Moalem, S. Catalystinduced growth with limited catalyst lifespan and competition. J. Theor. Biol. 241, 307–320 (2006).
Chatterjee, A., Vlachos, D. G. & Katsoulakis, M. A. Binomial distribution based τleap accelerated stochastic simulation. J. Chem. Phys 122, 024112 (2005).
Gough, B. GNU scientific library reference manual (Network Theory Ltd., Bristol, United Kingdom, 2009).
Acknowledgements
We wish to thank Julia Aronson for helpful discussion and to Jonathan Belmaker and Omri Shalev for careful reading of the manuscript and helpful comments.
Author information
Affiliations
Contributions
Y.Z., S.S. and G.Y. designed the study, analyzed the results and wrote the paper. Y.Z. and G.Y. wrote the code and ran the numerical calculations and simulations.
Ethics declarations
Competing interests
The authors declare no competing financial interests.
Rights and permissions
This work is licensed under a Creative Commons AttributionNonCommercialNoDerivs 4.0 International License. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder in order to reproduce the material. To view a copy of this license, visit http://creativecommons.org/licenses/byncnd/4.0/
About this article
Cite this article
Zelnik, Y., Solomon, S. & Yaari, G. Species survival emerge from rare events of individual migration. Sci Rep 5, 7877 (2015). https://doi.org/10.1038/srep07877
Received:
Accepted:
Published:
Further reading

Climate change forces plankton species to move to get rid of extinction: mathematical modeling approach
The European Physical Journal Plus (2020)

DataDriven Method for Efficient Characterization of Rare Event Probabilities in Biochemical Systems
Bulletin of Mathematical Biology (2019)

How Future Depends on Past and Rare Events in Systems of Life
Foundations of Science (2018)

A spatially heterogeneous Gillespie algorithm modeling framework that enables individual molecule history and tracking
Engineering Applications of Artificial Intelligence (2017)

Mapping of the stochastic LotkaVolterra model to models of population genetics and game theory
Physical Review E (2017)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.