Evolutionary Game Theory Simulator

Interactive simulation of evolutionary game dynamics with spatial structure, mutation, and selection

Population Distribution
Strategy Frequency
Average Fitness

Replicator Dynamics

The replicator equation describes how strategy frequencies change in a population: dx_i/dt = x_i(f_i - phi), where f_i is the fitness of strategy i and phi is the average population fitness. Strategies with above-average fitness grow, while those below average decline. This deterministic framework, introduced by Taylor and Jonker (1978), connects evolutionary game theory with dynamical systems. Fixed points of the replicator equation correspond to Nash equilibria, and evolutionarily stable strategies (ESS) are asymptotically stable fixed points.

Mutation-Selection Balance

Adding mutation (rate mu) to replicator dynamics prevents strategies from going extinct. The replicator-mutator equation: dx_i/dt = sum_j x_j Q_ji f_j - x_i phi, where Q_ji is the probability of mutating from strategy j to i. At equilibrium, selection (favoring high-fitness strategies) and mutation (randomly introducing all strategies) balance. Increasing mu maintains diversity; decreasing mu allows fixation. The critical mutation rate where behavior changes qualitatively is a bifurcation point, analogous to phase transitions in physics.

Phase Transitions in Evolution

Evolutionary games exhibit phase transitions as parameters change. In Prisoner's Dilemma on a lattice (Nowak & May, 1992), cooperation persists only within a narrow range of payoff parameter b (roughly 1 < b < 2). Below b=1, cooperation dominates; above b=2, defection takes over. The transition resembles percolation in statistical physics. Similarly, varying selection strength omega reveals a transition from neutral drift (omega -> 0, random) to strong selection (omega -> infinity, deterministic). Near the critical point, small parameter changes produce dramatically different evolutionary outcomes.

Spatial Evolutionary Games (Nowak & May)

In 1992, Nowak and May showed that spatial structure fundamentally changes evolutionary outcomes. On a 2D lattice, each cell plays against its 8 neighbors (Moore neighborhood). Cells update by comparing their total payoff with a random neighbor, imitating the neighbor with probability given by the Fermi function: P = 1/(1 + exp(-omega * (f_neighbor - f_self))). This simple rule generates remarkably complex spatial patterns. Cooperators form clusters that protect each other from invasion by defectors at the boundary. The spatial structure provides 'network reciprocity' where cooperators interact predominantly with other cooperators, boosting their effective fitness.

Network Reciprocity

Nowak (2006) identified five mechanisms for the evolution of cooperation: kin selection, direct reciprocity, indirect reciprocity, network reciprocity, and group selection. Network reciprocity works because spatial structure creates positive assortment where cooperators are more likely to interact with cooperators than expected by chance. The benefit-to-cost ratio must exceed the average number of neighbors (k) for cooperation to evolve: b/c > k. On a square lattice with 8 neighbors, cooperation is favored when the benefit-to-cost ratio exceeds 8, a much weaker condition than in well-mixed populations where cooperation never evolves under standard Prisoner's Dilemma.

Emergence of Cooperation

The fundamental puzzle: why does cooperation exist when defectors always have higher individual payoff? Spatial structure provides one answer. Cooperators on a lattice form clusters where interior members receive high payoffs from mutual cooperation, compensating for losses at cluster boundaries. These clusters can grow, shrink, or reach dynamic equilibrium. The resulting spatial patterns (fractal-like structures, chaotic dynamics, or stable coexistence) depend on the game parameters. Key insight: individual-level selection favors defection, but group-level selection (between clusters) favors cooperation. Spatial structure enables this multi-level selection.

Biology

Evolutionary game theory explains biological phenomena from bacteria to humans. Bacteria produce public goods (biofilms, siderophores) at individual cost; spatial structure on surfaces maintains cooperation. Side-blotched lizards exhibit rock-paper-scissors dynamics: orange, blue, and yellow males cycle in frequency. Cleaner wrasse fish face Prisoner's Dilemmas: clean parasites or bite nutritious mucus. Virus evolution follows game-theoretic principles. Cancer can be modeled as defection (over-proliferation) in a cooperative cellular society.

Economics

In economics, evolutionary game theory models bounded rationality and learning. Firms imitate successful competitors rather than perfectly optimizing. Market entry games, technology adoption, and pricing wars all exhibit replicator-like dynamics. The Santa Fe Artificial Stock Market showed that simple trading rules generate complex market dynamics. Behavioral economics reveals humans use heuristics (tit-for-tat, imitation) rather than Nash equilibrium strategies, making evolutionary models more realistic for predicting economic behavior.

Social Norms and Culture

Social norms evolve through mechanisms parallel to biological evolution: more successful norms are imitated more often. Voting behavior, fashion trends, and language change all follow replicator dynamics. Norms emerge from decentralized imitation and selection without conscious design. Spatial structure matters: norms spread through social networks with local clusters of conformity and boundaries of competition. The Green-Beard effect explains ethnocentrism: individuals preferentially cooperate with those sharing visible markers (language, dress, customs), creating in-group cooperation without genetic relatedness.