Evolution of specialization in a spatially continuous environment


Florence Débarre, Centre d’Écologie Fonctionnelle et Évolutive, CNRS – UMR 5175, 1919 Route de Mende, F-34293 Montpellier Cedex 5, France.
Tel.: +33 4 67 61 34 24; fax: +33 4 67 41 21 38; e-mail: florence.debarre@cefe.cnrs.fr


We study the evolution of specialization in a spatially continuous (one-dimensional) environment divided into two habitats; we use a general trade-off function relating fitnesses in the two habitats and illustrate our results with two classical trade-off functions. We show that the population can either reach an intermediate value of the trait and be moderately adapted to both habitats (1 generalist), or split into two locally adapted subpopulations (2 specialists). We recover the qualitative results obtained with simpler metapopulation models with island migration: the evolutionary outcome depends on the concavity of the trade-off, on the proportion of each habitat and on migration. Our quantitative prediction on migration, however, depends on isolation by distance. Our spatially explicit model may thus be particularly useful to describe the evolutionary dynamics of specialization in, perhaps, more realistic ecological scenarios.


How to adapt to a heterogeneous environment? And why have some species broader niches than others? These questions on the evolution of generalist vs. specialist strategies have been the subject of numerous theoretical studies (see Wilson & Yoshimura (1994) and Ravignéet al. (2009) for reviews). These studies differ in the way in which the heterogeneity of the environment is modelled. First, usually only one factor is assumed to vary. This may be an abiotic (e.g. temperature, light) or biotic factor (like a prey or a host) (Meyers & Bull, 2002). Resources can be either implicitly modelled, non limiting, or on the contrary vary, and have their own dynamics (Brown & Pavlovic, 1992; Abrams, 2006a,b). Second, different kinds of heterogeneity can be modelled: it can be spatial only and fixed (e.g. Meszena et al., 1997) or spatial with random noise (Wilson & Yoshimura, 1994), temporal only (Slatkin & Lande, 1976; Chesson & Warner, 1981) or even both spatial and temporal (Levins, 1962). Finally, the two habitats are either found in the same well-mixed patch (e.g. Day, 2000; Doebeli & Dieckmann, 2000), which corresponds to a fine-grained environment (Levins, 1968), or are located in two patches (Meszena et al., 1997), or in a metapopulation (e.g. Sasaki & de Jong, 1999; Parvinen & Egas, 2004; Nurmi & Parvinen, 2008) of different patches, with limited or total migration flows between patches. The metapopulation framework is suited to cases where the population is separable into subpopulations; but when a population is distributed continuously across space, a spatially continuous model shall better be used. In addition, in most metapopulation models on the evolution of specialization, the spatial structure remains implicit; there is no explicit notion of distance, and the other habitat can be reached in only one migration step. This kind of metapopulation, often called island model, represents only a subset of all possible metapopulations (Hanski, 1998). Other configurations can include isolation by distance, which can have important consequences. For instance, when it comes to infectious diseases, the spatial arrangement of the metapopulation influences the effectiveness of control strategies (Hess, 1996). An explicit spatial structure of the environment, i.e. isolation by distance, is found in studies on the evolution of niche breadth (Pease et al., 1989; Kirkpatrick & Barton, 1997; Case & Taper, 2000; Doebeli & Dieckmann, 2003; Mizera & Meszéna, 2003; Leimar et al., 2008). In these studies, however, the heterogeneity of the habitat is modelled as a gradient. This hampers the comparison with classical metapopulation models that assume two different habitat types only. Such a comparison has however already been made in the context of the competition between two alleles (Nagylaki, 1975). In Nagylaki's (1975) study, the conditions for polymorphism in a semi-infinite linear (spatially explicit) environment differ from the ones obtained in a corresponding island–continent environment.

In this article, we investigate how adding an explicit spatial structure (i.e. isolation by distance) to traditional two-habitat models influences the evolution of specialist vs. generalist strategies. We model a population under soft selection living in a one-dimensional environment with two contiguous habitats, A and B. With this model, we determine under which conditions generalist strategies evolve. Our hypothesis is that the explicit spatial structure of the environment may influence this outcome: because of distance-limited migration, an individual being in habitat A, but close to the boundary with habitat B, will experience a different local environment than an individual also in habitat A, but far away from the boundary.

