Introduction

Two partners in crime are arrested and locked in separate cells. The prosecutor offers each the same deal: betray your partner and, if they stay silent, you walk free while they take the heavy sentence. If you both betray, you both get a medium sentence. If you both stay silent, you each get only a light one.

Think it through from one prisoner's seat. Whatever the other does, betraying gives you a better personal outcome — you go free instead of serving light, or serve medium instead of heavy. So the cold, rational move is to defect. But the other prisoner reasons exactly the same way, so you both defect and both land the medium sentence — worse than the light one you'd have shared by trusting each other.

That gap between what's individually smart and what's collectively good is the Prisoner's Dilemma, formalized at the RAND Corporation around 1950 and named by Albert W. Tucker. It is the cleanest picture we have of how rational self-interest can sabotage everyone at once.

Play It

One round of the dilemma is bleak. But what if you play again and again with the same opponent, remembering what they did? Pick a strategy and a rival below, run the rounds, and watch the scores stack up. Lower total years served is better.

<p class="hint">{{hint}}</p>
<div class="picks">
  <label>{{label_you}}
    <select id="me">
      <option value="titfortat">{{opt_titfortat}}</option>
      <option value="alld">{{opt_alld}}</option>
      <option value="allc">{{opt_allc}}</option>
      <option value="grudger">{{opt_grudger}}</option>
    </select>
  </label>
  <label>{{label_opponent}}
    <select id="opp">
      <option value="alld">{{opt_alld}}</option>
      <option value="titfortat">{{opt_titfortat}}</option>
      <option value="allc">{{opt_allc}}</option>
      <option value="grudger">{{opt_grudger}}</option>
    </select>
  </label>
  <label>{{label_rounds}} <input id="rounds" type="number" min="1" max="30" value="10"></label>
</div>
<div class="btns">
  <button id="run" type="button">{{btn_run}}</button>
  <button id="reset" type="button" class="ghost">{{btn_clear}}</button>
</div>
<div class="scores">
  <div class="score"><span class="lbl">{{label_you}}</span><span id="syou">0</span><span class="u">{{unit_yrs}}</span></div>
  <div class="score"><span class="lbl">{{label_opponent}}</span><span id="sopp">0</span><span class="u">{{unit_yrs}}</span></div>
</div>
<div id="log" class="log"></div>
<div class="status" id="status">{{status_initial}}</div>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; }
.hint { font-size: .9rem; color: #444; margin: 0 0 .7rem; line-height: 1.45; }
.picks { display: flex; gap: .8rem; flex-wrap: wrap; margin: .4rem 0 .7rem; }
label { font: 600 13px system-ui, sans-serif; color: #1d3557; display: flex; flex-direction: column; gap: .25rem; }
select, input { font: 500 14px system-ui, sans-serif; padding: .35rem .5rem; border: 1px solid #cdd9e3;
        border-radius: 7px; background: #fff; }
input { width: 80px; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .7rem; }
button { font: 600 14px system-ui, sans-serif; padding: .45rem .9rem; border: 1px solid #1d3557;
         background: #1d3557; color: #fff; border-radius: 8px; cursor: pointer; }
button.ghost { background: #fff; color: #1d3557; }
.scores { display: flex; gap: .8rem; margin: .2rem 0 .6rem; }
.score { flex: 1; background: #e8eef3; border: 1px solid #cdd9e3; border-radius: 8px;
         padding: .5rem .7rem; display: flex; align-items: baseline; gap: .4rem; }
.score .lbl { font: 600 12px system-ui; color: #1d3557; text-transform: uppercase; letter-spacing: .03em; }
.score span:nth-child(2) { font: 800 22px ui-monospace, monospace; color: #c92f3c; margin-left: auto; }
.score .u { font: 500 12px system-ui; color: #687; }
.log { display: flex; flex-direction: column; gap: 3px; margin: .3rem 0; max-height: 200px; overflow: auto; }
.row { display: flex; align-items: center; gap: 6px; font: 600 13px ui-monospace, monospace; }
.row .n { color: #888; width: 26px; }
.tag { padding: 1px 7px; border-radius: 6px; min-width: 30px; text-align: center; }
.C { background: #d6f0df; color: #0a7d33; }
.D { background: #fbd9dd; color: #c92f3c; }
.row .pts { color: #555; margin-left: auto; font-weight: 500; }
.status { font-size: .95rem; font-weight: 600; margin: .5rem 0; min-height: 1.3em; color: #1d3557; }
// Code not found

Try tit-for-tat (cooperate first, then copy your opponent's last move) against the others. It never beats anyone head-to-head, yet it almost never falls far behind — exactly why it won Robert Axelrod's famous 1980 computer tournaments. Then pit always-defect against itself and watch both players sink to the worst stable outcome, round after round.

The Real Game Theory

What exactly makes this a dilemma rather than just a sad story?

  • Defection is a dominant strategy. No matter what your opponent picks, defecting scores at least as well for you. So a purely rational player defects every time.
  • Mutual defection is the unique Nash equilibrium. Once both defect, neither can do better by unilaterally switching — yet the result is worse for both than mutual cooperation. The equilibrium is Pareto-inferior: everyone could be made better off, and the logic still won't get them there.
  • Repetition changes everything. In the iterated game, future rounds let you reward and punish. In 1980, political scientist Robert Axelrod ran tournaments where strategies played each other repeatedly. The winner, submitted by Anatol Rapoport, was the four-line tit-for-tat: be nice (cooperate first), be retaliatory (punish defection), be forgiving (return to cooperation), and be clear.
  • But cooperation is fragile. With a known final round, backward induction unravels it: defect on the last round, so defect on the second-to-last, and so on back to the start. Cooperation needs an open or uncertain horizon to survive.

The punchline: cooperation is not guaranteed by intelligence. It has to be engineered — through repetition, reputation, and the shadow of a future you can't see the end of.

Where It Matters

Once you see the payoff structure — temptation to betray, punishment for mutual betrayal — you spot it everywhere:

  • Arms races and the Cold War: each side gains by arming whatever the other does, so both over-arm and both end up less safe and poorer.
  • Climate and the commons: every nation is better off polluting while others cut back, which is exactly why binding, repeated agreements are so hard and so necessary.
  • Business and pricing: two firms both want to cut prices to grab share, and both bleed margins — a price war is a dilemma played for money.
  • Everyday trust: tipping, online reviews, doping in sport, and keeping promises all sit on the same knife-edge between short-term gain and long-term cooperation.

The repeated game also teaches the cure: stable cooperation comes from reciprocity — strategies like tit-for-tat that reward trust and punish betrayal. The same reasoning underlies competitive equilibria across game theory.

Conclusion

The Prisoner's Dilemma is unsettling because the trap is built from pure logic: each player does the smart thing, and together they walk into the worst stable outcome. There is no math error to fix — mutual defection really is the equilibrium.

And yet the iterated game offers hope. When the same players meet again and again, simple, generous, retaliatory strategies like tit-for-tat let trust take root and pay off. Cooperation is not the default of rational agents; it is something a future-facing relationship can build. The next time betrayal looks like the obvious move, remember that the people you'll meet tomorrow are watching what you do today — and that is often enough to turn a dilemma into a deal.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/prisoners-dilemma/Content licensed under CC BY-NC 4.0.