Prevolio

Prisoner's Dilemma

Play repeated rounds against classic strategies and watch cooperation pay off — or not.

Understand why rational players defect in a one-shot game, yet cooperation can emerge when the game is repeated.

  • Game theory
  • Nash equilibrium
  • Cooperation vs defection
  • Tit-for-Tat
  • Iterated games

Guided walkthrough

Step 1 of 3
Predict first

With Tit-for-Tat selected, play Cooperate for several rounds.

Before you act, predict what will happen. How does the opponent respond to your cooperation? Then do it — did your prediction match what happened?

Cooperates first, then copies whatever you did last round.

Payoffs shown as you / opponent.
Your moveOpp. CooperateOpp. Defect
You Cooperate3 / 30 / 5
You Defect5 / 01 / 1
Round 0 · You 0 · Opponent 0

Cumulative score

Total points each side has earned as rounds accumulate.

What is the prisoner's dilemma?

The prisoner's dilemma is the most famous problem in game theory: a situation where two players, each acting in their own rational self-interest, end up worse off than if they had cooperated. Each player chooses to cooperate or defect. Whatever the other does, defecting gives a higher personal payoff — so defection is the dominant strategy, and mutual defection is the Nash equilibrium, the outcome from which no one can improve by changing their move alone. The tragedy is that mutual cooperation would have left both better off, yet rational individual choice drives them to the worse outcome. That is why it captures so many real situations — arms races, price wars, overfishing, climate action — where individually sensible choices produce a collectively bad result. The twist comes with repetition. When the game is played over and over, cooperation can emerge, because players can reward and punish each other across rounds. The classic strategy is tit-for-tat: cooperate first, then copy whatever the opponent did last. Being nice, retaliatory, forgiving, and clear, it shows how the shadow of the future can sustain cooperation that a one-shot game destroys.

How the simulation shows it

You play repeated rounds, choosing to cooperate or defect against classic strategies — always-cooperate, always-defect, tit-for-tat, grudger, random — and watch your scores accumulate. Facing tit-for-tat yourself reveals the lesson: defection wins a single round but loses the long game, while cooperation compounds when the other player reciprocates.

Common misconceptions

Frequently asked questions

What is the Nash equilibrium in the prisoner's dilemma?
Mutual defection: given what the other player does, neither can improve by changing their move alone. It's stable, even though mutual cooperation would leave both better off.
Why do rational players defect in a one-shot game?
Because defection is the dominant strategy — it yields a higher payoff whatever the opponent does. Two rational players therefore both defect, reaching the worse outcome for both.
How can cooperation emerge?
Through repetition. When the game is played many times, players can reward cooperation and punish defection across rounds, so cooperating becomes rational — the 'shadow of the future' sustains it.
What is tit-for-tat?
A simple, powerful strategy: cooperate on the first round, then copy whatever your opponent did last. It is nice, retaliatory, forgiving, and clear — and performs remarkably well in repeated games.
Where does the prisoner's dilemma show up in real life?
Anywhere individually rational choices produce a collectively bad result: arms races, price wars, overfishing, doping in sport, and climate-change cooperation among nations.

Related concepts