Models and methods

The environment

We consider a one-dimensional environment divided into two different habitats, A and B. The proportion of habitat A in the whole environment is q, and S is a measure of the size of the environment (see Fig. 1a). The boundaries (i.e. the edges, at x = −S and x = S on Fig. 1a) are reflecting; this corresponds to a closed environment with reflecting walls, or to an infinite periodical environment (with a period 2S). We can restrict the analysis to the part of the environment between x = 0 and x = S; the results on [−S, 0] are deduced by symmetry.

Figure 1.

 The model. (a) Spatial structure of the environment, which is linear and made of two habitats, in proportions q and 1−q. (b) Trade-off uP derived from power fitness functions (see Eqn 4), for various values of β. (c) Trade-off uG derived from Gaussian fitness functions (see Eqn 6), for various values of the θ/γ ratio.

We study the evolution of a trait s, in a haploid, asexually reproducing population. An individual with a phenotype s has a fitness ρA(s) (resp. ρB(s)) in habitat A (resp. B). We assume that adaptation to one habitat causes maladaptation to the other. In other words, we assume that there is a trade-off function u between the fitnesses ρA(s) and ρB(s) in habitats A and B, such that for an individual with a phenotype s:


As adaptation to one habitat is assumed to be to the detriment of adaptation to the other habitat, the trade-off function u is a decreasing function. This function u is also assumed to be derivable at least twice (and it second derivative is written u’’).

Without loss of generality, ρA is an increasing function of s (mathematically, this means that ρA′(s) > 0). Because of the trade-off, ρB is a decreasing function of s. In other words, an increase in s means both an increase in adaptation to habitat A and a decrease in adaptation to habitat B.

To account for habitat heterogeneity (see Fig. 1a), we define a spatially varying fitness function ri(x), for individuals with trait si:


We analyse the model with the general trade-off u and then illustrate our results with two particular trade-off functions, uP and uG, which are classically used in studies on the evolution of specialization.

The first trade-off uP corresponds to ‘power’ fitness functions (e.g. Egas et al., 2004; Spichtig & Kawecki, 2004) (see Fig. 1b):


Here, the optimal values of s are 1 in habitat A and 0 in habitat B. With these fitness functions, we obtain the following trade-off function uP:


The parameter β determines the global concavity of the trade-off curve (see Fig. 1b): the curve is concave when β is below unity, linear when β = 1 and convex otherwise. Note that a concave fitness curve corresponds to a convex fitness set (Levins, 1962). For the sake of clarity, following Ravignéet al. (2009), we will refer hereafter to concave curves as weak trade-offs, because they correspond to cases where the cost of being a generalist is not high. Similarly, convex curves will be called strong trade-offs.

The second trade-off function, uG, is derived from Gaussian fitness functions (Kisdi & Geritz, 1999; Day, 2000) (see Fig. 1c):


It means that the optimal value of s in habitat A is θ and is −θ in habitat B. The standard deviation of these Gaussian functions is γ, and the θ/γ ratio is a measure of the difference between the two habitats; we obtain the following trade-off function uG:


The θ/γ ratio determines the shape of the trade-off curve (see Fig. 1c). When the two habitats are quite similar, the curve is concave, which corresponds to a weak trade-off; when they are very different, the curve is convex, which corresponds to a strong trade-off. For intermediate differences between the two habitats (θ/γ close to unity), the concavity of the curve changes with the value of s (see Fig. 1c).

Demographical model

We assume that the environment is such that the total density of individuals is fixed and equal to N along the whole environment. In addition, we assume that N is high enough, so that we can neglect the effect of random drift. Space is limiting, and only the frequencies of the different genotypes vary. During a small time interval, a fixed proportion of individuals die (proportional to a factor d), and therefore free up space. The remaining individuals produce offspring, and the quantity of offspring depends on both the genotype and the type of habitat; but this quantity is always sufficient to fill up the recently freed up space (i.e. in terms of individual-level traits, the individual birth rate is always much greater than the death rate (Rueffler et al., 2006)). This offspring compete locally for establishment, and the total density remains the same in the end. In the mean time, adults can migrate with chance m. If they do, the probability of migrating by a given distance is given by a migration kernel which is the density probability function of the distance of migration. We assume that migration is phenotype and habitat independent: all individuals migrate according to the same migration kernel. Migration is not directional: the mean of the migration kernel is zero. The standard deviation of the migration kernel, σ, is a proxy for the range of migration. We neglect higher moments of the distribution and can therefore use the diffusion approximation (see Appendix A for the derivation of the full model). We define pi(x,t) as the proportion of individuals with trait si at time t ≥ 0 and spatial location x,0 ≤ x ≤ S:


