Evolutionary Game Theory
When an individual’s fitness depends on what everyone else is doing, evolution becomes a game. Instead of climbing a fixed fitness landscape, strategies compete against each other, and the “best” move depends on which moves are currently common.
Payoffs and strategies
A game is specified by a payoff matrix that gives the reward to each strategy when it meets each other strategy. Write for the payoff to a player using strategy against an opponent using strategy . The canonical biological example is the Hawk–Dove game, in which two animals contest a resource of value , and escalated fights cost .
Hawks always escalate; Doves display but retreat if the opponent escalates. Two Hawks fight, split the value, and share the injury cost, for an expected payoff . A Hawk meeting a Dove takes the whole resource, ; the Dove gets nothing. Two Doves share peacefully, each getting .
Evolutionarily stable strategies
An evolutionarily stable strategy (ESS), introduced by Maynard Smith, is a strategy that, once adopted by (almost) the whole population, cannot be invaded by any rare mutant. Formally, strategy is an ESS if for every alternative either its self-payoff is strictly larger, , or the payoffs tie against and does better against the mutant, and . The first condition says is a best reply to itself (a Nash equilibrium); the second breaks ties in favor of the resident.
An ESS is the game-theoretic version of an uninvadable phenotype, and it links directly to the optimum concepts of optimization: it is a fitness peak defined relative to the current population rather than in isolation.
The replicator equation
To see how strategy frequencies actually change, let be the frequency of strategy , with . Its expected payoff is , and the population mean payoff is . The replicator equation says a strategy grows in proportion to how much it beats the average:
Strategies that earn more than the mean increase in frequency; those below the mean decline; and the simplex is preserved because .
ESS and fixed points
The fixed points of the replicator dynamics are exactly the states where every surviving strategy earns the mean payoff, for all with . This connects the two viewpoints: an ESS is an asymptotically stable fixed point of the replicator dynamics, an equilibrium that neighbouring frequency mixtures flow back toward. Checking that stability is the same linear-stability calculation used for any dynamical system in equilibria and stability; like the coupled feedbacks of predator–prey models, the game can also produce cycles or coexistence rather than a single winner.
Worked example: the Hawk–Dove mixed ESS
Assume war is expensive, , so neither pure strategy is stable: a population of all Doves is invaded by Hawks (who take from every Dove), while a population of all Hawks is invaded by Doves (who avoid the ruinous ). Look instead for a mixed ESS: a fraction of Hawks at which Hawk and Dove earn equal payoffs.
The expected payoffs, given a Hawk frequency , are
Setting and simplifying, the and terms cancel to leave , so
The population settles where the fraction of Hawks equals the value-to-cost ratio. Cheap resources or costly fights (small ) yield a mostly peaceful population; valuable resources with mild costs (large ) yield mostly aggression. For and , : two-thirds Hawks is the uninvadable mix.
In code
We integrate the replicator dynamics for the Hawk–Dove game with , and confirm convergence to .
R
library(deSolve)
A <- matrix(c(-0.5, 2, # Hawk-Dove payoffs, V = 2, C = 3
0.0, 1),
nrow = 2, byrow = TRUE)
repl <- function(t, x, p) {
f <- as.vector(A %*% x) # payoff to each strategy
fbar <- sum(x * f) # mean payoff
list(x * (f - fbar))
}
out <- ode(c(H = 0.9, D = 0.1), seq(0, 50, 0.1), repl, parms = NULL)
tail(out, 1) # H -> 0.6667 = V/C, D -> 0.3333
Python
import numpy as np
from scipy.integrate import solve_ivp
A = np.array([[-0.5, 2.0], # Hawk-Dove payoffs, V = 2, C = 3
[ 0.0, 1.0]])
def repl(t, x):
f = A @ x
return x * (f - x @ f) # x_i (f_i - mean payoff)
sol = solve_ivp(repl, (0, 50), [0.9, 0.1], t_eval=[50])
print(sol.y[:, -1]) # -> [0.667, 0.333], Hawk freq = V/C = 2/3
[0.66673614 0.33326386]
Julia
A = [-0.5 2.0; # Hawk-Dove payoffs, V = 2, C = 3
0.0 1.0]
x = [0.9, 0.1]; dt = 0.01
for _ in 1:5000
f = A * x
global x += dt .* (x .* (f .- x'f)) # x'f is the mean payoff
end
println(x) # -> [0.667, 0.333], Hawk freq = V/C = 2/3
Why it matters
Evolutionary game theory reframes natural selection for the common situation where fitness is frequency-dependent: mating systems, foraging and contest behaviour, sex ratios, and microbial public goods. It explains why populations often settle at mixtures rather than a single optimal type, and it supplies the machinery — payoff matrices, the ESS criterion, and the replicator equation — used to analyse the evolution of cooperation and the evolution of virulence.