# Replicator equation

(Redirected from Replicator dynamics)

In mathematics, the replicator equation is a deterministic monotone non-linear and non-innovative game dynamic used in evolutionary game theory. 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.

## Equational forms

The most general continuous form is given by the differential equation

${\displaystyle {\dot {x_{i}}}=x_{i}[f_{i}(x)-\varphi (x)],\quad \varphi (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 \varphi (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 \varphi =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(\varphi 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}-\varphi -\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. 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 (see Page & Nowak's (2002) paper Unifying Evolutionary Dynamics).

## 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:

${\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}$. This equation is a simultaneous generalization of the replicator equation and the quasispecies equation, and is used in the mathematical analysis of language.

The replicator equation can easily be generalized to asymmetric games. A recent generalization that incorporates population structure is used in evolutionary graph theory.