with inline image is the mean fitness at time t of the population located at x:


Finally, the following equations are due to reflecting boundaries (9a) and to symmetry around (x = 0) (9b):



Invasion analysis

In this section, we study the conditions for the invasion of a mutant in a monomorphic population. The resident population is assumed to adopt the strategy sr. Can a rare mutant with a strategy sm invade? Without loss of generality, we focus on the cases where sm > sr, that is, where the mutant is better adapted in habitat A than the resident. The mutant invades when its favourable habitat is wide enough. We show (see Appendix B, and also Pacala & Roughgarden (1982) and appendix 2 in Nuismer et al. (2000)) that the mutant invades if and only if the compound parameter inline image is positive:


where a and b are the scaled widths of both habitats:


and wA (resp. wB) is the local invasion fitness of the mutant, in habitat A (resp. B), when there is no migration:


For a mutant trait very close to the resident, the invasion condition becomes



Our analysis of the evolutionary dynamics is based on the geometrical properties of the pairwise invasibility plots (PIP), which are classically used in adaptive dynamics (Geritz et al., 1998). A PIP is a graphic indicating whether a rare mutant with trait sm (on the y-axis) can invade a population fixed for a trait sr (on the x-axis). The mutant invades if and only the point with coordinates (sr,sm) is in a (+) zone of the PIP (see Fig. 2). As in the previous section, we focus on the case where sm > sr, which corresponds to the upper left triangle of the PIP. We use this approach to find singular strategies and to analyse their stability (stability by convergence and evolutionarily stability).

Figure 2.

 Four types of pairwise invasibility plots (PIP). (a) the singular strategy (black dot) is an ESS. (b) The singular strategy is a branching point (grey dot). (c,d) the singular strategy cannot be reached by gradual evolution (not convergence stable) but is evolutionary stable in c (Garden of Eden, white dot), and not evolutionary stable in d (branching point, grey dot).

Singular strategy

Geometrically speaking, on the PIP, a singular strategy is at the intersection between the first diagonal (the y = x line) and the frontier between (+) and (−) zones. The sign of the invasion condition on the diagonal is given by inline image (see Eqn 13). With our model, a singular strategy is a strategy s* at which the invasion condition inline image cancels. We therefore have to solve the following equation for s*:


At the singular strategy, we thus have


With the power trade-off uP (see Eqn 3), this yields:


and with the Gaussian trade-off uG (see Eqn 5), this yields:


In both cases, the singular strategy can be viewed as a generalist strategy. It is indeed the mean of the optimal strategies in each habitat, which are specialist strategies, weighted by the relative proportion of the two habitats. In the following two sections, we determine the stability of this singular strategy.

Convergence stability

A singular strategy is convergence stable when gradual evolution leads to it (Christiansen, 1991; Taylor, 1996). Geometrically, s* is an attractor if we go from a (+) zone to a (−) zone right above the diagonal, near the point of coordinates (s*,s*) (see Fig. 2a,b). In other words, it means that the slope of the invasion condition on the first diagonal (as seen from the upper triangle) is negative near the singular strategy. Mathematically, this means that we have


This condition corresponds to local convergence stability. If this slope is negative on the whole diagonal, then the singular strategy is globally convergence stable.

In our model, the slope on the first diagonal is:


Using the fact that ρA′(s) > 0, the expression is Eqn 19 can be readily used to show that the singular strategy is globally convergence stable when, for any strategy s,


The condition for local convergence stability is easier to fulfil:


The singular strategy s* is convergence stable when the trade-off is weak (concave curve) or moderately strong (moderately convex curve) at the singular strategy s*. Otherwise, s* is a repellor.

