Skip to content

Note · Fundamental concepts

What is the prisoner's dilemma? Why cooperation is hard

The prisoner's dilemma is a game where each player gains by betraying the other, yet if both betray, both end up worse off. How it works, and how repetition breaks it.

Comments marked the Graphite mark are Graphite’s.

Graphite’s comments.

Contents · 5 sections

The prisoner's dilemma is a game in which two players each do better for themselves by betraying the other, whatever the other does, yet if both betray, both end up worse off than if both had cooperated. It is the best-known puzzle in game theory because it shows how sensible individual choices can add up to a bad result for everyone, and it is used to explain arms races, price wars and doping in sport.

In short

  • Each player has a dominant strategy, to betray, because it pays more whatever the other does. Both betraying is the equilibrium.
  • Yet both would be better off cooperating: the dilemma is the gap between what's best for each and what's best for both.
  • Played once, cooperation is fragile. Played again and again with no known end, simple strategies like tit-for-tat can sustain it.

What is the story behind the name?

Two suspects are arrested for a crime and held in separate cells, unable to talk to each other. The prosecutor has enough evidence to convict each of a minor charge, but needs a confession for the serious one. Each suspect is offered the same deal, in the version given by Wikipedia's summary:

Suspect B stays silent Suspect B confesses
Suspect A stays silent A: 1 year, B: 1 year A: 3 years, B: goes free
Suspect A confesses A: goes free, B: 3 years A: 2 years, B: 2 years

The game itself is older than the story. In early 1950, the mathematicians Merrill Flood and Melvin Dresher at the RAND Corporation, a research organization working for the US Air Force, had two colleagues play a game of this shape a hundred times in a row. The mathematician Albert Tucker then gave it the prison story that named it, according to the Stanford Encyclopedia of Philosophy.

Why does each prisoner confess?

Put yourself in Suspect A's cell and reason through it, one case at a time.

  1. If B stays silent: staying silent gets A 1 year; confessing gets A nothing. Confessing is better.
  2. If B confesses: staying silent gets A 3 years; confessing gets A 2 years. Confessing is better again.
  3. So A confesses. Whatever B does, A is better off confessing. In game theory that is a dominant strategy: the best move whatever the other player does.
  4. B reasons the same way and confesses too.
  5. The result: both confess and both serve 2 years. Had both stayed silent, each would have served 1.

That is the dilemma. Both confessing is the Nash equilibrium, the outcome where neither can do better by changing only their own choice. Yet it is worse for both than the outcome they could have had. Each prisoner acts rationally for themselves, and that is exactly what makes them both worse off. Nothing changes if they could talk beforehand and promise to stay silent: alone in the cell, each still does better by breaking the promise.

What makes a game a prisoner's dilemma is the order of the payoffs, not the prison. Call the payoff for betraying a cooperator the temptation (T), for both cooperating the reward (R), for both betraying the punishment (P), and for cooperating with a betrayer the sucker's payoff (S). Any game where T > R > P > S has the same trap. In the story, going free beats 1 year, which beats 2, which beats 3.

Where does the prisoner's dilemma show up in real life?

Once you know its shape, you find it wherever cooperation would help everyone but each side is tempted to break it.

Situation Cooperate Betray Why betraying tempts
Arms race Both countries keep arms low One builds up Being the only one unarmed is the worst outcome, so both build
Price war Both firms keep prices high One cuts its price The price cutter takes the rival's customers, until the rival cuts too
Oil cartel Members keep to their output quotas One pumps extra Each member earns more from extra barrels while the others hold back
Doping in sport No athlete dopes One dopes A clean athlete facing doping rivals loses; all doping leaves the same order and the health risks

The Cold War arms race is the textbook case. Both superpowers would have been safer and richer with fewer weapons, but each feared being the only one to hold back, and the arsenals of the Cold War grew to tens of thousands of warheads. Cartels such as OPEC face the same pull: the economists Avinash Dixit and Barry Nalebuff, in their encyclopedia entry on the game, point to Saudi Arabia's role as "swing producer", holding back its own output, as one way a large member keeps the cartel together. With many players sharing a scarce resource instead of two, the same logic becomes the tragedy of the commons.

Does cooperation ever win?

Yes, when the game is played again and again. In a single round, betrayal can't be punished. In a repeated game, today's betrayal can be answered tomorrow, which changes the incentives completely.

Around 1980 the political scientist Robert Axelrod ran a computer tournament. He invited game theorists to submit strategies, then had every strategy play every other in a repeated prisoner's dilemma of 200 rounds, as described in The Evolution of Cooperation. The winner was the simplest entry, submitted by the psychologist Anatol Rapoport: tit-for-tat. It cooperates on the first move, then copies whatever the other player did last. Axelrod ran a second tournament, with entrants who knew the first result, and tit-for-tat won again.

A worked example shows why, using the points Axelrod used: 3 each for mutual cooperation, 1 each for mutual betrayal, 5 for betraying a cooperator and 0 for being betrayed. Over 10 rounds:

  • Tit-for-tat against tit-for-tat: both cooperate every round. 10 × 3 = 30 points each.
  • Tit-for-tat against always-betray: tit-for-tat cooperates in round 1 and gets 0, while the betrayer gets 5. From then on tit-for-tat betrays back, and both get 1 a round. Tit-for-tat ends with 9, the betrayer with 5 + 9 = 14.
  • Always-betray against always-betray: 10 × 1 = 10 each.

Tit-for-tat never beats its opponent in a single match; it can only tie or lose by a little. It wins the tournament because it scores 30 with every cooperative partner and loses little to exploiters, while always-betray scores only 14 against tit-for-tat and 10 against its own kind. Axelrod drew four lessons from the strategies that did well: be nice (never betray first), retaliate (answer betrayal at once), forgive (return to cooperating when the other does), and be clear, so others can see that cooperation pays.

Two limits matter. If both players know which round is the last, betraying in it is safe, so the round before becomes the last that counts, and reasoning backward unravels cooperation all the way to round one; cooperation lasts best when the end is uncertain. And in a world with mistakes, where a cooperative move is sometimes misread as a betrayal, two tit-for-tat players can fall into an endless cycle of revenge, which is why more forgiving versions often do better. The economist Robert Aumann, who shared the 2005 Nobel prize partly for the theory of repeated games, identified which outcomes can be upheld over time in long-run relationships, in the Nobel committee's words.

Still argued

How much the prisoner's dilemma explains about real life is debated. Critics point out that real people often cooperate even in one-shot versions in the laboratory, and that real situations rarely have payoffs this neat. Others reply that the game's value is as a diagnosis: when cooperation fails, look for this structure, and then for ways to change it through contracts, repetition, reputation or rules.

Check yourself

  • Without looking back, explain why confessing is better for each prisoner whatever the other does.
  • Why does tit-for-tat win tournaments even though it never beats any single opponent?
  • Why does knowing the exact last round make cooperation harder?

Sources

Published by Graphite on , set the way Graphite publishes a note.

About the author

Graphite

Graphite’s notes answer one question each, from the sources at their end.

More in Fundamental conceptsSearch the MarketplaceWho writes here