# Habitat choice stabilizes metapopulation dynamics by enabling ecological specialization

Frederik Mortier, Staffan Jacob, Martijn Vandegehuchte, Dries Bonte

► To cite this version:

Frederik Mortier, Staffan Jacob, Martijn Vandegehuchte, Dries Bonte. Habitat choice stabilizes metapopulation dynamics by enabling ecological specialization. Oikos, 2018, 128 (4), pp.529-539. 10.1111/oik.05885 . hal-03016701

HAL Id: hal-03016701

https://hal.science/hal-03016701v1

Submitted on 22 Aug 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
1 **Habitat choice stabilizes metapopulation dynamics through increased ecological specialisation.**

2 Frederik Mortier¹, Staffan Jacob²,³, Martijn L. Vandegehuchte¹, Dries Bonte¹

3 ¹ Terrestrial Ecology Unit, Department of Biology, Ghent University, Karel Lodewijk

4 Ledeganckstraat 35, 9000 Ghent, Belgium

5 ² Station d'Ecologie Théorique et Expérimentale, CNRS UMR5321, 09200, Moulis, France

6 ³ Université Catholique de Louvain, Earth and Life Institute, Biodiversity Research Centre, Croix du Sud 4, L7-07-04, 1348 Louvain-la-Neuve, Belgium

8 **Corresponding author:** Frederik Mortier, email: [fremorti.mortier@UGent.be](mailto:fremorti.mortier@UGent.be)

9

10 **Author contributions:** FM developed the model, analysed and interpreted results, drafted the
11 manuscript and was involved in discussions at all stages; DB supervised the development of the model,
12 was involved in interpreting the results, provided critical revisions of the manuscript and was involved
13 in discussions at all steps; SJ interpreted the results, provided critical revisions of the manuscript and
14 was involved in discussions at all steps; MV interpreted the results, provided critical revisions of the
15 manuscript and was involved in discussions from the analysis onward.

16 **Acknowledgements:** We would like to thank Pim Edelaar, François Massol and Estelle Laurent for
17 engaging in insightful discussions. The project received financial support from the Research
18 Foundation - Flanders (FWO) through research grant G.018017.N (FM, MVG & DB) and the research
19 network EVENET (DB, SJ).

20 **Open data:**

21 All code is available at https://github.com/fremorti/Habitat.choice_stabilizes_metapopulations

22 **Competing interests:**

23 All authors declare to have no competing interests.

24
25 Abstract

26 Dispersal is a key trait responsible for the spread of individuals and genes among local populations,
27 thereby generating eco-evolutionary interactions. Especially in heterogeneous metapopulations, a tight
28 coupling between dispersal, population dynamics and the evolution of local adaptation is expected. In
29 this respect, current theory predicts dispersal to counteract ecological specialisation by redistributing
30 locally selected phenotypes (i.e. migration load). However, in nature we observe that some specialists
31 exhibit a strong dispersal capacity.

32 Habitat choice following informed dispersal decisions, provides a possible mechanism for individuals
33 to match the environment to their phenotype, thereby enabling the persistence of evolved ecological
34 specialisation. How such informed decisions affect the evolution of dispersal and ecological
35 specialisation and how these, in turn, influence metapopulation dynamics is yet to be determined.

36 By means of individual-based modelling, we show that informed decisions on both departure and
37 settlement decouples the evolution of dispersal and generalism, favouring highly dispersive specialists.
38 Choice at settlement decouples dispersal from ecological specialisation most effectively. Additionally,
39 habitat choice stabilizes local and metapopulation demography because of the maintenance of
40 ecological specialisation at all levels of dispersal propensity.

41 We advocate considering habitat choice in spatially structured ecological models to improve
42 demographic predictions in the face of environmental change.

43 **Key-words:** habitat choice, spatial ecology, dispersal, ecological specialisation, local adaptation, eco-evolutionary dynamics
44
45 **Introduction**

Most populations are spatially structured and organized in metapopulations. Local populations are
connected by dispersal, the movement of individuals or propagules that potentially generates gene
flow across space [1]. Dispersal thus acts as a glue that links local gene pools, local population
dynamics and metapopulation dynamics [2]. Dispersal is known to evolve in response to
metapopulation structure as a bet-hedging strategy in spatio-temporally variable environments [1,3–5].
It is also known to evolve in response to local drivers, for instance to escape kin competition and
inbreeding depression [1,3]. Dispersal is thus an essential attribute for fitness maximisation [6].
Ultimately, these benefits are balanced against dispersal costs to determine the optimal dispersal
strategy –in terms of frequency and distance.

In metapopulations, habitat heterogeneity introduces additional costs to dispersal. In such a setting,
divergent selective pressures among local habitats can result in local adaptation [7]. Often, local
adaptation comes at the cost of lower performance in other environments, which can lead populations
to adapt to a smaller subset of available habitats –i.e. ecological specialisation [8]. If specialists
experience the landscape as highly heterogeneous when dispersing [9], they are more likely to end up
in unsuitable habitat. Ecological specialisation is therefore predicted to select against dispersal [10,11].
Reciprocally, dispersal hinders local adaptation by mixing gene pools and thus opposes the evolution
of specialisation [12–15]. This trade-off between dispersal and local adaptation is expected to
maximize performance across an environmentally heterogeneous landscape, and thus homogenize
fitness. High dispersal rates and ecological specialisation are, therefore, difficult to reconcile
(theoretical evidence: [11,15–19], empirical evidence: [12,13,20]).

