What you're seeing
A grid of agents, each playing a simple game — the Prisoner's Dilemma — with its eight immediate neighbors, then copying whichever nearby agent scored highest. Two strategies compete: cooperate and defect. Defecting always earns more against any given partner, so a rational, selfish agent should defect — and if that were the whole story, cooperation would vanish in a generation. Yet it doesn't. Cooperators that find themselves next to other cooperators do well together, and they band into solid clusters whose interiors are safe. Defectors prey on the edges but can't penetrate the core. The result is a living standoff: cooperation neither dies out nor takes over, and the boundaries between the two strategies churn forever in intricate, often fractal, patterns.
The rule
Every generation has two steps, applied to all cells at once.
- Play. Each cell plays the one-shot Prisoner's Dilemma against each of its 8
Moore neighbors and against itself (self-interaction, as in the original model),
adding up a total payoff over those 9 games. The payoffs follow Nowak & May's convention
(reward
R = 1, temptationT = b, suckerS = 0, punishmentP = 0): a cooperator earns1for each partner who cooperates and0for each who defects; a defector earnsbfor each partner who cooperates and0for each who defects, where1 < b < 2is the temptation to defect. - Update. Each cell then adopts the strategy of the highest-scoring cell in its Moore neighborhood, including itself — "imitate the most successful neighbor." The only thing that ever changes a cell's mind is local success. (On a tie the cell keeps its current strategy.)
That's the entire specification. The grid wraps around at the edges (a torus). There is no
memory of past rounds, no reputation, no notion of fairness — just a payoff and a copy rule.
The one control knob is the temptation b: nudge it and the whole character of the
world changes.
Why it matters
The evolution of cooperation is one of the deepest puzzles in biology and social science. Natural selection rewards whatever out-reproduces its rivals, and in a one-shot Prisoner's Dilemma that is always defection — so the living world ought to be a war of all against all. Yet cooperation is everywhere, from genes to cells to societies. Nowak & May (1992) showed that spatial structure alone is enough to rescue it: when agents play only with their neighbors and imitate local winners, cooperators survive — and even thrive — with no kinship, no memory, and no reputation required. Clusters of cooperators protect their own interiors from invading defectors; the geometry does the work that morality is usually credited with. The paper is a landmark of evolutionary game theory and made the abstract idea of cooperation viscerally visual.
It also rhymes with another entry in this Atlas. In spatial rock-paper-scissors, no single species can win because each is eaten by another in a cycle, and space lets all three coexist as rotating spirals. Here, no single strategy wins either — but for a different reason: cooperators win locally by clumping, defectors win locally at the borders, and the lattice holds them in permanent tension. Both are cases of the same lesson: putting a game on a grid can change its outcome entirely. Compare it too with the voter model, where neighbors imitate each other with no payoff at all and the grid eventually fixates on one opinion; add a game to the imitation and fixation gives way to endless coexistence.
In the wild
This is the mechanism evolutionary biologists call network (or spatial) reciprocity — one of several routes by which cooperation can evolve, alongside kin selection, direct and indirect reciprocity, and group selection (Nowak 2006). The spatial idea shows up wherever cooperators and cheaters are physically clustered rather than well-mixed:
- Microbial mats and biofilms. Bacteria that secrete shared "public goods" (enzymes, iron-scavenging molecules) can be exploited by non-producing cheaters; spatial structure lets producer clusters keep the benefits local and persist.
- Tumors. Cancer cells can be modeled as players in spatial games, with cooperating and "free-riding" cell types whose mix depends on the tissue geometry.
- Ecosystems and societies. The broader study of how cooperation evolves — from cleaner fish to human institutions — repeatedly finds that limited, local interaction favors cooperators over a global free-for-all.
Be honest about the limits: this is a minimal model, not a complete theory of altruism. It uses a specific deterministic "imitate-the-best" update with self-interaction on a Moore neighborhood, and the exact behavior depends on those choices. Network reciprocity is one mechanism among several, and real cooperation usually involves memory, reputation, and reward — none of which this grid has. What the model proves is narrow but striking: space by itself can be enough.
Try this
- Start from the Single defector seed (the default) and watch a single cheater in a sea of cooperators erupt into a symmetric, growing kaleidoscope as defection invades and cooperation fights back — the iconic Nowak–May image.
- Sweep the temptation
b. At low b cooperators easily dominate; push it to b ≈ 1.85 and the world drops into chaotic churn that never settles; raise it higher still and defectors take more and more ground. - Switch to the Random mix seed and lower the cooperator fraction. Watch the readout: whatever you start with, the cooperator fraction tends to settle into a coexistence value strictly between 0% and 100% — neither extinction nor takeover.
References
- Nowak, M. A. & May, R. M. (1992). "Evolutionary games and spatial chaos." Nature 359, 826–829.
- Nowak, M. A. & May, R. M. (1993). "The spatial dilemmas of evolution." International Journal of Bifurcation and Chaos 3(1), 35–78.
- Axelrod, R. (1984). The Evolution of Cooperation. Basic Books.
- Nowak, M. A. (2006). "Five rules for the evolution of cooperation." Science 314, 1560–1563.