## Abstract

Environmental factors are known to affect the strength and the specificity of interactions between hosts and parasites. However, how this shapes patterns of coevolutionary dynamics is not clear. Here, we construct a simple mathematical model to study the effect of environmental change on host–parasite coevolutionary outcome when interactions are of the matching-alleles or the gene-for-gene type. Environmental changes may effectively alter the selective pressure and the level of specialism in the population. Our results suggest that environmental change altering the specificity of selection in antagonistic interactions can produce alternating time windows of cyclical allele-frequency dynamics and cessation thereof. This type of environmental impact can also explain the maintenance of polymorphism in gene-for-gene interactions without costs. Overall, our study points to the potential consequences of environmental variation in coevolution, and thus the importance of characterizing genotype-by-genotype-by-environment interactions in natural host–parasite systems, especially those that change the direction of selection acting between the two species.

## 1. Introduction

Hosts are under selective pressure to resist parasites, and parasites are selected to overcome host defences. This may lead to coevolutionary dynamics, where gene frequency changes in one species trigger gene frequency changes in the other species and vice versa (reviewed in [1,2]). Because rare genotypes are expected to be advantageous in such a scenario, cyclic gene-frequency dynamics may ensue, sometimes referred to as Red Queen (RQ) dynamics. Although RQ dynamics have been documented in some study systems [3–5], they remain poorly understood. This gap in our knowledge is particularly noteworthy since antagonistic coevolution between hosts and parasites has far-reaching implications for many topics in biology, including local adaptation [6], maintenance of genetic polymorphism in populations [7,8], molecular evolution [9], deployment of resistance genes in agriculture [10], evolution of pathogen virulence [11,12], emergence and spread of infectious diseases [2] and the evolution of sex [13–15].

It is commonly accepted that the genetics of the host and the parasite are a major determinant of infection success. A number of studies have shown that one parasite genotype may be more infective than another parasite genotype on a given host, but on another host this hierarchy is reversed—a pattern known as genotype-by-genotype (*G* × *G*) interaction ([16–19]; see [20] for review). Modelling has demonstrated that the exact type of genetic interaction is decisive for the coevolutionary dynamics expected to occur, and in particular for whether RQ dynamics ensue or polymorphism at the interaction loci is lost (e.g. [21–24]). On the other hand, there is increasing evidence that the outcome of host–parasite interactions can be substantially affected by environmental factors, e.g. temperature or availability of nutrients (reviewed in [25–28]). Thus, it is uncertain how stable *G* × *G* interactions are in the presence of environmental fluctuations, and how the coevolutionary dynamics of hosts and parasites are affected by such fluctuations.

How can a host–parasite *G* × *G* interaction responds to environmental conditions? First, environmental variation could have an equally strong influence on the fitness values of all genotypes involved. Within a population genetic framework (i.e. when there is no density-dependent selection), this type of impact is not expected to affect the coevolutionary dynamics because the relative fitness of each genotype is not affected by the environment. Second, fitness values of different genotypes could be affected differently by environmental factors, but still in a way that the ranking of fitness values remains the same. Finally, the specificity of the *G* × *G* could be changed through environmental variation. Assuming only two host and two parasite genotypes, this means that on each host, the fittest parasite in one environment is the least fit in a different environment (cf. box 2 in [28]). The latter two situations are often referred to as *G* × *G* × *E* interactions, and cases of environmental impact on both the strength and the specificity of selection have been reported (B. Sadd, 2010, Submitted; [29,30]; see also §4).

In this study, we examine the impact of the second and third kind of environmental change—where the specificity and the strength of the *G* × *G* are changed—on host–parasite coevolutionary dynamics by means of a simple mathematical model. The impact of temporal environmental heterogeneity has previously been studied in the context of the geographical mosaic theory [31], where the authors considered an environment that alters the quality of interaction between species (antagonism versus mutualism). Here, we investigate *G* × *G* × *E* effects in strictly antagonistic interactions. Although we focus on situations where both the strength and the specificity are affected by the environment, our model also covers cases where only the strength of selection is environment dependent. As the mechanistic basis of host–parasite interactions remains poorly understood, we assume that the genetic basis of interaction is mediated by two standards, biologically documented interaction models, namely the matching-alleles (MA) and the gene-for-gene (GFG) models (see §2 for a brief discussion of these models). Our results show that if the specificity of the interaction is changed through environmental variation, the resulting coevolutionary dynamics can be qualitatively affected, even to the extent that RQ dynamics disappear completely where they would occur in a constant environment, or emerge where they would not.

