← Genetics

Evolutionary Game Theory

Gen 0 Hawk  UA
Strategy Frequencies
Trend (last 300 gen)
Payoff Matrix
Game
Value (V) 4
Cost (C) 6
Noise 2%
Speed

Evolutionary Game Theory Simulation

A spatial evolutionary game where thousands of agents interact on a grid, imitating their most successful neighbours. Choose from three classic games: Hawk-Dove (aggression vs. passivity), Prisoner's Dilemma (cooperation vs. defection) and Rock-Paper-Scissors (cyclic dominance). Replicator dynamics drives strategy frequencies toward Nash equilibria and evolutionarily stable strategies (ESS).

What It Demonstrates

The emergence of evolutionarily stable strategies without central coordination. In Hawk-Dove, the ESS is a mixed strategy at p* = V/C hawks. In the Prisoner's Dilemma, spatial structure enables cooperation clusters to resist invasion by defectors. In Rock-Paper-Scissors, cyclic dominance creates rotating spiral waves.

How to Use

Select a game mode, then adjust V (resource value) and C (fight cost) for Hawk-Dove, or Temptation for Prisoner's Dilemma. Watch the payoff matrix and ESS prediction update live. Increase noise to add mutation/exploration. Use 10× speed to fast-forward to steady state.

Did You Know?

John Maynard Smith introduced the hawk-dove game in 1973 to explain why animals often limit aggression even when they could win a fight. The ESS concept revolutionised biology by showing that game-theoretic equilibria — not just fitness maximisation — drive natural selection.

About Evolutionary Game Theory

This simulation runs classic evolutionary games on a 100×62 toroidal grid where each cell holds one strategy. Every generation, a cell sums the payoffs it earns against its eight Moore neighbours, then copies the strategy of whichever neighbour (or itself) achieved the highest local fitness. This deterministic imitate-the-best update is a spatial form of replicator dynamics, pushing strategy frequencies toward Nash equilibria and evolutionarily stable strategies (ESS).

A dropdown selects Hawk-Dove, Prisoner's Dilemma or Rock-Paper-Scissors. For Hawk-Dove you set resource Value (V) and fight Cost (C); for the Prisoner's Dilemma you set the Temptation payoff (T). A Noise slider injects random mutation, and Speed buttons (1× to 10×) fast-forward. The live pie chart, trend graph and payoff matrix mirror real ecology and economics, where stable mixes of behaviours emerge without any central planner.

Frequently Asked Questions

What is evolutionary game theory?

Evolutionary game theory studies how strategies spread through a population by reproduction or imitation rather than by rational choice. Successful strategies are copied more often, so frequencies shift over time. The key target is an evolutionarily stable strategy (ESS): one that, once common, cannot be invaded by any rare alternative.

How does the simulation update each generation?

Each of the 6,200 cells first plays against its eight neighbours and sums the payoffs to get a fitness score. It then scans the same Moore neighbourhood and adopts the strategy of the cell with the highest fitness, including itself. With a small probability set by the Noise slider, a cell instead mutates to a random strategy.

What do the Value and Cost sliders do?

In the Hawk-Dove game, Value (V) is the worth of the contested resource and Cost (C) is the injury suffered when two Hawks fight. Two Hawks split the expected payoff (V−C)/2, a Hawk against a Dove takes the whole V, and two Doves share V/2. Raising C makes aggression riskier and shifts the equilibrium toward Doves.

What is the Hawk-Dove ESS equation?

When the fight cost exceeds the prize (C > V), the stable mix is p* = V/C Hawks and 1−V/C Doves. The simulation prints this prediction live and draws it as a dashed reference line on the trend graph. If V is greater than or equal to C, fighting always pays and the ESS becomes pure Hawk.

Why can cooperation survive in the Prisoner's Dilemma?

In a well-mixed population, Defect always dominates because the Temptation payoff (T) beats mutual cooperation. On a grid, however, cooperators form clusters whose members reap the reward (R = 3) from each other. These clusters resist invasion at their edges, letting cooperation persist as spatial pockets despite being globally dominated.

What does the Rock-Paper-Scissors mode show?

Rock beats Scissors, Paper beats Rock and Scissors beats Paper, each winner scoring +3 and each loser −3. No single strategy is stable, so the system never settles. Instead the three colours chase one another, producing rotating spiral waves around a neutral equilibrium of roughly 33.3% each.

What does the Noise slider represent?

Noise is the per-cell probability of ignoring imitation and switching to a random strategy, modelling mutation or exploration. Set between 0% and 15%, a little noise prevents the grid from freezing into static blocks and helps minority strategies reappear, while too much noise drowns the deterministic dynamics in randomness.

Is this simulation scientifically accurate?

It faithfully reproduces the textbook payoff structures and the Hawk-Dove p* = V/C result, and it captures the qualitative phenomena of spatial cooperation and RPS spiral waves. It is a simplified model, though: it uses synchronous deterministic imitation on a fixed lattice rather than stochastic reproduction, so exact quantitative outcomes can differ from analytic replicator equations.

Who created the Hawk-Dove game?

The biologist John Maynard Smith, with George Price, introduced the Hawk-Dove game and the ESS concept in the early 1970s. Their work explained why animals so often limit aggression in contests over food, mates or territory, showing that equilibrium behaviour, not raw fitness maximisation, shapes natural selection.

What real-world systems does this apply to?

The same logic models animal contests, the evolution of cooperation in microbes and humans, oligopoly pricing, traffic and the maintenance of biodiversity through cyclic competition. Spatial structure mattering for cooperation also informs research on viral evolution, microbial ecology and the design of incentive systems in economics.