With the power trade-off, s lies between 0 and 1, and for global convergence stability (Eqn 20), we have:


With the Gaussian trade-off, s is between −θ and θ, hence s − θ < 0, and we have:


Consequently, for both the power and Gaussian trade-offs, we find that the singular strategies are always globally convergence stable. With these trade-offs, evolution always first brings the population towards s*, whichever the initial value of the trait.


A singular strategy s* is evolutionary stable when a population at s* cannot be invaded by any mutant (Maynard Smith & Price, 1973). Geometrically, on the PIP, the zones right above and under the point of coordinates (s*,s*) have to be (−) zones (see Fig. 2a,c). The function inline image (10) describes the invasion condition for a slice of the PIP taken vertically at sr = s*. When inline image, the mutant with trait sm cannot invade a population fixed for the singular strategy s*. The strategy s* is therefore uninvadable, when inline image for any trait sm close to s*.

Under this condition, we find that s* is not invadable when


The first of these conditions means that the trade-off curve has to be concave at the singular strategy, which corresponds to a weak trade-off. The second condition means that migration has to be high enough for the generalist strategy to be not invadable. When one of the conditions above is not fulfilled, the generalist strategy is a branching point: divergent strategies evolve, and the population ends up being polymorphic.

With the power trade-off, these conditions become:


Recall that the trade-off is weak when β < 1 (see Fig. 1b).

With the Gaussian trade-off, these conditions become:


When the two habitats are not too different (θ/γ < 1), condition (26a) is always fulfilled (i.e. the trade-off is always concave at the singular strategy), and the stability of s* only depends on the intensity of migration: s* is not invadable if there is enough migration (condition (26b), see Fig. 3a). But when the two habitats are more different (θ/γ > 1), there are parameters combinations, such that condition (26a) is not fulfilled, and therefore s* is never stable, no matter the value of migration (see zone (3) on Fig. 3b).

Figure 3.

 Stability of the generalist strategy, with the Gaussian trade-off (see Fig. 1c), depending on the proportion of habitat A (q), and the scaled range of migration (σ/S). (a) The two habitats are quite similar (θ/γ = 0.75). If there is enough migration, the generalist is an evolutionary stable strategy (ESS, zone (1)); otherwise, it is a branching point (zone (2)). (b) The two habitats are more different (θ/γ = 1.25), which alters the concavity of the trade-off function. For intermediate values of q, the trade-off is convex at the singular strategy, and s* is never evolutionary stable, no matter the range of migration (zone (3)).


In this article, we study the evolution of generalist vs. specialist strategies in a spatially continuous environment, made of two contiguous habitats. With the classical assumptions of adaptive dynamics – mutations are rare and of small effect – we follow the evolution of a trait of adaptation. With a general function describing the performance in the two habitats, the values of the singular strategies s* are implicit. These singular strategies s* are reached by gradual evolution (i.e. convergence stable, CS) when the trade-off is weak or moderately strong at s*. They are evolutionary stable (ES) when the trade-off is weak at s*, and when migration is above a threshold. Note that in our model an ES strategy is always CS (there a no ‘Garden of Eden strategies’ (Hofbauer & Sigmund, 1990)), but the reverse is not true.

We illustrate our results with two specific trade-offs, a power and a Gaussian trade-off, and we find an explicit solution for the singular strategy. In both cases, the singular strategy is the mean of the optimal strategies in the two habitats, weighted by the proportion of each habitat in the environment (see Eqns 16 and 17). With both trade-off functions, this generalist strategy is always globally convergence stable: this means that whichever the initial value of the trait, the population will always first evolve towards the generalist strategy. But once this strategy s* is reached, it is not stable to further invasions if the trade-off is strong at s*, or if migration is too low. With the power trade-off, the global concavity of the curve is determined by the value of the parameter β (see Fig. 1b). With the Gaussian trade-off, the concavity of the trade-off depends on the difference between the optima (θ) and on the strength of selection (1/γ): the greater the θ/γ ratio, the stronger the trade-off (see Fig. 1c), and branching happens more easily under a strong trade-off.