## 2. The model

### (a) General construction

To investigate the impact of environment on host–parasite RQ dynamics, we consider a standard, discrete-time, population-genetic model of host–parasite dynamics (e.g. [32,33]). For the sake of simplicity, both species are assumed to be haploid and to reproduce asexually. Each species carries a single, biallelic locus. The allele frequencies in the next generation are determined by the fitness values, given by the interaction model (table 1), as well as frequencies of host and parasite alleles in the current generation. First, each species undergoes selection, which operates as follows. If *f*_{i}^{H} denotes the frequency of allele *i* of the host and *f*_{i}^{P} denotes the frequency of allele *i* of the parasite, then the frequencies after selection will be given by
2.1where the vector *w*_{i}^{s} denotes the fitness conferred by allele *i* in species *s* and denotes the mean fitness of species *s* (host H or parasite P). These fitness values are given by
2.2where the matrix *w*^{s} = (*w*_{ij}^{s})_{2×2} denotes the fitness values of an individual of species *s* with allele *i* when encountering an individual of the second species with allele *j*. These fitness values are given by the interaction model (cf. table 1). In order to avoid extinction of one of the alleles, selection is followed by reproduction during which mutation between the two alleles can occur at a rate *μ* = 10^{−5}. Both host and parasite population are assumed to be infinitely large and are started with random allele frequencies. Simulation are started with a burn-in phase of at least 6000 generations, followed by 2000 generations during which the actual dynamics are recorded.

### (b) Environment

We allow the abiotic environment to affect the interaction between the host and the parasite. In particular, the environment is given by a parameter *E*, which varies continuously between two extreme environments, E1 and E2. The interaction model between the two species is given by the interaction matrix *w*^{s,E1} in environment E1 and *w*^{s,E2} in environment E2, respectively, where *s* stands for the host (H) or parasite (P) species. The fitness matrix for an arbitrary environment *E* ∈ [0,1] is then given by the equation
2.3

Here, *E* = 1 yields the interaction model in environment E1 and *E* = 0 in E2. There are at least two interpretations of such environmental impact on the fitness values assumed. The first interpretation is that the fitness values of individuals in the population depend linearly on the parameter *E*, which can vary on a continuum between 0 and 1. Here, all individuals are assumed to be equally affected by an environmental factor (a good example might be temperature), and the fitness of each genotype is an *E*-weighted mean of the fitness values in the extreme environments. A second interpretation is that environment is discrete (e.g. presence or absence of a certain nutrient). Thus, only environments E1 and E2 occur, but these two environments are distributed spatially in the habitat of the population. In each generation, a randomly chosen fraction *E* of genotypes then undergoes an interaction defined by *w*^{s,E1} and the remaining fraction 1 − *E* undergoes an interaction defined by *w*^{s,E2}. This interpretation of the model requires global competition and complete mixing of the population during reproduction. Finally, we generally assume the environment to be abiotic, but a biotic interpretation is also possible as long as the environmental fluctuations are independent of the coevolutionary dynamics.

By default, we assume *E* to be time dependent, oscillating between the extreme values according to
Here, both the mean value of the environment and the amplitude of oscillations are equal to 1/2 and *T* is the period of oscillations. We also investigated the impact of other types of environmental change, which are discussed in §3.

### (c) Environment-dependent interactions

We examine two classes of interaction models: the MA class of interactions and the GFG class of interactions (table 1). The main difference between the two models is the degree of specialism/generalism. The MA model represents a full degree of specialism where a given parasite is better than any other parasite in infecting a given host but is worse off on any different host. This type of a lock–key mechanism (match versus non-match) is thought to emulate animal self-/non-self-recognition systems [34]. The GFG model, on the other hand, allows for both specialist and generalist parasites, the latter being equally effective in infecting all hosts. Although initially introduced to describe plant–fungal interactions [35,36], the general context of this model is beginning to be recognized [37–40]. Both models can produce persistant RQ dynamics, although these dynamics differ in some respects [21,36].

When MA interactions are considered, we assume that the ‘matching’ is environment dependent, where ‘matching’ refers to the interaction between the host allele and the parasite allele that result in infection. In particular, in environment E1 allele, A matches allele A and B matches B, whereas in environment E2, allele A matches B, and B matches A. The interaction matrices then take the following form: 2.4

