Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Learning and Evolutionary Dynamics

The replicator dynamics and Moran process are just two of many ways a population might update its strategies over time. This chapter examines a broader family of learning and evolutionary dynamics, exploring how the choice of update rule shapes long-run behaviour.

Ideas spreading through a population as individuals copy them.

Figure 1:Ideas spread through a population as individuals copy what appears to be working. A number of population update mechanisms exist that model this spread in different ways.

Motivating Example: Does the Update Rule Matter?

Return to the graduate student reading group from Motivating Example: Everyone’s citing the preprint. The same coordination game governs citations, textbook (TT) versus preprint (PP), but now consider three plausible ways students might update their habits:

  1. Imitation: a student notices a peer doing well and copies them.

  2. Best-response: a student calculates which citation would be optimal given current group behaviour and switches if warranted.

  3. Generational turnover: new students join each cohort and tend to adopt whichever citation style is more prevalent.

The payoff matrix is the same in all three cases. Yet these mechanisms can produce different trajectories, different fixation probabilities, and different long-run distributions. This raises a fundamental question: does the update rule matter?

The answer is yes, particularly in small populations, at high selection intensity, or when the game has multiple equilibria. This chapter introduces three families of update rules (imitation, introspection, and best-response) alongside the Wright–Fisher process, and shows how they relate to each other and to the replicator dynamics and Moran process studied in previous chapters.

Theory

Definition: Imitation Dynamics


In imitation dynamics a population of NN individuals updates strategy by pairwise comparison. At each step:

  1. Two individuals ii and jj are selected uniformly at random.

  2. Individual ii switches to jj’s strategy with the Fermi probability:

P(ij)=11+eβ(πjπi)P(i \to j) = \frac{1}{1 + e^{-\beta(\pi_j - \pi_i)}}

where πi\pi_i and πj\pi_j are their current payoffs and β0\beta \geq 0 is the selection intensity.


The parameter β\beta controls how strongly payoff differences drive imitation:

Example: Imitation in the Citation Game

For the citation coordination game with β=1\beta = 1, suppose the group has N=4N=4 students with 2 citing the textbook and 2 citing the preprint. Each student’s fitness is:

πT=13+203=1πP=21+123=43\pi_T = \frac{1 \cdot 3 + 2 \cdot 0}{3} = 1 \qquad \pi_P = \frac{2 \cdot 1 + 1 \cdot 2}{3} = \frac{4}{3}

If student ii cites TT and is paired with student jj citing PP, the probability that ii switches to PP is:

P(ij)=11+e1(4/31)=11+e1/30.582\begin{align*} P(i \to j) &= \frac{1}{1 + e^{-1 \cdot (4/3 - 1)}}\\ &= \frac{1}{1 + e^{-1/3}} \approx 0.582 \end{align*}

Compare this to the Moran process, where the probability of the preprint spreading would instead depend on relative fitness proportions. Both models favour PP in this state, but at different rates and with different stochastic properties.

Definition: Introspection Dynamics


In introspection dynamics individuals update by counterfactual reasoning rather than by observing others. At each step:

  1. One individual ii is selected uniformly at random.

  2. Individual ii computes the payoff πj\pi_j they would receive if they switched to each alternative strategy jj, holding all other individuals’ strategies fixed.

  3. They switch to strategy jj with the Fermi probability:

P(ij)=11+eβ(πjπi)P(i \to j) = \frac{1}{1 + e^{-\beta(\pi_j - \pi_i)}}

The key distinction from imitation is the information used: imitation requires observing another individual’s payoff; introspection requires only computing a hypothetical payoff from the current population composition.

Example: Introspection vs Imitation

In the citation game at state (vT,vP)=(2,2)(v_T, v_P) = (2, 2), a textbook-citing student using introspection computes:

The switching probability is the same as in the imitation example above, 0.582\approx 0.582. In symmetric games with homogeneous populations the two dynamics coincide; differences emerge in asymmetric games or structured populations where who you observe versus who you are matters.

Definition: Best-Response Dynamics