This effect of habitat heterogeneity on branching has also been underlined in models of evolution on a gradient (Doebeli & Dieckmann, 2003; Leimar et al., 2008), where branching happens more easily for intermediate gradient slopes. For small to intermediate gradient slopes (a/σK parameter in Doebeli & Dieckmann (2003)), branching is more likely to happen when the gradient becomes steeper, which corresponds to a more heterogeneous environment; this is in line with our results. But in Doebeli & Dieckmann's (2003) model, too steep gradients hinder branching. Doebeli & Dieckmann's (2003) chosen competition function is responsible for this discrepancy between their results and ours. Doebeli & Dieckmann (2003) assume that competition decreases with spatial (σs) and phenotypic (σc) distances, whereas we assume that competition is strictly local (corresponding to a very low σs) and phenotypic independent (very high σc). When the gradient is very steep in their model, because of local adaptation, individuals that live close to another are phenotypically very different, and therefore do not compete, which mitigates the potential for branching.

Qualitatively, our results are very similar to the conclusions reached after the analysis of two-patch models (e.g. Meszena et al., 1997). In particular, the influence of the curvature of the trade-off has already been highlighted (see for instance Levins, 1962; de Mazancourt & Dieckmann, 2004). Perhaps more surprisingly, the results are also almost identical quantitatively. We find the same values of singular strategies and the same criterium for convergence stability as in Kisdi (2001). Kisdi's model is Levene's soft selection model (Levene, 1953) with a general trade-off; generations are discrete, and migration is global at each generation. Still, we could not find a strict two-patch equivalent of our model (continuous time, limited migration and fixed population sizes), so we derive one in Appendix C. The value of the singular strategy is the same (compare (15) and (C.8)), and the convergence stability condition is also the same (see (21) and (C.9)), and they are also the same as in models with unlimited dispersal (Levins, 1962). As for evolutionary stability, the condition on the concavity of the trade-off is the same (compare (24a) and (C.10a)), but the condition on the intensity of migration, however, differs slightly (compare (24b) and (C.10b)). Thus, under soft selection, with fixed population sizes, and mutations of small phenotypic effect, adding explicit spatial structure changes only little the evolution of specialist vs. generalist strategies. This result was not straightforward before doing our analysis, and our model contributes to clarifying the link between metapopulation and spatially explicit models.

In our model, we keep the local densities constant, so that the model remains analytically tractable, but further studies could focus on models with demography (like in Meszena et al.’s (1997) two-patch model where the population is under logistic growth). Letting the population sizes vary will induce source-sink dynamics, which might lead to feedbacks between demography and evolution, which can induce evolutionary bistability and migration meltdown (Ronce & Kirkpatrick, 2001). We can also relax the assumption of soft selection and consider hard selection (Dempster, 1955; Christiansen, 1975). Hard selection is expected to limit polymorphism (de Meeûs et al., 1993; Van Tienderen, 1997). Still, these demographical refinements are more complicated to deal with in spatially continuous habitats (but see Nagylaki (1978); Débarre et al. (2009)).

To conclude, under simple frameworks (asexual populations, fixed densities and soft selection) and with mutations of small effects, models of metapopulation are good approximations of the evolutionary dynamics occurring in spatially explicit models. With our model representing a spatially continuous environment, the conditions that we find for the evolution of generalist strategies are very similar to the ones obtained with a metapopulation model. As pointed above, however, the influence of isolation by distance remains to be investigated under more complex scenarios.


We thank Ophélie Ronce for critical comments on an earlier version of the manuscript, and Thomas Lenormand, Virginie Ravigné, Minus van Baalen, Patrice David and François Rousset for insightful discussions. SG acknowledges financial support from CNRS, ANR 07 JCJC 0128 ‘EPICE’ and ERC Starting grant 203054 ‘EVOLEPID’.


A Derivation of the reaction-diffusion model

We follow the evolution of the density of individuals with trait si, located at x, during a small time interval τ. Initially, there is a density of pi(x,t)N individuals i at x, for a total population density of N at x. During the small time interval τ, a proportion dτ of these individuals die and free up space. The remaining individuals produce ri(x)τ propagules, which then compete for establishment with all propagules produced at this location. After this competition event, the total population density at x is back to N. In the mean time, adults have a probability mτ of migrating. If they do, they travel by a distance (y − x) with probability k(y − x), where k is a migration kernel.

The migration kernel k is a probability density function, with mean 0 and standard deviation σ, so we have