The notation we use is the following: *s*_{H}^{E1} and *s*_{P}^{E1} are the selection coefficients for the hosts and parasites, respectively, in environment E1 and *s*_{H}^{E2} and *s*_{P}^{E2} are the selection coefficients in environment E2. (Unless noted otherwise, we assume *s*_{H}^{E1} > 0, *s*_{H}^{E2} > 0, *s*_{P}^{E1} > 0, *s*_{P}^{E2} > 0.) For any given environment, *E*, the effective interaction matrices are obtained by the use of equation (2.3).

When GFG interactions are considered, we assume that the ‘matching’, which in this context results in host resistance, occurs solely between one pair of loci: in environment E1 only host allele A matches parasite allele A, and in environment E2 only host allele B matches parasite allele B. Therefore, in the host, allele A confers resistance in environment E1 and susceptibility to parasite in E2, whereas the converse is true for allele B. In the parasites, allele B is a generalist in E1 because it allows infecting any host (universal virulence) and is a specialist in E2 because it allows infecting only host B (avirulence); the converse is true for allele A. The interaction matrices are given by 2.5where the notation is identical to the one in the case of the MA model, and the effective interaction matrices are also obtained by the use of equation (2.3).

## 3. Results

### (a) Matching-alleles interactions

In order to examine the impact of environment on the host–parasite dynamics defined by the MA-type of interaction, we examined the robustness of RQ dynamics when the environment is assumed to alter the specificity of the interaction between the two species. In particular, we assumed that the ‘matching’ of alleles depends on the environment in which the interaction takes place (see §2). Given the interaction matrices (2.4) for the two extreme environments, we first calculated the effective interaction model in any given environment *E* ∈ [0,1] from equation (2.3). One can show that this effective interaction model is again exactly an MA model (see table 1) with the original coefficients *s*_{H} and *s*_{P} replaced by the following ‘effective selection coefficients’ *ξ*_{H} and *ξ*_{P}:
3.1

Thus, the environment-dependent model behaves like a regular MA model for any fixed value of *E*, although now the effective selection coefficients need not be positive.

As we were interested in the conditions for the occurrence of oscillatory behaviour, we next developed a general framework in order to derive such conditions given an arbitrary, but constant fitness interaction model, which is given in electronic supplementary material, part I. Using inequalities (S6), we first derived the conditions for the occurrence of RQ dynamics given a static environment, i.e. when *E* = const., and then used these to examine the case of a slowly changing environment. It can be shown that the condition (S6) in the context of the interaction model (2.4) is equivalent to
3.2

This means that for RQ dynamics to occur, the genetic interaction must be ‘antagonistic’, defined as an interaction where a host allele that is optimal for the host, given interaction with a particular parasite, does not maximize parasite fitness, and vice versa. By contrast, when the optimal allele for the host is also optimal for the parasite, a synergistic genetic interaction occurs (see electronic supplementary material).

A graphical representation of condition (3.2) is shown in figure 1*a*. One can see that as *E* increases from 0, both *ξ*_{H} and *ξ*_{P} increase from negative to positive values. The point where *ξ*_{H} and *ξ*_{P} change sign marks a switch in the specificity in the interaction for each species, but importantly, this switch will in general occur for a different value of *E* in hosts and parasites. The result of this partial change in specificity is that there will be a range of *E* (between *s*_{H}^{E2}/(*s*_{H}^{E1} + *s*_{H}^{E2}) and *s*_{P}^{E2}/(*s*_{P}^{E1} + *s*_{P}^{E2})), where negative frequency-dependent selection (FDS) changes into positive FDS, leading to fixation of one host allele and one parasite allele. Negative FDS results from an antagonistic genetic interaction between the two species, whereas positive FDS stems from synergistic interaction. Positive FDS occurs only in models where the specificity of interaction varies. When the environment changes solely the strength of selection, synergism of genetic interaction never occurs and hence only the speed of cycles is affected. This can be seen from the fact that condition (3.2) is fulfilled for any value of *E* when *s*_{H}^{E2}< 0 and *s*_{P}^{E2}< 0.

