# Replicator equation

In mathematics, the replicator equation is a deterministic monotone non-linear and non-innovative game dynamic used in evolutionary game theory.[1] The replicator equation differs from other equations used to model replication, such as the quasispecies equation, in that it allows the fitness function to incorporate the distribution of the population types rather than setting the fitness of a particular type constant. This important property allows the replicator equation to capture the essence of selection. Unlike the quasispecies equation, the replicator equation does not incorporate mutation and so is not able to innovate new types or pure strategies.

## Equation

The most general continuous form of the replicator equation is given by the differential equation:

${\displaystyle {\dot {x_{i}}}=x_{i}[f_{i}(x)-\phi (x)],\quad \phi (x)=\sum _{j=1}^{n}{x_{j}f_{j}(x)}}$

where ${\displaystyle x_{i}}$ is the proportion of type ${\displaystyle i}$ in the population, ${\displaystyle x=(x_{1},\ldots ,x_{n})}$ is the vector of the distribution of types in the population, ${\displaystyle f_{i}(x)}$ is the fitness of type ${\displaystyle i}$ (which is dependent on the population), and ${\displaystyle \phi (x)}$ is the average population fitness (given by the weighted average of the fitness of the ${\displaystyle n}$ types in the population). Since the elements of the population vector ${\displaystyle x}$ sum to unity by definition, the equation is defined on the n-dimensional simplex.

The replicator equation assumes a uniform population distribution; that is, it does not incorporate population structure into the fitness. The fitness landscape does incorporate the population distribution of types, in contrast to other similar equations, such as the quasispecies equation.

In application, populations are generally finite, making the discrete version more realistic. The analysis is more difficult and computationally intensive in the discrete formulation, so the continuous form is often used, although there are significant properties that are lost due to this smoothing. Note that the continuous form can be obtained from the discrete form by a limiting process.

To simplify analysis, fitness is often assumed to depend linearly upon the population distribution, which allows the replicator equation to be written in the form:

${\displaystyle {\dot {x_{i}}}=x_{i}\left(\left(Ax\right)_{i}-x^{T}Ax\right)}$

where the payoff matrix ${\displaystyle A}$ holds all the fitness information for the population: the expected payoff can be written as ${\displaystyle \left(Ax\right)_{i}}$ and the mean fitness of the population as a whole can be written as ${\displaystyle x^{T}Ax}$. It can be shown that the change in the ratio of two proportions ${\displaystyle x_{i}/x_{j}}$ with respect to time is:

${\displaystyle {d \over {dt}}\left({x_{i} \over {x_{j}}}\right)={x_{i} \over {x_{j}}}\left[f_{i}(x)-f_{j}(x)\right]}$
In other words, the change in the ratio is driven entirely by the difference in fitness between types.

### Derivation of deterministic and stochastic replicator dynamics

Suppose that the number of individuals of type ${\displaystyle i}$ is ${\displaystyle N_{i}}$ and that the total number of individuals is ${\displaystyle N}$. Define the proportion of each type to be ${\displaystyle x_{i}=N_{i}/N}$. Assume that the change in each type is governed by geometric Brownian motion:

${\displaystyle dN_{i}=f_{i}N_{i}dt+\sigma _{i}N_{i}dW_{i}}$
where ${\displaystyle f_{i}}$ is the fitness associated with type ${\displaystyle i}$. The average fitness of the types ${\displaystyle \phi =x^{T}f}$. The Wiener processes are assumed to be uncorrelated. For ${\displaystyle x_{i}(N_{1},...,N_{m})}$, Itô's lemma then gives us:
{\displaystyle {\begin{aligned}dx_{i}(N_{1},...,N_{m})&={\partial x_{i} \over {\partial N_{j}}}dN_{j}+{1 \over {2}}{\partial ^{2}x_{i} \over {\partial N_{j}\partial N_{k}}}dN_{j}dN_{k}\\&={\partial x_{i} \over {\partial N_{j}}}dN_{j}+{1 \over {2}}{\partial ^{2}x_{i} \over {\partial N_{j}^{2}}}(dN_{j})^{2}\end{aligned}}}
The partial derivatives are then:
{\displaystyle {\begin{aligned}{\partial x_{i} \over {\partial N_{j}}}&={1 \over {N}}\delta _{ij}-{x_{i} \over {N}}\\{\partial ^{2}x_{i} \over {\partial N_{j}^{2}}}&=-{2 \over {N^{2}}}\delta _{ij}+{2x_{i} \over {N^{2}}}\end{aligned}}}
where ${\displaystyle \delta _{ij}}$ is the Kronecker delta function. These relationships imply that:
${\displaystyle dx_{i}={dN_{i} \over {N}}-x_{i}\sum _{j}{dN_{j} \over {N}}-{(dN_{i})^{2} \over {N^{2}}}+x_{i}\sum _{j}{(dN_{j})^{2} \over {N^{2}}}}$
Each of the components in this equation may be calculated as:
{\displaystyle {\begin{aligned}{dN_{i} \over {N}}&=f_{i}x_{i}dt+\sigma _{i}x_{i}dW_{i}\\-x_{i}\sum _{j}{dN_{j} \over {N}}&=-x_{i}\left(\phi dt+\sum _{j}\sigma _{j}x_{j}dW_{j}\right)\\-{(dN_{i})^{2} \over {N^{2}}}&=-\sigma _{i}^{2}x_{i}^{2}dt\\x_{i}\sum _{j}{(dN_{j})^{2} \over {N^{2}}}&=x_{i}\left(\sum _{j}\sigma _{j}^{2}x_{j}^{2}\right)dt\end{aligned}}}
Then the stochastic replicator dynamics equation for each type is given by:
${\displaystyle dx_{i}=x_{i}\left(f_{i}-\phi -\sigma _{i}^{2}x_{i}+\sum _{j}\sigma _{j}^{2}x_{j}^{2}\right)dt+x_{i}\left(\sigma _{i}dW_{i}-\sum _{j}\sigma _{j}x_{j}dW_{j}\right)}$
Assuming that the ${\displaystyle \sigma _{i}}$ terms are identically zero, the deterministic replicator dynamics equation is recovered.

## Analysis

The analysis differs in the continuous and discrete cases: in the former, methods from differential equations are utilized, whereas in the latter the methods tend to be stochastic. Since the replicator equation is non-linear, an exact solution is difficult to obtain (even in simple versions of the continuous form) so the equation is usually analyzed in terms of stability. The replicator equation (in its continuous and discrete forms) satisfies the folk theorem of evolutionary game theory which characterizes the stability of equilibria of the equation. The solution of the equation is often given by the set of evolutionarily stable states of the population.

In general nondegenerate cases, there can be at most one interior evolutionary stable state (ESS), though there can be many equilibria on the boundary of the simplex. All the faces of the simplex are forward-invariant which corresponds to the lack of innovation in the replicator equation: once a strategy becomes extinct there is no way to revive it.

Phase portrait solutions for the continuous linear-fitness replicator equation have been classified in the two and three dimensional cases. Classification is more difficult in higher dimensions because the number of distinct portraits increases rapidly.

## Relationships to other equations

The continuous replicator equation on ${\displaystyle n}$ types is equivalent to the Generalized Lotka–Volterra equation in ${\displaystyle n-1}$ dimensions.[2][3] The transformation is made by the change of variables:

${\displaystyle x_{i}={\frac {y_{i}}{1+\sum _{j=1}^{n-1}{y_{j}}}}\quad i=1,\ldots ,n-1}$
${\displaystyle x_{n}={\frac {1}{1+\sum _{j=1}^{n-1}{y_{j}}}},}$

where ${\displaystyle y_{i}}$ is the Lotka–Volterra variable. The continuous replicator dynamic is also equivalent to the Price equation.[4]

## Discrete replicator equation

When one considers an unstructured infinite population with non-overlapping generations, one should work with the discrete forms of the replicator equation. Mathematically, two simple phenomenological versions---

