Explore the Prisoner's Dilemma — payoff matrices, Nash equilibrium, iterated games with Tit-for-Tat, Grim Trigger, Pavlov, and more strategies.
The Prisoner's Dilemma is the most studied model in game theory. Two players independently choose to cooperate (C) or defect (D). Mutual cooperation yields a moderate reward (R) for both, mutual defection yields a low punishment (P), but if one defects while the other cooperates, the defector gets the highest temptation payoff (T) while the cooperator gets the sucker's payoff (S). The dilemma: individually, defection is always rational (it dominates), yet mutual cooperation yields a better outcome for both.
This calculator lets you explore both single-round and iterated versions of the game. In single-round mode, you pick each player's choice and see the payoff. In iterated mode, you assign strategies — Tit-for-Tat, Always Defect, Grim Trigger, Pavlov, Random — and watch them play over many rounds. The round-by-round table shows every move, payoff, and cumulative score, while the output cards summarize Nash equilibrium, cooperation rates, and total scores.
Game theory's insights apply far beyond academic puzzles: international relations (arms races), business (price wars), biology (reciprocal altruism), and technology (protocol design) all involve variants of the Prisoner's Dilemma. This tool makes the abstract logic concrete and explorable.
Game theory is essential in economics, political science, biology, and computer science, and the Prisoner's Dilemma is its most important building block. However, textbooks present payoff matrices statically. This simulator brings them to life — you can watch strategies interact round by round, see cooperation rates evolve, and discover why "nice" strategies like Tit-for-Tat outperform "nasty" ones in the long run.
It is ideal for students learning game theory, instructors building interactive lectures, and professionals exploring strategic interaction in negotiations, auctions, or protocol design.
Payoff matrix: (C,C)→(R,R), (C,D)→(S,T), (D,C)→(T,S), (D,D)→(P,P). Standard PD: T > R > P > S and 2R > T + S. Nash equilibrium of single-round PD: (D,D). Tit-for-Tat: start C, then copy opponent's last move.
Result: P1: 22, P2: 24
TFT cooperates on round 1 (gets S=0), then defects for the remaining 19 rounds (gets P=1 each). Always Defect gets T=5 once, then P=1 for 19 rounds. TFT loses slightly because of the initial exploitation.
The Prisoner's Dilemma was formalized by Merrill Flood and Melvin Dresher at RAND in 1950, and Albert Tucker gave it its name. In 1980, political scientist Robert Axelrod invited game theorists to submit strategies for an iterated PD computer tournament. Anatol Rapoport's simple Tit-for-Tat strategy won both the original tournament and a much larger follow-up. The result was surprising: the winning strategy was the simplest submitted, and it never "won" a single round-pair — it succeeded by fostering cooperation.
In evolutionary biology, the Prisoner's Dilemma models reciprocal altruism. If organisms interact repeatedly, strategies like Tit-for-Tat can evolve and sustain cooperation in populations. This was a key insight of Axelrod and Hamilton's 1981 paper "The Evolution of Cooperation." The Prisoner's Dilemma also models the evolution of virulence in parasites, the maintenance of honest signaling, and the stability of mutualistic relationships.
The N-player Prisoner's Dilemma (also called the Tragedy of the Commons) generalizes the model. Each individual benefits from defecting (free-riding), but if everyone defects, the shared resource collapses. Real-world examples include overfishing, pollution, and vaccine hesitancy. Solving these multi-player dilemmas requires institutional mechanisms: regulation, taxation, reputation systems, or repeated interaction — all of which can be understood through the lens of game theory.
A game where two players each choose to cooperate or defect. Defection is individually rational but mutually harmful, creating a tension between self-interest and collective good.
A set of strategies where no player can gain by unilaterally changing their strategy. In the single-round PD, the Nash equilibrium is (Defect, Defect), even though (Cooperate, Cooperate) is better for both.
A strategy that cooperates on the first round, then copies the opponent's previous move. It won Robert Axelrod's famous iterated PD tournaments in 1980.
It is 'nice' (never defects first), 'retaliatory' (punishes defection immediately), 'forgiving' (returns to cooperation after the opponent does), and 'clear' (easy for opponents to model). Use this as a practical reminder before finalizing the result.
A strategy that cooperates until the opponent defects even once, then defects forever. It is a strong deterrent but unforgiving — one mistake ruins cooperation permanently.
Arms races (countries cooperate by disarming or defect by arming), price wars (firms cooperate by keeping prices high or defect by cutting prices), and climate agreements (nations cooperate to reduce emissions or defect to maximize economic output). Keep this note short and outcome-focused for reuse.