The results can now be applied to understand the impact of environmental change on the coevolutionary dynamics, i.e. the case when *E* = *E*(*t*) and hence *ξ*_{H} = *ξ*_{H}(*t*) and *ξ*_{P} = *ξ*_{P}(*t*). When the environment changes slowly (*T* ≫1), *ξ*_{H} and *ξ*_{P} will stay approximately constant relative to the velocity of allele-frequency change, and thus this case is readily understood from the analytical predictions illustrated in figure 1*a*. Figure 1*b* shows an example of the resulting coevolutionary dynamics. It can be seen that, as expected, for intermediate values of *E* (when *ξ*_{H} and *ξ*_{P} are of opposite sign), a time window of allele fixation emerges. In this time window, antagonistic interaction changes into a synergistic interaction, leading to positive FDS. These results are qualitatively the same for other selection coefficients and other (non-zero) mutation rates. Examples for allele-frequency dynamics when the environment affects only the strength, but not the specificity of the interaction (i.e. the case of *s*_{H}^{E2}<0 and *s*_{P}^{E2}<0), are shown in electronic supplementary material, figure S5.

As the environment changes more swiftly, the ‘constant *E*’ approximation is not valid anymore. For this case, the geometric mean of effective selection coefficients over many generations determines the dynamics of the system. Defining
3.3where GM denotes the geometric mean, it can be shown (see electronic supplementary material) that the condition for the maintenance of RQ dynamics under temporal environmental variation (S11) reads
3.4

Note that condition (3.4) is a generalization of the condition (3.2).

In the extreme case of maximally rapid environmental change (*T* = 2), we have
3.5and condition (3.4) implies that either *s*_{H}^{E2}> *s*_{H}^{E1} and *s*_{P}^{E2}> *s*_{P}^{E1}, or *s*_{H}^{E2}< *s*_{H}^{E1} and *s*_{P}^{E2}< *s*_{P}^{E1} must hold for RQ dynamics to occur. If not, the antagonism will effectively change into synergism and polymorphism will not be maintained (see electronic supplementary material, figure S2*b*). Extensive numerical screenings of the parameter space have confirmed the analytical predictions (results not shown).

If condition (3.4) is fulfilled, a phenomenon is sometimes observed that may on first sight be counterintuitive: RQ dynamics can proceed slower in systems with larger selection coefficients than in systems with smaller selection coefficients (see figure 2 for an example). This effect can again be understood with the help of the geometric mean effective selection coefficients. Equation (3.5) shows that the effective selection acting on the populations can be small even if the selection coefficients measured in environments E1 and E2 are large, provided they are of comparable magnitude. As a result, the environmental fluctuations may effectively weaken the average selection acting on the population. Such long-term impact of environment stands in contrast to a short-term impact, which stems from the changes of the magnitude and the direction of selection from one generation to another. These changes will lead to rapid allele fluctuations, which in turn may contribute to shaping temporal patterns of genetic variation in the population (see small subplots in figure 2*a*,*b*). Such clear distinction between a long-term and a short-term effect becomes blurry as *T* becomes larger: the short-term effect and the long-term effect will gradually merge into the regular cycles observed for *E* ≈ const.

Finally, we also studied the impact of two other types of environmental change. First, we examined the impact of discrete switches between the extreme environments (i.e. *E* takes only the values 0 and 1 for *n* generations). In the case of maximally short persistence (*n* = 1), this situation is equivalent to the earlier discussed situation of *T* = 2. In the case of long persistence (*n* ≫1), the coevolutionary cycles observed in both environments are only briefly interrupted following a one-generation switch from E1 to E2 (or vice versa); otherwise the cycles are defined by the interaction model for a given environment (either E1 or E2; see electronic supplementary material, figure S2). Second, we examined the effect of stochastic environmental change (see electronic supplementary material, figure S3). For weak selection, the geometric mean condition for oscillatory allele-frequency dynamics can in this case be approximated by
3.6where the derivation is based on the one given in Nuismer *et al.* [31], and < *x* > denotes the expected value of *x*. As anticipated, the long-term/short-term distinction can again be observed in a rapidly changing environment, whereas for more steady environments, the *E* ≈ const. approximation is informative of the coevolutionary dynamics.

### (b) Gene-for-gene interactions

In this section, we analyse the impact of environmental change on the host–parasite interactions defined by a class of GFG models. Specifically, we consider here a situation where the environment changes specificity in both the host and the parasite (§2). This means that the two alternative phenotypes of the host interaction locus (resistance and susceptibility) as well as two alternative phenotypes of the parasite interaction locus (avirulence and virulence) are interchanged under the influence of the environment. Under these circumstances, the interaction model is given by equation (2.5). Based on the general results given in electronic supplementary material, part I, one can show that with fixed *E* coevolutionary cycles will ensue if and only if
3.7

