Game Theory · Strategy · Cooperation

The Prisoner's
Dilemma

Two players. Two choices — Cooperate or Defect. No communication. The catch: acting in pure self-interest makes both players worse off. It's one of the most studied problems in all of game theory — and it shows up everywhere.

This started as a business school game theory class. The assignment: design a strategy to win a real in-class Prisoner's Dilemma tournament against your classmates. Before submitting, I built this simulation — running every strategy head-to-head to find out which approach actually wins. The results were surprising.

Payoff Matrix — Points per Round

They Cooperate They Defect
You Cooperate +3 / +3
Mutual trust
+0 / +5
You get burned
You Defect +5 / +0
You exploit them
+1 / +1
Mutual punishment

The Game

Why is this a dilemma?

Imagine two suspects in separate rooms. Each must choose: stay silent (Cooperate) or betray the other (Defect). They can't communicate. The cruel logic: no matter what the other person does, defecting always gives you a higher individual payoff. So both rational players defect — and both end up worse off than if they'd cooperated.

This is the trap. Individual rationality produces collective irrationality. It's called a Nash Equilibrium — neither player can improve their outcome by changing their choice alone, yet the outcome is terrible for both.

But what happens when you play many rounds and can remember what your opponent did? That's the iterated game — and it changes everything. Reputation, reciprocity, and punishment become possible. Cooperation can emerge even among purely self-interested players.

🧩

The Nash Trap

Defecting is the "dominant strategy" — better for you regardless of what they do. Yet mutual defection (+1/+1) is worse than mutual cooperation (+3/+3).

🔁

The Iterated Game

Play it repeatedly and memory changes the math. A player who punishes betrayal and rewards cooperation can enforce mutual trust over time.

🏛️

Axelrod's Tournament

In 1980, Robert Axelrod ran a real computer tournament. The winner — submitted by a game theorist — was the simplest strategy entered: Tit for Tat.

🌍

Everywhere You Look

Arms races. Climate negotiations. Price wars. Splitting the bill. The Prisoner's Dilemma describes the structure of most of the world's hardest cooperation problems.


Interactive

Play Against a Strategy

Pick your opponent, then choose Cooperate or Defect each round. Play 10 rounds and see who comes out ahead.

You
Human Player
0
points
Opponent
Tit for Tat
0
points

Round 1 of 10

Choose your move below to begin.

Move History


Simulation

Run a Tournament

All strategies compete against each other in a round-robin. Every pair plays the specified number of rounds. The winner is the strategy with the highest cumulative score across all matchups.

Final Standings

Head-to-Head Matrix

Each cell shows your row strategy's score vs. the column strategy. Greener = more points.


Contestants

The Strategies

Nine strategies enter the tournament, each embodying a different philosophy about trust, revenge, and forgiveness.

Cooperative

Always Cooperate

Never defects. The ideal partner — but completely exploitable by anyone who defects.

Aggressive

Always Defect

Never cooperates. Exploits nice players but ends up in mutual defection against everyone else.

Adaptive

Tit for Tat

Starts by cooperating, then copies the opponent's last move exactly. Simple, forgiving, robust — and famously effective in tournaments.

Adaptive

Forgiving TFT

Like Tit for Tat, but has a 10% chance to forgive a defection — helping break cycles of mutual punishment.

Punisher

Grim Trigger

Cooperates until the opponent defects once — then defects forever. Maximum deterrence, zero forgiveness.

Adaptive

Pavlov

Win-stay, lose-shift: if the last round was good (mutual coop or lucky defection), repeat it. If bad, switch. Learns from outcomes.

Adaptive

Soft Majority

Counts the opponent's cooperations vs. defections. Cooperates as long as the opponent has cooperated at least as often as they've defected.

Adaptive

Hard Majority

Like Soft Majority but stricter — defects the moment the opponent's defection count meets or exceeds their cooperation count.

Random

Random

Flips a coin each round — 50/50 cooperate or defect. Unpredictable, impossible to exploit or cooperate with reliably.


The Bigger Picture

Why It Matters

The Prisoner's Dilemma isn't just a game — it's a lens for understanding cooperation and conflict across every domain of life.

Economics & Business

Price wars, trade agreements, salary negotiations — competing firms often end up in mutual defection despite cooperation being better for everyone.

Politics & Diplomacy

Arms races between nations mirror mutual defection. Treaties are attempts to enforce cooperation through repeated interaction and reputation.

Biology & Evolution

Robert Axelrod's famous computer tournaments showed that Tit for Tat — a cooperative, retaliatory strategy — outcompetes purely selfish strategies over time, explaining how altruism can evolve.

Everyday Life

Splitting chores, merging in traffic, returning a favor — human social behavior is full of Prisoner's Dilemmas solved (and unsolved) every day.

Climate Change

Every nation benefits from others reducing emissions while doing nothing themselves. The global climate crisis is a Prisoner's Dilemma at planetary scale.

The Key Insight

When the game is repeated and players have memory, cooperation can be the rational choice. The shadow of the future changes everything.