← All animations

🀝 The Prisoner's Dilemma

Two suspects, held in separate cells, each offered the same deal: betray your partner and you walk while they take the fall. The maddening twist β€” whatever the other does, betraying always looks better for you, so both rational players defect and both end up worse than if they'd simply cooperated. It's the cleanest model we have for why selfishness can sink everyone. Scroll down to play a round, then watch how cooperation can claw its way back when the game is played again and again.

1. The payoff matrix β€” play one round

Pick the opponent's strategy, then choose Cooperate or Defect. The grid shows your payoff (first number, green) and theirs (second, blue) β€” higher is better. Notice that whatever the opponent does, Defect scores you more. That dominance is why mutual defection is the Nash equilibrium β€” yet mutual cooperation would have left you both richer.

Choose your move
Payoffs: T=5 temptation Β· R=3 reward Β· P=1 punishment Β· S=0 sucker. They satisfy T > R > P > S, which is what makes this a true dilemma.

2. The iterated tournament β€” cooperation strikes back

Now the prisoners meet over and over. Six classic strategies play a full round-robin β€” everyone vs everyone (and a copy of themselves) β€” for the chosen number of rounds, and scores pile up. Watch the bars race, then settle into a ranking. Tit-for-Tat β€” nice (never defects first), retaliatory, and forgiving β€” usually finishes at or near the top: cooperation emerges among self-interested players once the game repeats.

100 rounds Press run

3. Why repetition rewards cooperation

The one-shot game and the repeated game point in opposite directions:

Arms racesBoth nations would be safer disarming, but each fears being the lone "sucker," so both keep building β€” mutual defection.
Price warsTwo firms both profit by holding prices high, yet each is tempted to undercut; both cut, and margins collapse for everyone.
Climate changeEvery country gains if all cut emissions, but each is tempted to free-ride. The "shadow of the future" β€” repeated summits β€” is what keeps cooperation alive.
Doping in sportAthletes are collectively better clean, but each is tempted to cheat for the edge β€” so policing replaces trust to break the dilemma.