If dispersal involves habitat choice, dispersal and ecological specialisation may be reconcilable. From
a pure movement perspective, optimal foraging theory inherently implements choice-based movement,
with individuals weighing the cost of foraging time against the benefit of finding the optimal resource
[21]. Such adaptive behaviour could also be relevant in the context of dispersal –when considering
movements directly linked to reproduction. Rather than assuming that each member of a population
disperses randomly with the same probability, informed dispersal implies a non-random subset of the
local population dispersing and/or dispersers being redistributed in a non-random way across the landscape [22–25]. Individuals can indeed use information about their phenotype and environment to decide whether to disperse (departure decision), and where to go (settlement decision; [26]). Several organisms gather and use information during movement [27–29]. Intuitive in the light of evolution, habitat choice enables individuals to track the environment that best matches their phenotype while also reaping the benefits of dispersal [30,31]. Furthermore, theoretical and experimental studies show how habitat choice cascades into further life-history evolution, increasing local adaptation and ecological specialisation (Theory: [32–36]; empirical: [22,37]).

With habitat choice, individuals integrate information to preferentially disperse towards habitat that maximizes their fitness, which affects the evolution of dispersal and specialisation. Subsequently, rapid evolutionary changes are expected to affect ecological dynamics in the same time frame according to the eco-evolutionary framework [38]. Understanding changes in metapopulation dynamics should enable us to understand and predict metapopulation persistence in a spatially structured and heterogeneous context. Here, we develop an individual-based model to study the impact of habitat choice on the evolution of dispersal and ecological specialisation. We separately analyse 1) how dispersal and habitat choice affect the evolution of ecological specialisation, and 2) how ecological specialisation and habitat choice affect dispersal evolution. Furthermore, we quantified the consequences of these evolutionary processes for metapopulation dynamics. While random dispersal should lead to a trade-off between dispersal and ecological specialisation, we predict habitat choice to favour specialists, even with high levels of dispersal. Additionally, we predict that habitat choice favours high levels of dispersal, even in specialists. Moreover, dispersal can affect how local populations within a metapopulation vary over time, increasing or decreasing metapopulation stability and synchrony [39–41]. We predict that the individual fitness maximisation by habitat choice should likewise favour the metapopulation by resulting in an increased metapopulation size and stability. Finally, since the consequences of habitat choice for ecological and evolutionary dynamics have been predicted to differ depending on the timing of the informed decision [42], we modelled four dispersal
98 scenarios: random dispersal, habitat choice at departure, habitat choice at settlement, and habitat

99 choice at both departure and settlement.
100 **Model**

101 **Landscape**

102 We model a finite landscape: a toroidal lattice of 32 × 32 grid cells. Each patch (i.e. grid cell) has a
103 random environmental value $v_{x,y} \in [0,1]$ at coordinates x,y, without any spatial autocorrelation.

104 This environmental value is the local selective pressure. Its values are randomly distributed in space
105 and constant in time creating a heterogeneous environment. Additionally, each patch contains a certain
106 amount of resources ($G_{x,y}$) that regulate local consumer population densities.

107

108 **Population**

109 For simplicity, we model an asexually reproducing organism with discrete generations. The sequence
110 of life-history events for each individual starts with dispersal and is succeeded by reproduction, then
111 population regulation. This closely resembles soft selection in a semelparous species with a single
112 dispersal phase [43]. These life-history events are explained below and assumed parameters are
113 summarized in table 1.

114

115 *Evolving traits*

116 We model three traits that can be allowed to evolve:

117 The **optimal habitat trait** (*muT*) determines the optimum of the environmental value (*v*<sub>x,y</sub>) for an
118 individual to have its highest possible fitness (*muT* ∈ [0,1]).

119 The **niche width** (*varT*) determines the extent of ecological specialisation, by determining an
120 individual's fitness for values of the environment (*v*<sub>x,y</sub>) a certain distance away from the individual's
121 optimal habitat (*muT*). A wide niche results in higher fitness far away from the optimal habitat (eq. 2;
122 derived from Chaianunporn & Hoverstad [19], but decreases fitness in the optimal habitat (eq. 3, fig.
123 1). The match of an individual's optimal habitat (*muT*) with the local environmental value (*v*<sub>x,y</sub>)
124 combined with its *varT* determines the individual's efficiency in this particular habitat (*α*<sub>*i*</sub>, eq. 2). The
amount of gathered resources ($F_i$) combines the individual's efficiency ($\alpha_i$) with the local resource density ($R_{x,y}$) and is proportional to the individual's expected reproductive success (eq. 1).

$$1) F_i = \frac{\alpha_i * R_{x,y}}{1 + h(1 + \alpha_i * R_{x,y})}$$

$$2) \alpha_i = a_{max} * \gamma_i * e^{-\frac{(muT_i - v_{x,y})^2}{varT_i^2}}$$

$$3) \gamma_i = e^{-ct * varT_i}$$

$F_i$ represents the gathered resources by individual i, determined by a resource-consumer model with h being handling time, $R_{x,y}$ the amount of resources present locally, $a_{max}$ the maximum encounter rate, $muT_i$ and $varT_i$ being the optimal habitat trait and niche width respectively for that individual and $v_{x,y}$ the local environmental value. $\gamma_i$ implements the niche width-performance trade-off with ct indicating the strength of the trade-off.