Best-response dynamics is the deterministic limit of introspection dynamics as β\beta \to \infty. At each step an individual switches to whichever strategy has the highest expected payoff against the current population:

P(ij)={1if πj>πi,0if πj<πi,1/2if πj=πi.P(i \to j) = \begin{cases} 1 & \text{if } \pi_j > \pi_i,\\ 0 & \text{if } \pi_j < \pi_i,\\ 1/2 & \text{if } \pi_j = \pi_i. \end{cases}

In the infinite-population continuous-time limit, the population share xix_i of strategy ii evolves as Gilboa & Matsui, 1991:

x˙i=1[πi=maxkπk]xi\dot{x}_i = \mathbf{1}[\pi_i = \max_k \pi_k] - x_i

Best-response dynamics is used in economic models where agents are fully rational and have perfect information about population composition. It always converges to a Nash equilibrium or cycles around one, but unlike replicator dynamics it can reach strict equilibria from any initial condition.

Definition: Wright–Fisher Process


The Wright–Fisher process models evolution in a population with non-overlapping generations of fixed size NN. Each generation is formed by sampling NN offspring independently from the previous generation, where strategy ii is chosen with probability proportional to its fitness:

pi=fikfkp_i = \frac{f_i}{\sum_k f_k}

Optionally, each offspring mutates to a uniformly chosen strategy with probability μ\mu.


Unlike the Moran process, which replaces one individual at a time, the Wright–Fisher process replaces the entire population simultaneously. This makes it the natural model for organisms with discrete, synchronised generations (annual plants, insects, some microbes). The biological origins of this process, and of the Moran process, are discussed in The Biological Origins of Evolutionary Game Theory.

Example: One Generation of the Wright–Fisher Process

For the citation game at state (vT,vP)=(3,1)(v_T, v_P) = (3, 1) with N=4N=4 and β=1\beta = 1 (using exponential fitness fi=eβπif_i = e^{\beta \pi_i}):

fT=e6/3=e27.39fP=e3/3=e12.72f_T = e^{6/3} = e^2 \approx 7.39 \qquad f_P = e^{3/3} = e^1 \approx 2.72

The probability that a randomly sampled offspring cites TT is:

pT=7.397.39+2.720.731p_T = \frac{7.39}{7.39 + 2.72} \approx 0.731

The next generation (vT,vP)(v_T', v_P') follows a Binomial(4, 0.731)(4,\ 0.731) distribution, so for example P(vT=4)0.73140.286P(v_T'=4) \approx 0.731^4 \approx 0.286.

Theorem: Mean-Field Limit


For all four dynamics (imitation, introspection, best-response, and Wright–Fisher) in the limit of large population size NN \to \infty and weak selection β0\beta \to 0 (with βN\beta N held fixed), the expected change in strategy frequencies converges to the replicator equation Traulsen et al., 2005Hofbauer & Sigmund, 1998:

x˙i=xi(πiπˉ),πˉ=kxkπk\dot{x}_i = x_i(\pi_i - \bar{\pi}), \qquad \bar{\pi} = \sum_k x_k \pi_k

This result explains why replicator dynamics occupies a central place in evolutionary game theory: it is the universal mean-field limit shared by all these distinct microscopic update rules. Differences between dynamics matter most in small populations or at high selection intensity.

Exercises

Programming

The ludics library represents an evolutionary game as a finite-population Markov chain and computes fixation probabilities and stationary distributions exactly. It implements the Moran process, Fermi imitation, and introspection dynamics directly, and its transition-matrix builder accepts a custom update rule, which lets us add the Wright–Fisher process as well.

Setting up the citation game

We work with the citation coordination game on a population of N=4N = 4 students. A state records each individual’s strategy (0 for textbook, 1 for preprint), and the fitness of an individual is its average payoff against the rest of the population.

import numpy as np
import ludics

payoff_matrix = np.array([[3, 0], [1, 2]])  # citation game: T = 0, P = 1


def citation_fitness(state, payoff_matrix, **kwargs):
    """Average payoff of each individual against all others."""
    number_of_individuals = len(state)
    return np.array([
        np.mean([
            payoff_matrix[state[individual], state[other]]
            for other in range(number_of_individuals)
            if other != individual
        ])
        for individual in range(number_of_individuals)
    ])


state_space = ludics.get_state_space(N=4, k=2)
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:8: SyntaxWarning: "\i" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\i"? A raw string is also an option.
  We have a state v \in S = [$v_1$, .... $v_n$] as the set of types of individuals in the population, so that $v_i$ is the type of individual i. |S| = $k^N$
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:52: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
  $\frac{\sum_{v_i = u_{i*}}{f(v_i)}}{\sum_{v_i}f(v_i)}$
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:85: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
  returns $\phi(a_i, a_j) = \frac{1}{1 + \exp({\frac{f(a_{i}) - f(a_{j})
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:121: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
  $\sum_{a_j=b_{i^*}}^N\frac{1}{N(N-1)}\phi(f_i(a) - f(a_j))$
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:177: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
  $\frac{1}{N}\frac{\sum_{a_{j} = b_{I(\textbf{a}, \textbf{b})}}f_j(\textbf{a})}{\sum_{k}f_k(\textbf{a})}\phi(\Delta(f_{I(\textbf{a,b})}))$
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:234: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
  $\frac{1}{N(m_j - 1)}\phi(f_i(a) - f_i(b))$
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:300: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
  will choose the higher fitness strategy in $\phi$
/home/runner/work/gtb/gtb/.venv/lib/python3.14/site-packages/ludics/main.py:784: SyntaxWarning: "\m" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\m"? A raw string is also an option.
  strategies) array where $\mu_{ik}$ gives the probability of player $i$

Building each dynamic as a Markov chain

Moran, Fermi imitation, and introspection are built in. Wright–Fisher is not, but because each of the NN offspring of a generation is drawn independently in proportion to parental fitness, its transition probability factorises as a product over offspring, and generate_transition_matrix accepts it as a custom rule.

def wright_fisher_transition_probability(
    source, target, fitness_function, selection_intensity, **kwargs
):
    """Wright–Fisher: each offspring is sampled independently, in proportion
    to parental fitness (non-overlapping generations)."""
    fitness = 1 + selection_intensity * fitness_function(source, **kwargs)
    total_fitness = fitness.sum()
    probability = 1.0
    for offspring_type in target:
        probability *= fitness[source == offspring_type].sum() / total_fitness
    return probability


moran = ludics.generate_transition_matrix(
    state_space, citation_fitness, ludics.compute_moran_transition_probability,
    selection_intensity=1.0, payoff_matrix=payoff_matrix,
)
fermi = ludics.generate_transition_matrix(
    state_space, citation_fitness, ludics.compute_fermi_transition_probability,
    choice_intensity=1.0, payoff_matrix=payoff_matrix,
)
wright_fisher = ludics.generate_transition_matrix(
    state_space, citation_fitness, wright_fisher_transition_probability,
    selection_intensity=1.0, payoff_matrix=payoff_matrix,
)
introspection = ludics.generate_transition_matrix(
    state_space, citation_fitness,
    ludics.compute_introspection_transition_probability,
    choice_intensity=1.0, number_of_strategies=2, payoff_matrix=payoff_matrix,
)

Does the update rule matter?

The three absorbing dynamics, Moran, Fermi imitation, and Wright–Fisher, each end in fixation: every individual ends up citing either the textbook or the preprint. We read off the probability that a single preprint adopter eventually takes over, and it differs from one rule to the next, which is the central message of this chapter.

single_adopter = next(i for i, s in enumerate(state_space) if s.sum() == 1)
all_preprint = next(i for i, s in enumerate(state_space) if s.sum() == 4)

for name, matrix in [("Moran", moran), ("Fermi imitation", fermi),
                     ("Wright-Fisher", wright_fisher)]:
    absorption = ludics.get_absorption_probabilities(matrix, state_space)
    pairs = np.array(absorption[single_adopter]).reshape(-1, 2)
    fixation = next(p for index, p in pairs if int(index) == all_preprint)
    print(f"{name}: fixation probability of one preprint adopter = {fixation:.4f}")
Moran: fixation probability of one preprint adopter = 0.2342
Fermi imitation: fixation probability of one preprint adopter = 0.1656
Wright-Fisher: fixation probability of one preprint adopter = 0.1729

Introspection dynamics, by contrast, is ergodic: it never fixes but visits every state indefinitely, so the natural summary is its stationary distribution.

stationary = ludics.compute_steady_state(introspection)
print(
    "Introspection: stationary probability of all-preprint =",
    round(float(stationary[all_preprint]), 4),
)
Introspection: stationary probability of all-preprint = 0.2857

Notable Research

The Fermi imitation rule used in this chapter was proposed and analysed by Traulsen et al., 2006, who showed that pairwise comparison dynamics reduces to the replicator equation in the large-population, weak-selection limit. This paper is foundational to the study of evolutionary dynamics in finite populations under social learning.

Introspection dynamics is a more recent addition to this family, introduced by Couto et al., 2022. Unlike imitation, introspection does not require observing a specific partner’s outcome, only reasoning about what would happen under an alternative strategy. This distinction becomes particularly important in asymmetric games and has applications to human behavioural experiments where direct comparison is not always possible.

Best-response dynamics has roots in the economic learning literature, tracing back to Gilboa & Matsui, 1991. Its relationship to replicator dynamics and its convergence properties in potential games are thoroughly analysed in Hofbauer & Sigmund, 1998.

The Wright–Fisher process predates the Moran process in the biological literature, originating in the foundational work of Fisher Fisher, 1930 and Wright Wright, 1931 on genetic drift. The key result that both processes converge to replicator dynamics in the large-population limit was established in Traulsen et al., 2005.

Conclusion

This chapter surveyed four update rules (imitation, introspection, best-response, and Wright–Fisher) as alternatives to the Moran process and replicator dynamics covered in preceding chapters. Together they form a landscape of evolutionary and learning models that share a common mean-field limit (the replicator equation) but differ in their finite-population and high-selection behaviour.

The choice of update rule is not merely a mathematical convention. It reflects an assumption about how real agents (biological organisms, humans, firms) actually change their behaviour: by copying successful peers, by rational introspection, by best-responding to the current environment, or through generational turnover. Understanding when these assumptions differ in their predictions is essential for applying evolutionary game theory to empirical settings.

Table 1 summarises the key concepts.

Table 1:Summary of learning and evolutionary dynamics

DynamicUpdate mechanismFinite population?Mean-field limit
ReplicatorContinuous frequency change proportional to relative payoffNo (infinite)n/a (is the limit)
MoranBirth proportional to fitness; death uniformYesReplicator
ImitationFermi pairwise copying with selection intensity β\betaYesReplicator
IntrospectionCounterfactual switching via Fermi ruleYesReplicator
Best-responseDeterministic switch to highest-payoff strategyNo (or β\beta\to\infty)Replicator
Wright–FisherMultinomial sampling proportional to fitness per generationYesReplicator


Solutions

References
  1. Gilboa, I., & Matsui, A. (1991). Social stability and equilibrium. Econometrica, 59(3), 859–867.
  2. Traulsen, A., Claussen, J. C., & Hauert, C. (2005). Coevolutionary dynamics: from finite to infinite populations. Physical Review Letters, 95(23), 238701.
  3. Hofbauer, J., & Sigmund, K. (1998). Evolutionary Games and Population Dynamics. Cambridge University Press.
  4. Traulsen, A., Nowak, M. A., & Pacheco, J. M. (2006). Pairwise comparison and selection temperature in evolutionary game dynamics. Journal of Theoretical Biology, 246(3), 522–529.
  5. Couto, M. C., Giaimo, S., & Hilbe, C. (2022). Introspection dynamics: a simple model of counterfactual learning in asymmetric games. New Journal of Physics, 24(6), 063033.
  6. Fisher, R. A. (1930). The Genetical Theory of Natural Selection. Clarendon Press.
  7. Wright, S. (1931). Evolution in Mendelian populations. Genetics, 16(2), 97–159.