${\displaystyle x'_{i}=x_{i}+x_{i}\left[\left(Ax\right)_{i}-x^{T}Ax\right]\,({\rm {type~I),}}}$
${\displaystyle x'_{i}=x_{i}\left[{\frac {\left(Ax\right)_{i}}{x^{T}Ax}}\right]\,({\rm {type~II),}}}$

---are consistent with the Darwinian tenet of natural selection or any analogous evolutionary phenomena. Here, prime stands for the next time step. However, the discrete nature of the equations puts bounds on the payoff-matrix elements.[5] Interestingly, for the simple case of two-player-two-strategy games, the type I replicator map is capable of showing period doubling bifurcation leading to chaos and it also gives a hint on how to generalize[6] the concept of the evolutionary stable state to accommodate the periodic solutions of the map.

## Generalizations

A generalization of the replicator equation which incorporates mutation is given by the replicator-mutator equation, which takes the following form in the continuous version:[7]

${\displaystyle {\dot {x_{i}}}=\sum _{j=1}^{n}{x_{j}f_{j}(x)Q_{ji}}-\phi (x)x_{i},}$

where the matrix ${\displaystyle Q}$ gives the transition probabilities for the mutation of type ${\displaystyle j}$ to type ${\displaystyle i}$, ${\displaystyle f_{i}}$ is the fitness of the ${\displaystyle i^{th}}$ and ${\displaystyle \phi }$ is the mean fitness of the population. This equation is a simultaneous generalization of the replicator equation and the quasispecies equation, and is used in the mathematical analysis of language.

The discrete version of the replicator-mutator equation may have two simple types in line with the two replicator maps written above:

${\displaystyle x'_{i}=x_{i}+\sum _{j=1}^{n}{x_{j}f_{j}(x)Q_{ji}}-\phi (x)x_{i},}$

and

${\displaystyle x'_{i}=x_{i}+{\frac {\sum _{j=1}^{n}{x_{j}f_{j}(x)Q_{ji}}}{\phi (x)}},}$

respectively.

The replicator equation or the replicator-mutator equation can be extended[8] to include the effect of delay that either corresponds to the delayed information about the population state or in realizing the effect of interaction among players. The replicator equation can also easily be generalized to asymmetric games. A recent generalization that incorporates population structure is used in evolutionary graph theory.[9]

## References

1. ^ Hofbauer, Josef; Sigmund, Karl (2003). "Evolutionary game dynamics". Bulletin of the American Mathematical Society. 40 (4): 479–519. doi:10.1090/S0273-0979-03-00988-1. ISSN 0273-0979.
2. ^ Bomze, Immanuel M. (1983-10-01). "Lotka-Volterra equation and replicator dynamics: A two-dimensional classification". Biological Cybernetics. 48 (3): 201–211. doi:10.1007/BF00318088. ISSN 1432-0770. S2CID 206774680.
3. ^ Bomze, Immanuel M. (1995-04-01). "Lotka-Volterra equation and replicator dynamics: new issues in classification". Biological Cybernetics. 72 (5): 447–453. doi:10.1007/BF00201420. ISSN 1432-0770. S2CID 18754189.
4. ^ Page, KAREN M.; Nowak, MARTIN A. (2002-11-07). "Unifying Evolutionary Dynamics". Journal of Theoretical Biology. 219 (1): 93–98. doi:10.1006/jtbi.2002.3112. ISSN 0022-5193. PMID 12392978.
5. ^ Pandit, Varun; Mukhopadhyay, Archan; Chakraborty, Sagar (2018). "Weight of fitness deviation governs strict physical chaos in replicator dynamics". Chaos. 28 (3): 033104. arXiv:1703.10767. Bibcode:2018Chaos..28c3104P. doi:10.1063/1.5011955. PMID 29604653. S2CID 4559066.
6. ^ Mukhopadhyay, Archan; Chakraborty, Sagar (2020). "Periodic Orbit can be Evolutionarily Stable: Case Study of Discrete Replicator Dynamics". Journal of Theoretical Biology. 497: 110288. arXiv:2102.11034. doi:10.1016/j.jtbi.2020.110288. PMID 32315673. S2CID 216073761.
7. ^ Nowak, Martin A. (2006). Evolutionary Dynamics: Exploring the Equations of Life. Belknap Press. pp. 272–273. ISBN 978-0674023383.
8. ^ Alboszta, Jan; Miękisz, Jacek (2004). "Stability of evolutionarily stable strategies in discrete replicator dynamicswithtimedelay". Journal of Theoretical Biology. 231 (2): 175–179. arXiv:q-bio/0409024. doi:10.1016/j.jtbi.2004.06.012. PMID 15380382. S2CID 15308310.
9. ^ Lieberman, Erez; Hauert, Christoph; Nowak, Martin A. (2005). "Evolutionary dynamics on graphs". Nature. 433 (7023): 312–316. Bibcode:2005Natur.433..312L. doi:10.1038/nature03204. ISSN 1476-4687. PMID 15662424. S2CID 4386820.