The **dispersal trait (d)** represents the individual's inclination to disperse. The role of this trait is explained in more detail in the next section.

## Dispersal

Individuals disperse before selection occurs. We model two decision points in a dispersal event:

First, at **departure**, an individual disperses with a probability equal to its dispersal trait (d) if departure is random, meaning that a higher dispersal trait implies a higher tendency to disperse. With departure choice, the dispersal trait (d) represents the minimal acceptable local expected reproductive output at which an individual chooses not to disperse. Below this threshold, the local conditions are considered too bad and the individual leaves. In parallel with random departure, a higher threshold implies a higher tendency to disperse.

At **settlement**, an individual settles in a random patch within its dispersal range determined by a maximum dispersal distance (dr) if settlement is random (all patches $x'_i, y'_i$ | $x'_i \in [x_i - dr, x_i + dr]$; $y'_i \in [y_i - dr, y_i + dr]$). Its current location is excluded from this range to force dispersing individuals to change location. With habitat choice at settlement, the dispersing individual settles in
151 the location where the local environmental value ($v_{x,y}$) best matches its own optimal habitat trait
152 ($muT$) within its dispersal range.

153 Note that habitat choice at both decision points involves evaluating how well the individual's optimal
154 habitat ($muT$) trait matches the environmental value of a patch ($v_{x,y}$) [24].

155

156 Reproduction

157 Reproducing individuals have an expected number of offspring ($\lambda_i$) proportional to their gathered
158 resources ($F_i$) in the patch after the dispersal phase.

$$ \lambda_i = \sigma * F_i $$

159 $\sigma$ Indicates how many offspring each unit of resources results in. The actual reproductive output of an
160 individual is sampled from a Poisson distribution with mean $\lambda_i$.

161

162 Local population regulation

163 Local consumer populations are regulated through local resource availability ($G_{x,y}$). These resources
164 are restocked each generation according to a logistic growth function,

$$ \delta G_{x,y} = R_G * \left(1 - \frac{G_{x,y}}{K_G}\right) $$

165 where the local resource increase $\delta G_{x,y}$ depends on $G_{x,y}$, the amount of resources already present
166 locally. Furthermore, $R_G$ and $K_G$ represent the optimal growth rate and carrying capacity of the
167 resources respectively. Resources are consumed proportionally to the number of offspring. A
168 consumer's offspring without the required amount of resources in their local patch will die after
169 depleting the leftover resources should there be any left. Population regulation depends on resource
170 availability and, consequently, is density dependent, while habitat choice is decoupled from local
171 population densities. Hereby, we avoid simulating density-dependent habitat choice (see [31] for a
172 comparison of different modes of habitat choice).

173

174 Mutation
175 Non-fixed traits mutate at a rate of 0.01 generation⁻¹. The optimal habitat trait (*muT*), dispersal trait (*d*) and niche width (*varT*) mutate by randomly sampling a new trait value from a normal distribution with the initial trait value as mean and standard deviation 0.1. New values of *muT* are limited to the range of possible environmental values [0, 1].

179 **Simulations**