Figure 3 shows simulation results for slowly and rapidly changing environments. Figure 3*a* shows cycling of allele frequencies in time when environment changes slowly. *E* can therefore be considered as approximately constant in each time point, which explains the resulting lack of coevolutionary dynamics for *E* = 0 and *E* = 1. As the environment changes between the two extremes, the antagonism and specialism, and hence the cycles, resume. Interestingly, as the environment changes between E1 and E2, the interaction model changes from the GFG into an MA-like model. In particular, for *E* = *s*_{H}^{E2}/(*s*_{H}^{E1} + *s*_{H}^{E2}), the host exactly undergoes the MA interaction given in table 1 with
and the same reasoning applies to the parasite. Hence, a changing environment that affects the specificity of a GFG interaction can induce negative FDS, thus explaining the maintenance of polymorphism in the population.

Figure 3*b* shows the dynamics for the case when environmental change is rapid (i.e. changes every generation). Similar to MA interactions, we can see that the impact of environment can be subdivided into a short-term effect and a long-term effect. The long-term effect is determined by the geometric mean selection coefficients over many generations, which again can be derived in analogy to the MA model case (although now there are two coefficients per species; see electronic supplementary material). The short-term effect stems from the selection coefficients acting on each allele in each of the extreme environments, thus changing every generation. In the case considered here, it can be seen that the rapid allele fluctuations observed for the MA model are replaced by the step-like fluctuations, suggesting that the short-term selection acting on them is uni-directional (see the small sub-figure in figure 3*b*). Such qualitatively different dynamics are the consequence of the inherent asymmetry of the GFG model, where one observes recurrent sweeps of the resistant and the virulent alleles. Since here, virulence and resistance are phenotypes expressed solely in one of the environments, the periods of increase are interrupted by periods of allele-frequency stagnation. Finally, the condition for the maintenance of polymorphism in a stochastic environment can be derived in the weak selection limit in analogy to condition (3.6); see the electronic supplementary material, part II.

We analysed different impacts of environment on the GFG model and found that polymorphism persists only if the specificity of interaction is altered in both species. Similar conclusions can be drawn if one ‘inverts’ the GFG model by assuming that the matching does not yield resistance but infectivity. Such model typically represents pathogens that possess receptors mediating their entrance into their host [38] but also in the interaction of plants with their necrotrophic parasites [41]. In this case, a switch in specificity of selection in both species is again required in order to yield evolutionary cycles. We also extended our analysis to switches between different interaction models (see electronic supplementary material, figure S4). Even though the results depend on the interaction model considered, in each case, the analysis presented here can be repeated in order to examine the underlying dynamics. Overall, we have seen that if the environment affects the specificity of interaction between the host and the parasite, the antagonism and hence coevolutionary dynamics can be affected in a way that is not to be expected from interactions obtained in a constant environment.

## 4. Discussion

Using a simple mathematical model, we studied the impact of environmental changes on coevolutionary dynamics between hosts and parasites. Our results show that when environmental factors influence the specificity of *G* × *G* host–parasite interactions, this can have profound effects on the coevolutionary dynamics. Most importantly, temporal environmental changes can inhibit RQ dynamics where they would occur in a stable environment (MA interactions) and trigger RQ dynamics where they would not occur (GFG interactions). These effects can be understood through the notion of effective selection coefficients, which clarify how both specificity and antagonism in the host–parasite interaction can be affected by environmental change.

An important factor is the velocity of environmental change. If the environment changes rapidly between the two extremes (e.g. every generation), then the impact of the environment can be subdivided into a long-term and a short-term effect. The long-term effect stems from the average of host and parasite selection coefficients over many generations. This long-term selection acting on the populations is typically weaker than the selection defined in a single, constant environment. On the other hand, the short-term effect stems from changes in selection coefficients from one generation to another. This can produce rapid allele fluctuations, the amplitude and direction of which depend on the difference in the relative selective pressure between the two interacting species. As environmental changes become slower, the short-term and the long-term effects will gradually merge together producing dynamics increasingly similar to those observed for a constant environment (cf. electronic supplementary material, figure S1). When the environmental change is slow relative to the generation time, the coevolutionary dynamics are governed by an approximately constant interaction model at each time point (figure 1).

Our results have a number of interesting implications for studies of host–parasite interactions. First, in populations that undergo *G* × *G* × *E* interactions with change in the specificity of selection, the effective selection acting in a population may be weaker than selection measured in constant environments. In particular, if strong selection coefficients in a host–parasite interaction are measured in two different environmental states, this does not necessarily mean that rapid coevolutionary dynamics—or any dynamics—are to be expected when the environment changes between these two states. There may be periods with slow allele-frequency oscillations (owing to weak effective selection) or fixations of alleles (owing to temporary loss of antagonism or specificity) that alternate with periods of rapid allele-frequency change.