Translating this description of the lifecycle into mathematical terms, we obtain


then we obtain


We now have to simplify the second term in Eqn A.4. For this purpose, we use the approximation of diffusion. We expand the function k·pi as a Taylor series around the point x and assume (here is the approximation) that we can neglect the third and higher order terms of the series. We obtain:


Using the fact that k is a probability density function (see Eqn A.1), we obtain after simplifying:


Scaling time and space appropriately, we get rid of the parameter d, which yields Eqn 7 in the main text.

B Condition for the invasion of a rare mutant

The population is initially monomorphic, fixed for a trait sr. Can a mutant with trait sm invade? We consider without loss of generality the case where sm > sr, the mutant is better adapted in habitat A than the resident. The favourable habitat A must therefore be large enough for the mutant to invade; in other words, q must be greater than a threshold inline image, which we have to determine. To this end, we study the stability of the equilibrium where only the resident is present and look for conditions under which an initially rare mutant can invade, i.e. under which the equilibrium with the resident only becomes unstable because of the appearance of a mutant.

The frequency of the mutant is p(x,t); the mutant is initially rare, so that the initial frequency of the resident is 1. For this initially rare mutant, the reaction-diffusion Eqn 7 becomes


and we have (see Eqn 2)


with, as defined in the main text,


Because sm > sr, we have wA > 0 and wB < 0.

We use the method of separation of variables. We substitute p(x,t) = K(x)L(t) (Nagle et al., 1996):


λ is a constant. If we solve the first part of the Eqn B.4, we obtain:


When q = qc+, the frequency of the mutant neither shrinks nor grows, because it is a critical case. Then, with qc+, we have λ = 0.

If we now go back to the second part of Eqn B.4, with λ = 0, we have to solve the following equations (replacing the fitness functions as described in Eqn B.2):


with the continuity conditions


and with the boundary conditions (same as system (9) in the main text)


Solving system (B.6), we find


where α1, α2, β1 and β2 are constants. We determine these constants with the continuity and boundary conditions (systems (B.7) and (B.8)), for q = qc+, and find the following equation, which is shown in the main text:


The critical proportion of habitat A, qc+, is the root between 0 and 1 of the Eqn B.10. The mutant with trait sm invades when q > qc+. We obtain an explicit condition (10) by using compound parameters a and b (see (11) in the main text).

C Derivation and analysis of the metapopulation model

C.1 Derivation of the metapopulation model

The environment consists of a metapopulation of patches, each patch containing one of the two habitat types. The overall proportion of habitat A is q (and 1 − q for habitat B). We follow the evolution of the density of individuals with trait si, located in habitat-A patches, during a small time interval τ. Initially, there is a total density of inline image individuals i in patches of type A, for a total population density of q N in patches of type A. During the small time interval τ, a proportion dτ of these individuals die and free up space. The remaining individuals produce ρA(si)τ propagules, which then compete for establishment with all propagules produced at this location. After this competition event, the total population density in patches of type A is back to q N. In the mean time, adults have a probability μAB·τ of migrating into patches of type B, and μBA·τ of migrating from patches of type B to patches of type A.

Translating this description of the lifecycle into mathematical terms, we obtain


The total density in patches of type A remains constant and equal to q N. This means that we must have


so we can write


then we obtain, with appropriate scaling to get rid of the parameter d:


where inline image is the mean fitness in habitat A:


(and similarly for inline image).

C.2 Analysis of the metapopulation model

We study the invasion of mutants with trait sm in a population fixed for the trait sr. Their frequency in both patch types evolves with this equation:




The mutant invades when λ, the dominant eigenvalue of M, is positive.

C.2.1 Singular strategy

A singular strategy s* is a strategy at which the fitness gradient cancels; here we find that s* is the root of the following equation:


This is the same equation as Eqn 15 in the main text.

C.2.2 Convergence stability

We find that the singular strategy s* is convergence stable when:


This is the same condition as condition (21) in the main text.

C.2.3 Evolutionary stability

The singular strategy s* is evolutionary stable when:


Subcondition (C.10a) is the same as subcondition (24a) in the main text but compare (C.10b) and (24b) : they are very similar but differ by a factor q(1−q)/3.