Diagrams for evolutionary game dynamics
A faithful, zero-dependency port of William Sandholm's Dynamo Mathematica suite — one engine for the replicator, best-response, logit, BNN, Smith, projection and nine other dynamics, drawn on every shape the original covered: the square, the triangle, the tetrahedron, the prism and the cube. Pick a shape, a game and a dynamic, and watch the population flow.
Original Dynamo by William H. Sandholm, Emin Dokumacı & Francisco Franchetti, University of Wisconsin–Madison. Sandholm (1970–2020) released it freely; this port continues that spirit.
Every game knows its own shape (its strategy and population counts), so choosing a game fixes the geometry. The dynamics, by contrast, are universal — the same vector field runs on every shape.
A sweep across the five shapes and a range of dynamics. Each portrait is computed live in your browser from the same engine that powers the explorer above.
Sandholm's notebooks differ only in geometry — the state always lives on a product of
simplices fixed by dims. Dynamo.js treats them uniformly.
Two populations, two strategies each — a bimatrix game on the unit square. (2×2)
One population, three strategies, on the 2-simplex. (3S)
One population, four strategies, on the 3-simplex. (4S)
Two populations: three strategies versus two — a triangular prism. (3×2)
Three populations, two strategies each — trilinear payoffs on the cube. (2×2×2)
Each is transcribed from Sandholm's notebook and cross-checked against Population Games and Evolutionary Dynamics. F̄ is mean payoff, F̂ = F − F̄ the excess payoff.
| Replicator | ẋⱼ = xⱼ·F̂ⱼ | Strategies grow in proportion to how far their payoff beats the mean. |
| Maynard-Smith | ẋ = (1/F̄)·replicator | Replicator rescaled by mean payoff (needs positive payoffs). |
| Best response | Logit[.001] | Jump toward the current best reply; the sharp limit of logit. |
| Logit[η] | ẋⱼ = softmax(F/η)ⱼ − xⱼ | Perturbed best response; η is the noise level. |
| Imitative logit[η] | xⱼ·e^{Fⱼ/η}/Σ − xⱼ | Logit weighted by current shares. |
| BNN | [F̂ⱼ]₊ − xⱼ·Σ[F̂ₖ]₊ | Brown–von Neumann–Nash excess-payoff dynamic; rests at Nash equilibria. |
| Smith | Σₖ xₖ[Fⱼ−Fₖ]₊ − xⱼΣₖ[Fₖ−Fⱼ]₊ | Pairwise comparison: switch from worse to better at a rate set by the gap. |
| Excess payoff | σ̃ⱼ − xⱼ·Σσ̃ₖ, σ̃=([F̂]₊)² | BNN's form with a squared revision potential. |
| Projection | Π tangent-cone F | Project the payoff onto the simplex tangent cone. |
| Sample BR[k] | E[BR(k samples)] − x | Exact expected best response to a sample of k opponents. |
| Selection–mutation | Mᵀ·diag(x)·F − (x·F)x | Replicator with a mutation matrix M. |