Our findings can also be viewed within the framework of the geographical mosaic theory of coevolution [42,43]. This theory states that three processes are primary drivers of coevolutionary dynamics: (i) a selection mosaic mediated by *G* × *G* × *E* interactions, (ii) the existence of communities where selection may or may not be reciprocal, yielding evolutionary hot and cold spots, respectively, and (iii) a dynamic genetic structure of the coevolving species affected by gene flow, random genetic drift and other factors. Mathematical models studying the geographical mosaic have mainly focused on the impact of spatial environmental heterogeneity on the coevolutionary process (e.g. [44–47]; but see also Nuismer *et al.* [31] for an investigation of temporal environmental variability). Here, we have assumed that the sign and the magnitude of selection in the host–parasite interaction change with temporal environmental variation within a coevolutionary hot spot. We have shown that in spite of an inherent antagonistic interaction, temporal environmental variation can remove the negative FDS where it would occur in a constant environment (MA) and produce such selection where it would not occur (costless GFG). As a result, the environmental change affecting the direction of *G* × *G* interactions within a coevolutionary hot spot may qualitatively affect the coevolutionary host–parasite dynamics. It would be interesting to embed our model into a spatial context and examine the impact of environmental change affecting the specificity of host–parasite interactions in local coevolutionary hot spots on the global coevolutionary dynamics in a metapopulation.

Even though a sole change in the strength of selection can substantially affect the speed of allele-frequency change (see electronic supplementary material, figure S5), our results show that it is the change in specificity of selection that leads to the most dramatic impact on RQ dynamics. Although the latter form of environmental impact might not be as empirically common as assumed in this model, our study points to the importance of extensively characterizing these interactions in natural host–parasite populations. At present, the scale of occurrence of this latter type of environmental impact remains not well understood. To our knowledge, only three studies have provided direct evidence for *G* × *G* × *E* interactions (B. Sadd, 2010, Submitted; [29,30]). However, many studies have demonstrated strong *G* × *E* interactions, i.e. environmentally induced switches in the specificity of infection success of several parasite genotypes on a single host or vice versa (e.g. [48–55]; reviewed in [28]). Importantly, none of these studies could reject the presence of *G* × *G* × *E* interactions because either only a single host or only a single parasite genotype was tested. Taking the available evidence for both *G* × *G* and *G* × *E* interactions together and also taking into consideration that only a small fraction of genotypes and environmental conditions can be tested in experiments, it is to be expected that *G* × *G* × *E* interactions are common in natural systems. Our study points to the importance of extensively characterizing such interactions in natural host–parasite populations.

Environmental change as studied here may also have implications for the maintenance of polymorphism in host–parasite systems that undergo the GFG type of interaction. One important property of the GFG model is that in the absence of costs associated with the resistance allele in the host and the virulence allele in the parasite, the virulence allele will become fixed in the parasite population and coevolutionary dynamics cease. In the context of the GFG interactions, the notion of costly resistance/virulence has been a subject of debate [56–58], and a number of alternative explanations have been put forward [41,59,60]. Recently, it has been suggested that heterogeneous environments affecting selection in host–parasite systems undergoing GFG interactions may serve as yet another explanation for the persistence of polymorphism in natural populations [39]. Here, we show that persistent coevolutionary cycles can indeed emerge in the absence of costs and spatial structure, provided that the environment affects the specificity of the GFG interaction in both species.

We have deliberately kept the model as simple as possible, as this enabled us to obtain analytical solutions and provide intuitive interpretations of the simulation results. We realize that this model is too simple to fit any experimental case of *G* × *G* × *E* interactions in host–parasite systems. However, we believe its simplicity may reveal basic patterns of environmental impact on coevolutionary dynamics, which might underlie the outcome of interactions in real host–parasite systems with complex interaction networks. Extending our model to include multiple loci, recombination, population dynamics and life history of both species, epistatic effects and potentially diverging impact of different environmental factors on different loci would be a valuable future task.

## Acknowledgements

We wish to thank Bruce McDonald, Dominik Refardt, Ben Sadd and two anonymous referees for helpful comments on the manuscript, as well as Sebastian Bonhoeffer and Megan McDonald for stimulating discussions. This work was supported by the Swiss National Science Foundation.

- Received November 1, 2010.
- Accepted December 3, 2010.

- This Journal is © 2010 The Royal Society