180 We analyse four models that represent all combinations of either random dispersal or habitat choice at departure and at settlement. First, we analyse how niche width (*varT*) evolves for different fixed values of the dispersal trait (*d*) and the different habitat choice scenarios. Second, we analyse how dispersal evolves for different fixed values of niche width with the different combinations of habitat choice. Fixed traits are varied over 20 values with equal increments within a range (i.e. random departure d:[0, 1], informed departure d: [0, 5], *varT*: [0, 0.5]). The range of the dispersal trait (*d*) in informed departure scenarios differs from the random scenarios since it represents the minimal acceptable reproductive output of an individual instead of its dispersal propensity. This range of *d* in the informed departure scenarios, however, results in actual dispersal propensities that cover the range [0, 1]. Each scenario is replicated 10 times with each replicate simulated for 500 generations. We analyse average niche width of the last generation in scenarios with evolving niche width, and the proportion of individuals that dispersed in the last generation in scenarios with the dispersal trait evolving. Additionally, we analyse the metapopulation size (i.e. total number of individuals) in the last generation and temporal variability in local population sizes, temporal variability in metapopulation size and asynchrony (α-, γ- and β-variability respectively [44], in the last five generations for each replicate.

196

197 **Initialisation**

198 We initialize each replicate by allocating 70000 individuals randomly across the 32 × 32-landscape grid. This initial metapopulation size close to the consumers' carrying capacity avoids drift effects.
200 Each individual's optimal habitat trait value is sampled from a uniform distribution between 0 and 1.
201 Unless it was fixed for that scenario, niche width and the dispersal trait are randomly sampled from a uniform distribution (with the same range as their fixed values for the fixed scenarios).

203 *Imperfect habitat choice*

204 In addition to the analyses presented in this manuscript, we tested whether imperfect rather than perfect choice (at departure and settlement) leads to different eco-evolutionary dynamics (see *supplementary material 2*). We modelled imperfect choice as a probability, at each decision point, that the individual chooses randomly instead of in an informed way.

<table><caption>Table 1: Assumed parameters</caption><tr><td><i>R</i><sub>G</sub></td><td>Optimal resource growth rate</td><td>0.25</td></tr><tr><td><i>K</i><sub>G</sub></td><td>Resource carrying capacity</td><td>1</td></tr><tr><td><i>h</i></td><td>Handling time</td><td>0.2</td></tr><tr><td><i>a</i><sub>max</sub></td><td>Maximum encounter rate</td><td>0.05</td></tr><tr><td><i>ct</i></td><td>Cost of generalism</td><td>1</td></tr><tr><td></td><td>mutation rate</td><td>0.01 generation<sup>-1</sup></td></tr><tr><td><i>dr</i></td><td>Dispersal range</td><td>2</td></tr><tr><td><i>σ</i></td><td>Resource conversion factor</td><td>300</td></tr></table>
208 **Results**

209 **Niche width evolution**

210 With random dispersal (fig. 2: orange crosses), we find a gradual increase of niche width (i.e. 211 ecological generalism) when increasing dispersal propensity. This means that, in accordance with 212 classical predictions [11,15], a low dispersal propensity favours specialism while a high dispersal 213 propensity leads to the evolution of generalists. Habitat choice at departure results in a pattern 214 comparable to that of the uninformed model, with a low level of dispersal in specialists or a high level 215 of dispersal in generalists (fig. 2: orange circles). However, habitat choice at departure enables 216 specialism to still evolve at a higher dispersal propensity than in scenarios of random dispersal. The 217 inflexion point shifts from a dispersal propensity of around 0.35 to one of around 0.65. In contrast, 218 habitat choice at settlement favours specialism in all scenarios (fig. 2: green crosses), indicating that 219 specialism evolves regardless of dispersal propensity. Additionally, a departure decision results in a 220 trend of even stronger specialism than if specialism evolves when a settlement decision is made. A 221 combination of departure and settlement decision shows specialism evolving in all scenarios but more 222 strongly so at lower dispersal propensities (fig. 2: green circles).

223 Regarding ecological dynamics, we find that increasing dispersal propensity results in a decreased 224 metapopulation size when dispersal is random or only informed at departure (fig. 3). Metapopulations 225 exhibiting a low level of dispersal as well as those in which individuals have informed settlement 226 achieve larger metapopulations (fig. 3) with more stable local populations (α, fig. 4). Note that those 227 scenarios with lower metapopulation sizes correspond with scenarios in which generalism evolved. If 228 dispersers only choose at departure, metapopulation sizes decrease to a minimum around the switch 229 from specialism to generalism (fig. 3: orange circles). Also, the very dispersive scenarios with 230 informed settlement result in local population variability being equal to or higher than without 231 settlement decision, while metapopulation sizes are still markedly higher (fig. 3-4). Metapopulation 232 variability (γ) and asynchrony (β) did not show clear trends (see *supplementary material 1*).
233 **Dispersal evolution**

234 With random dispersal, dispersal propensity increases with niche width as predicted, but overall levels 235 of dispersal propensity are low (fig. 5, left panel, orange crosses). With a departure decision, dispersal 236 is also relatively infrequent (fig. 5, left panel, orange circles). In this case, however, dispersal 237 propensity decreases with niche width, resulting in the most specialized individuals being the most 238 dispersive (fig. 5, right panel, orange circles). With a departure choice, only mismatched individuals 239 disperse (i.e. individuals whose optimal habitat trait differs significantly from the habitat value of their 240 location). Since specialists only have a limited range of suitable habitats, they are less likely than 241 generalists to find themselves in sufficiently suitable habitat. Therefore, specialists benefit more from 242 dispersal with a departure decision. With a settlement decision, dispersal propensity is markedly 243 higher (fig. 5, green crosses). Here, dispersal propensity drops slightly in metapopulations of the most 244 specialized individuals (i.e. lowest niche width). With a decision both at departure and settlement, 245 dispersal propensity is relatively high (fig. 5, green circles). It is slightly lower than in scenarios with 246 only a settlement decision because the additional departure decision prevents a proportion of the 247 metapopulation from dispersing. In this scenario, only the very specialized individuals exhibit a 248 significant decrease in tendency to disperse.

249 With increasing niche width, metapopulation size decreases (fig. 6) and local population variability 250 increases (α, fig. 7). We find no noteworthy effect of the departure decision nor the settlement decision 251 on metapopulation sizes. Local population variability does not show a strong effect of any of the 252 habitat choice scenarios either, except for the slightly more variable local populations with a 253 settlement choice. Metapopulation variability (γ) and asynchrony (β) did not show clear trends (see 254 *supplementary material 1*).

255 **Imperfect habitat choice**

256 For imperfect habitat choice, we found patterns intermediate to those of random and perfectly 257 informed scenarios (see *supplementary material 2*), except in metapopulations of generalists that 258 disperse most when having imperfect information.
259 **Discussion**

260 Altering dispersal from a random process to one with habitat choice enables a reconciliation between
261 ecological specialisation and dispersal evolution, as predicted. By allowing the evolution of ecological
262 specialisation, habitat choice furthermore causes local populations to fluctuate less and metapopulation
263 to reach higher sizes. Metapopulation-level performance is thus enhanced by habitat choice.

264 In accordance with previous studies, random dispersal leads to a trade-off between dispersal and
265 ecological specialisation in the absence of habitat choice. Habitat choice changes this relationship to
266 favour specialists even with high levels of dispersal and favour dispersal even in specialists. Our result
267 confirms predictions from early theory [25,45], as well as conclusions from more dedicated models
268 with habitat choice either at departure [35,36] or at settlement [32–34]. We take this one step further
269 by contrasting departure and settlement decisions and demonstrating that choice mechanisms at
270 settlement favour specialized strategies for even higher levels of dispersal than choice mechanisms at
271 departure. A probable explanation for this stronger effect of settlement decision is that habitat choice
272 at settlement integrates information from all potential settlement locations, rather than only from the
273 natal location with informed departure. We show that a departure choice enables the evolution of even
274 more specialized strategies when specialists are favoured. Dispersal from an already suitable habitat is
275 costlier in more specialized strategies. Informed departure –i.e. informed philopatry– benefits
276 specialists most by retaining individuals in their suitable habitat and enabling individuals in unsuitable
277 habitat to disperse. Similar patterns were found in studies on habitat autocorrelation (discussed in [9]).
278 When heterogeneity in habitat is experienced as coarse-grained relative to the scale of dispersal, the
279 imposed landscape structure is more likely to match individuals to a suitable habitat, but when it is
280 fine-grained, mismatches tend to prevail. Habitat matching by the spatial structure, instead of habitat
281 choice behaviour, can limit maladaptive gene flow and select for increased specialism [9]. No matter
282 how habitat matching is attained, we suspect that restricting movement of phenotypes to similar types
283 of habitat always has the potential to favour specialism.

284 Habitat choice enables the evolution of dispersive specialists and altered metapopulation dynamics.
285 Our model shows that metapopulation size is directly determined by the level of specialisation and
only indirectly by information use during departure or settlement. This explains why the relation between metapopulation sizes and dispersal is inverse to that between evolved niche width and dispersal in scenarios of fixed dispersal. When generalism is favoured –i.e. under high levels of random settlement– the optimal strategy results in smaller metapopulation sizes despite the unaltered resource availability in our model. Individual interests do not necessarily line up with those of the metapopulation [46]. In addition, we show that local population sizes fluctuate more in metapopulations with more generalists, which also have smaller metapopulation sizes. Small metapopulations and high local population variability (α), which lead to more frequent occurrences of small local populations, increase the risk of extinction via demographic and genetic stochasticity [47,48]. In favouring specialisation, habitat choice indirectly affects ecological dynamics, alters eco-evolutionary feedbacks and, as a consequence, can affect metapopulation persistence.

By demonstrating the impact of habitat choice on eco-evolutionary dynamics, our results question the validity of the numerous models assuming random dispersal [34,49]. Dispersal without control during any phase likely applies to very few real systems such as bacteria and wind-dispersed plants. Many organisms are capable of more than just non-random dispersal, and move in a selective way, illustrated by obvious examples of habitat choice in grasshoppers [27,28], cue-based preferences during movement [50] and habitat choice [24,51,52]. Selective movement is even found in organisms for which it seems less obvious, such as zoochorous plants that disperse their seeds to suitable habitat via animals [53] or plankton that drift on currents but are able to select where to settle [54,55]. With the effect of habitat choice on ecological dynamics in mind, we recommend considering habitat choice when predicting the dynamics of spatially structured populations [23,34,42,49] –e.g. species distribution models, meta-community models, viability models. Our results show that in systems with habitat choice, assuming random dispersal may overlook habitat-choice effects on ecological specialisation, metapopulation size and stability.

Information use during habitat choice is assumed to be perfect in our model. This is a simplified representation of reality since very accurate information is costly (e.g. prospecting multiple locations or developing elaborate sensory organs; discussed in [42,55,56]) and, as a consequence, accuracy of
313 information can itself be a subject of selection. Organisms should rarely be able to acquire high-precision information because of its high cost while a minimum of information is expected to be adaptive [57]. We present results for a scenario of perfect information use, but even under imperfect habitat choice our general evolutionary and ecological results stand (see *supplementary material 2*).

317 Different habitat-based choice behaviours that result in non-random dispersal may or may not differ in their eco-evolutionary consequences [31,42]. Here, we show how the consequences of habitat choice at departure differ from those of habitat choice at settlement. Habitat choice may also vary in several other aspects, such as choice mechanisms and the reliability of information used [42,58]. We expect such different variations on habitat choice to have additional influences on evolutionary and ecological processes of varying magnitude. Hence, disregarding these nuances might conceal some crucial insights or restrict us from generating detailed predictions. Unfortunately, we often lack information on the specifics of habitat choice in real-life populations. Our focus going forward should be on revealing the extent to which habitat choice varies along all these axes in nature, but also to evaluate their relative importance.

327 In summary, we demonstrate the profound effect of habitat choice on eco-evolutionary dynamics of 328 metapopulations, including the dynamics of dispersal and ecological specialisation. Moreover, habitat 329 choice at settlement impacts the model's outcome more than choice at departure. Based on the 330 difference between random dispersal and habitat choice, we encourage studies of real-world 331 metapopulations to carefully consider habitat choice during the different phases of dispersal. Our 332 results elucidate the impact of the often erroneous assumption of random dispersal and may improve 333 the accuracy of future predictions of spatially structured populations.

334

335 **References**

336 1. Ronce, O. 2007 How Does It Feel to Be Like a Rolling Stone? Ten Questions About Dispersal Evolution. *Annu. Rev. Ecol. Evol. Syst.* **38**, 231–253.

338 (doi:10.1146/annurev.ecolsys.38.091206.095611)

339 2. Hanski, I. 2012 Eco-evolutionary dynamics in a changing world. *Ann. N. Y. Acad. Sci.* **1249**, 1–
340 17. (doi:10.1111/j.1749-6632.2011.06419.x)

341 3. Bowler, D. E. & Benton, T. G. 2005 Causes and consequences of animal dispersal strategies:

342 Relating individual behaviour to spatial dynamics. *Biol. Rev. Camb. Philos. Soc.* **80**, 205–225.

343 (doi:10.1017/S1464793104006645)

344 4. McPeek, M. A. & Holt, R. D. 1992 The Evolution of Dispersal in Spatially and Temporally

345 Varying Environments. *Am. Nat.* **140**, 1010–1027. (doi:10.1086/285453)

346 5. Olivieri, I., Couvet, D. & Gouyon, P. H. 1990 The genetics of transient populations: Research

347 at the metapopulation level. *Trends Ecol. Evol.* **5**, 207–210. (doi:10.1016/0169-5347(90)90132-

348 W)

349 6. Bonte, D. & Dahirel, M. 2017 Dispersal: a central and independent trait in life history. *Oikos*

350 **126**, 472–479. (doi:10.1111/oik.03801)

351 7. Kawecki, T. J. & Ebert, D. 2004 Conceptual issues in local adaptation. *Ecol. Lett.* **7**, 1225–

352 1241. (doi:10.1111/j.1461-0248.2004.00684.x)

353 8. Poisot, T., Bever, J. D., Nemri, A., Thrall, P. H. & Hochberg, M. E. 2011 A conceptual

354 framework for the evolution of ecological specialisation. *Ecol. Lett.* **14**, 841–851.

355 (doi:10.1111/j.1461-0248.2011.01645.x)

356 9. Richardson, J. L., Urban, M. C., Bolnick, D. I. & Skelly, D. K. 2014 Microgeographic

357 adaptation and the spatial scale of evolution. *Trends Ecol. Evol.* **29**, 165–176.

358 (doi:10.1016/j.tree.2014.01.002)

359 10. Stevens, V. M. et al. 2014 A comparative analysis of dispersal syndromes in terrestrial and

360 semi-terrestrial animals. *Ecol. Lett.* **17**, 1039–1052. (doi:10.1111/ele.12303)

361 11. Kisdi, E. 2002 Dispersal: Risk spreading versus local adaptation. *Am. Nat.* **159**, 579–596.

362 (doi:10.1086/339989)

363 12. Bolnick, D. I. & Nosil, P. 2007 Natural selection in populations subject to a migration load.

364 *Evolution* (N. Y). **61**, 2229–2243. (doi:10.1111/j.1558-5646.2007.00179.x)

365 13. Bolnick, D. I., Caldera, E. J. & Matthews, B. 2008 Evidence for asymmetric migration load in

366 a pair of ecologically divergent stickleback populations. *Biol. J. Linn. Soc.* **94**, 273–287.

367 (doi:10.1111/j.1095-8312.2008.00978.x)
368 14. Lenormand, T. 2002 Gene flow and the limits to natural selection. *Trends Ecol. Evol.* **17**, 183–189. (doi:10.1016/S0169-5347(02)02497-7)

370 15. Nurmi, T. & Parvinen, K. 2011 Joint evolution of specialization and dispersal in structured metapopulations. *J. Theor. Biol.* **275**, 78–92. (doi:10.1016/j.jtbi.2011.01.023)

372 16. Nagelkerke, C. J. & Menken, S. B. J. 2013 Coexistence of Habitat Specialists and Generalists in Metapopulation Models of Multiple-Habitat Landscapes. *Acta Biotheor.* **61**, 467–480. (doi:10.1007/s10441-013-9186-4)

375 17. Billiard, S. & Lenormand, T. 2005 Evolution of migration under kin selection and local adaptation. *Evolution (N. Y).* **59**, 13–23. (doi:10.1111/j.0014-3820.2005.tb00890.x)

377 18. Berdahl, A., Torney, C. J., Schertzer, E. & Levin, S. A. 2015 On the evolutionary interplay between dispersal and local adaptation in heterogeneous environments. *Evolution (N. Y).* **69**, 1390–1405. (doi:10.1111/evo.12664)

380 19. Chaianunporn, T. & Hovestadt, T. 2012 Concurrent evolution of random dispersal and habitat niche width in host-parasitoid systems. *Ecol. Modell.* **247**, 241–250. (doi:10.1016/j.ecolmodel.2012.09.005)

383 20. Dahirel, M., Olivier, E., Guiller, A., Martin, M. C., Madec, L. & Ansart, A. 2015 Movement propensity and ability correlate with ecological specialization in European land snails: Comparative analysis of a dispersal syndrome. *J. Anim. Ecol.* **84**, 228–238. (doi:10.1111/1365-2656.12276)

387 21. Charnov, E. L. 1976 Optimal foraging, the marginal value theorem. *Theor. Popul. Biol.* **9**, 129–136. (doi:10.1016/0040-5809(76)90040-X)

389 22. Rice, W. R. & Salt, G. 1990 The Evolution of Reproductive Isolation as a Correlated Character Under Sympatric Conditions: Experimental Evidence. *Evolution (N. Y).* **44**, 1140–1152. (doi:10.2307/2409278)

392 23. Edelaar, P. & Bolnick, D. I. 2012 Non-random gene flow: An underappreciated force in evolution and ecology. *Trends Ecol. Evol.* **27**, 659–665. (doi:10.1016/j.tree.2012.07.009)

394 24. Edelaar, P., Siepielski, A. M. & Clobert, J. 2008 Matching habitat choice causes directed gene flow: A neglected dimension in evolution and ecology. *Evolution (N. Y).* **62**, 2462–2472.
396 (doi:10.1111/j.1558-5646.2008.00459.x)

397 25. Holt, R. D. 1987 Population dynamics and evolutionary processes: the manifold roles of habitat selection. *Evol. Ecol.* **1**, 331–347. (doi:10.1007/BF02071557)

399 26. Clobert, J., Le Galliard, J. F., Cote, J., Meylan, S. & Massot, M. 2009 Informed dispersal, heterogeneity in animal dispersal syndromes and the dynamics of spatially structured populations. *Ecol. Lett.* **12**, 197–209. (doi:10.1111/j.1461-0248.2008.01267.x)

402 27. Gillis, J. E. 1982 Substrate colour-matching cues in the cryptic grasshopper Circotettix rabula rabula (Rehn &amp; Hebard). *Anim. Behav.* **30**, 113–116. (doi:10.1016/S0003-3472(82)80244-3)

405 28. Ahnesjö, J. & Forsman, A. 2006 Differential habitat selection by pygmy grasshopper color morphs; interactive effects of temperature and predator avoidance. *Evol. Ecol.* **20**, 235–257. (doi:10.1007/s10682-006-6178-8)

408 29. Jacob, S., Chaine, A. S., Schtickzelle, N., Huet, M. & Clobert, J. 2015 Social information from immigrants: Multiple immigrant-based sources of information for dispersal decisions in a ciliate. *J. Anim. Ecol.* **84**, 1373–1383. (doi:10.1111/1365-2656.12380)

411 30. Cantrell, R. S., Cosner, C. & Lou, Y. 2006 Movement toward better environments and the evolution of rapid diffusion. *Math. Biosci.* **204**, 199–214. (doi:10.1016/j.mbs.2006.09.003)

413 31. Berner, D. & Thibert-Plante, X. 2015 How mechanisms of habitat preference evolve and promote divergence with gene flow. *J. Evol. Biol.* **28**, 1641–1655. (doi:10.1111/jeb.12683)

415 32. Bolnick, D. I. & Otto, S. P. 2013 The magnitude of local adaptation under genotype-dependent dispersal. *Ecol. Evol.* **3**, 4722–4735. (doi:10.1002/ece3.850)

417 33. Holt, R. D. & Barfield, M. 2008 Habitat Selection and Niche Conservatism. *Isr. J. Ecol. Evol.* **54**, 295–309. (doi:10.1560/IJEE.54.3-4.295)

419 34. Ravigné, V., Dieckmann, U. & Olivieri, I. 2009 Live Where You Thrive: Joint Evolution of Habitat Choice and Local Adaptation Facilitates Specialization and Promotes Diversity. *Am. Nat.* **174**, E141–E169. (doi:10.1086/605369)

422 35. Scheiner, S. M. 2016 Habitat Choice and Temporal Variation Alter the Balance between Adaptation by Genetic Differentiation, a Jack-of-All-Trades Strategy, and Phenotypic
424 Plasticity. Am. Nat. **187**, 000–000. (doi:10.1086/685812)

425 36. Armsworth, P. R. 2009 Conditional dispersal, clines, and the evolution of dispersiveness.

426 *Theor. Ecol.* **2**, 105–117. (doi:10.1007/s12080-008-0032-2)

427 37. Jacob, S., Legrand, D., Chaine, A. S., Bonte, D., Schtickzelle, N., Huet, M. & Clobert, J. 2017

428 Gene flow favours local adaptation under habitat choice in ciliate microcosms. *Nat. Ecol. Evol.*

429 (doi:10.1038/s41559-017-0269-5)

430 38. Hendry, A. P. 2016 *Eco-evolutionary dynamics*. Princeton university Press.

431 39. Abbott, K. C. 2011 A dispersal-induced paradox: Synchrony and stability in stochastic

432 metapopulations. *Ecol. Lett.* **14**, 1158–1169. (doi:10.1111/j.1461-0248.2011.01670.x)

433 40. Taylor, A. D. 1990 Metapopulations, Dispersal, and Predator-Prey Dynamics: An Overview.

434 *Ecology* **71**, 429–433. (doi:10.2307/1940297)

435 41. Wang, S., Haegeman, B. & Loreau, M. 2015 Dispersal and metapopulation stability. PeerJ **3**,

436 e1295. (doi:10.7717/peerj.1295)

437 42. Jacob, S., Bestion, E., Legrand, D., Clobert, J. & Cote, J. 2015 Habitat matching and spatial

438 heterogeneity of phenotypes: implications for metapopulation and metacommunity functioning.

439 *Evol. Ecol.* **29**, 851–871. (doi:10.1007/s10682-015-9776-5)

440 43. Massol, F. & Débarre, F. 2015 Evolution of dispersal in spatially and temporally variable

441 environments: The importance of life cycles. *Evolution (N. Y).* **69**, 1925–1937.

442 (doi:10.1111/evo.12699)

443 44. Wang, S. & Loreau, M. 2014 Ecosystem stability in space: α, β and γ variability. *Ecol. Lett.* **17**,

444 891–901. (doi:10.1111/ele.12292)

445 45. Futuyma, D. J. & Moreno, G. 1988 The Evolution of Ecological Specialization. *Annu. Rev.*

446 *Ecol. Syst.* **19**, 207–233. (doi:10.1146/annurev.es.19.110188.001231)

447 46. Del Mar Delgado, M., Ratikainen, I. I. & Kokko, H. 2011 Inertia: The discrepancy between

448 individual and common good in dispersal and prospecting behaviour. *Biol. Rev.* **86**, 717–732.

449 (doi:10.1111/j.1469-185X.2010.00167.x)

450 47. Lande, R. 1993 Risks of Population Extinction from Demographic and Environmental

451 Stochasticity and Random Catastrophes. Am. Nat. **142**, 911–927. (doi:10.1086/285580)
452 48. Lande, R. 1994 Risk of Population Extinction from Fixation of New Deleterious Mutations.
*Evolution (N. Y).* **48**, 1460. (doi:10.2307/2410240)

454 49. Travis, J. M. J. et al. 2012 Modelling dispersal: An eco-evolutionary framework incorporating emigration, movement, settlement behaviour and the multiple costs involved. *Methods Ecol.*
*Evol.* **3**, 628–641. (doi:10.1111/j.2041-210X.2012.00193.x)

457 50. Prokopy, R. J. 1968 Visual responses of apple maggot flies, rhagoletis pomonella (diptera: tephritidae): orchard studies. *Entomol. Exp. Appl.* **11**, 403–422. (doi:10.1111/j.1570-7458.1968.tb02070.x)

460 51. Jaenike, J. & Holt, R. D. 1991 Genetic Variation for Habitat Preference ☐: Evidence and Explanations. *Am. Nat.* **137**, s67–s90.

462 52. Jacob, S., Legrand, D., Chaine, A. S., Bonte, D., Schtickzelle, N., Huet, M. & Clobert, J. 2017 Gene flow favours local adaptation under habitat choice in ciliate microcosms. *Nat. Ecol. Evol.*
**1**, 1407–1409. (doi:10.1038/s41559-017-0269-5)

465 53. Spiegel, O. & Nathan, R. 2010 Incorporating density dependence into the directed-dispersal hypothesis. *Ecology* **91**, 1538–1548. (doi:10.1890/09-1166.1)

467 54. Burgess, S. C., Baskett, M. L., Grosberg, R. K., Morgan, S. G. & Strathmann, R. R. 2016 When is dispersal for dispersal? Unifying marine and terrestrial perspectives. *Biol. Rev.* **91**, 867–882. (doi:10.1111/brv.12198)

470 55. Bonte, D. et al. 2012 Costs of dispersal. *Biol. Rev.* **87**, 290–312. (doi:10.1111/j.1469-185X.2011.00201.x)

472 56. Cote, J., Bestion, E., Jacob, S., Travis, J., Legrand, D. & Baguette, M. 2017 Evolution of dispersal strategies and dispersal syndromes in fragmented landscapes. *Ecography (Cop.)*. **40**, 56–73. (doi:10.1111/ecog.02538)

475 57. Bocedi, G., Heinonen, J. & Travis, J. M. J. 2012 Uncertainty and the Role of Information Acquisition in the Evolution of Context-Dependent Emigration. *Am. Nat.* **179**, 606–620. (doi:10.1086/665004)

478 58. Akcali, C. K. & Porter, C. K. 2017 Comment on Van Belleghem et al. 2016: Habitat choice mechanisms in speciation and other forms of diversification. *Evolution (N. Y).* **71**, 2754–2761.
480 (doi:10.1111/evo.13375)

481

482 **Figures and tables:**

483 Figure 1: relation of local environmental value to individual efficiency in that location for a specialist

484 (orange) and a generalist (blue) with optimal environment (muT) = 0.5.

485

486 Figure 2: Niche width evolution in relation to effective dispersal propensity. Scenarios of random (x)

487 and informed (o) departure combined with random (orange) or informed (green) settlement. Because

488 the fixed dispersal trait does not equate the dispersal propensity in informed departure scenarios (o),

489 their corresponding data points are not equally distributed across the dispersal propensity range.

490

491 Figure 3: Metapopulation size for scenarios with fixed dispersal trait. Scenarios of random (x) and

492 informed (o) departure combined with random (orange) or informed (green) settlement.

493

494 Figure 4: Local population variability for scenarios with fixed dispersal trait. Scenarios of random (x)

495 and informed (o) departure combined with random (orange) or informed (green) settlement.

496

497 Figure 5: Effective dispersal propensity resulting from an evolving dispersal trait under fixed levels of

498 niche width. Scenarios of random (x) and informed (o) departure combined with random (orange) or

499 informed (green) settlement. Right panel zooms in on the scenarios of random settlement.

500

501 Figure 6: Metapopulation size for scenarios with fixed niche width. Scenarios of random (x) and

502 informed (o) departure combined with random (orange) or informed (green) settlement.

503
504 Figure 7: Local population variability for scenarios with fixed niche width. Scenarios of random (x)

505 and informed (o) departure combined with random (orange) or informed (green) settlement.

506

507 Table 1: fixed model parameters
<figure><img src="image_2.png" /></figure>
evolved niche width

<figure><img src="image_3.png" /></figure>
<figure><img src="image_4.png" /></figure>

metapopulation size
local population variability

<figure><img src="image_5.png" /></figure>
<figure><img src="image_6.png" /></figure>

<figure><img src="image_7.png" /></figure>
metapopulation size

metapopulation size

<figure><img src="image_8.png" /></figure>
local population variability

<figure><img src="image_9.png" /></figure>