Gallery

The Prisoner's Dilemma

When Rationality Leads to Ruin

The Setup

Two criminals are arrested and held in separate cells. The police offer each a deal: betray your partner (Defect) or stay silent (Cooperate). Neither knows what the other will choose.

Partner Cooperates Partner Defects
You Cooperate -1, -1
Both serve 1 year
-5, 0
You: 5 years, Partner: free
You Defect 0, -5
You: free, Partner: 5 years
-3, -3
Both serve 3 years

The Paradox

Defecting is always the rational choice for each individual. If your partner cooperates, defecting gets you freedom instead of 1 year. If your partner defects, defecting gets you 3 years instead of 5.

But if both defect, both get 3 years—worse than if both had cooperated (1 year each). Individual rationality leads to collective disaster!

Play the Game

Play multiple rounds against different strategies. Points are inverted (higher = better):

Round: 1
👤
You
0
points
🤖
Opponent
0
points
Make your choice...
Game history will appear here...

Strategy Tournament

Run a tournament where each strategy plays against every other strategy for 100 rounds. Click to see which strategy wins!

Click "Run Tournament" to see results...

Famous Strategies

Tit-for-Tat

Start by cooperating, then copy whatever the opponent did last round. Simple, forgiving, and retaliatory. Won Axelrod's famous tournament!

Always Defect

Never cooperate. Maximizes individual gain against naive cooperators, but mutual defection is suboptimal.

Always Cooperate

Always cooperate regardless. Maximizes mutual benefit but is easily exploited by defectors.

Grudger (Grim Trigger)

Cooperate until the opponent defects once, then defect forever. Punishes betrayal harshly but can't forgive mistakes.

Pavlov (Win-Stay, Lose-Switch)

If the outcome was good (CC or DC), repeat your move. If bad (CD or DD), switch. Learns from outcomes.

Random

Flip a coin each round. Unpredictable but doesn't exploit patterns or build cooperation.

Real-World Applications

Arms Races

Nations would be safer if none armed. But each has incentive to arm regardless of what others do. Result: everyone arms, everyone less safe.

Climate Change

All countries benefit from emissions cuts. But each has incentive to free-ride on others' efforts. Result: insufficient action.

Price Wars

Companies could profit more by keeping prices high. But each has incentive to undercut. Result: race to the bottom.

Workplace Politics

Teams work better when everyone shares credit. But individuals have incentive to claim credit. Result: dysfunction.

The Deeper Lesson

The Prisoner's Dilemma reveals a profound truth: individual rationality can lead to collective irrationality. What's best for each person isn't best for everyone.

Solutions require changing the game itself: repeated interaction (building trust), communication, enforceable agreements, or changing incentives. The invisible hand doesn't always work—sometimes it picks everyone's pocket.

Axelrod's Tournament (1980)

Political scientist Robert Axelrod invited game theorists to submit strategies for an iterated Prisoner's Dilemma tournament. The surprise winner?

Tit-for-Tat Won!

The simplest strategy submitted—just 4 lines of code—beat complex strategies from renowned experts. It succeeded by being:

  • Nice: Never defects first
  • Retaliatory: Punishes defection immediately
  • Forgiving: Returns to cooperation after punishment
  • Clear: Opponents can understand and adapt to it

This finding influenced fields from evolutionary biology to international relations. Cooperation can emerge even among self-interested actors—if the game repeats and reputation matters.