Concepts · 3 min read

The Prisoner's Dilemma: Game Theory Basics With a Payoff Table

The Prisoner's Dilemma: Game Theory Basics With a Payoff Table — illustration
In short: Each prisoner does better by betraying whatever the other does, yet both betraying (2 and 2 years) is worse than both staying silent (1 and 1 year).

The payoff table (years in prison)

Other stays silentOther betrays
You stay silent1, 13, 0
You betray0, 32, 2

Lower is better. Each cell shows (your years, their years).

Best responses

If the other stays silent (C), your best reply is betray (0 year beats 1). If the other betrays (D), your best reply is betray (2 years beats 3). Betraying is best either way: a dominant strategy.

Nash equilibrium

When both players betray, neither can improve by changing alone. That stable outcome (2, 2) is the Nash equilibrium, even though (1, 1) would be better for both.

Why it matters

The same structure appears whenever individual incentives conflict with a shared benefit. Repeated games, reputation and enforcement can make cooperation rational. Compare with probability puzzles like Monty Hall.

What changes when the game repeats

In a single round betrayal is the dominant strategy. If the same two players meet many times, they can reward or punish each other, and cooperation can become sensible. A well-known strategy is tit-for-tat: stay silent in the first round, then copy whatever the other player did last time.

The table below simulates 10 rounds using the same payoffs as above (years in prison, so lower is better). Each row shows the total years for each player.

Player 1 strategyPlayer 2 strategyPlayer 1 total yearsPlayer 2 total years
Tit-for-tatTit-for-tat1010
Always betrayAlways betray2020
Tit-for-tatAlways betray2118
Always silentAlways betray300
Always silentAlways silent1010

Two tit-for-tat players cooperate every round and serve 10 years each, while two permanent betrayers serve 20 years each. Against a permanent betrayer, tit-for-tat loses only the first round and then matches.

How to find an equilibrium in any payoff table

  • For each opponent choice, find your best reply (underline it).
  • Do the same for the other player.
  • Any cell where both players have an underlined reply is a Nash equilibrium.
  • Check whether a dominant strategy exists: a reply that is best against every opponent choice.

A game can have one equilibrium, several, or (in pure strategies) none. The prisoner’s dilemma has exactly one, and it is not the best outcome for the group, which is the point of the example.

Where the structure shows up

The same pattern appears whenever each side gains by defecting but all lose if everyone does. Common textbook examples are firms undercutting each other on price, neighbours over-using a shared resource, and countries deciding whether to limit emissions. Real situations are messier, with communication, repetition and enforcement, so the model is a thinking tool rather than a prediction.

Common misunderstandings

  • "Betraying is always right." Only in a one-shot game with these payoffs.
  • "Players are irrational." Each is individually rational; the problem is the incentive structure.
  • "Cooperation needs trust." It can also come from repetition, reputation or rules that change the payoffs.

Probability also guides decisions under uncertainty. See probability rules and the Monty Hall problem for related reasoning.

Frequently asked questions

Is the dilemma realistic?

It is a simplified model. Real situations involve repetition, communication and enforcement that can change the outcome.

What is a dominant strategy?

One that is best for you no matter what the other player does.

What is tit-for-tat?

A strategy for repeated games: cooperate first, then copy the other player’s previous move.

Is there always a Nash equilibrium?

Every finite game has at least one, but it may require mixed strategies where players randomise.

Written and reviewed by Mateuss M.

Mateuss M. writes and reviews mathematical content for CalcSolver, focusing on online calculators, formulas, equations, and practical math tools. He reviews calculator functionality, calculation methods, formulas, examples, and explanations to help ensure that each tool is clear, useful, and easy to understand.

Keep reading