Game Theory · Prisoner’s dilemma

The prisoner’s dilemma game, explained for kids

Should you share or keep? It’s the most famous puzzle in game theory, and the best way to understand it is to play it. Try ten rounds against a mystery partner, then run the computer tournament that surprised the world in 1980.

Quick answer

The prisoner’s dilemma is a game where two players each choose to share (cooperate) or keep (not cooperate). Whatever your partner does, keeping gets you more points. But if you both keep, you both end up worse off than if you had both shared. It shows how choices that look smart for one person can be bad for everyone, and why, when you play again and again, being nice but not a pushover usually wins.

How the game works

Two players choose at the same time, without talking. Here are the points, the same ones scientist Robert Axelrod used in his famous tournament:

Partner shares 🤝Partner keeps ✊
You share 🤝You 3, partner 3You 0, partner 5
You keep ✊You 5, partner 0You 1, partner 1

Look at it alone…

If your partner shares, keeping gets you 5 instead of 3. If your partner keeps, keeping gets you 1 instead of 0. Either way, keeping scores you more.

…then look at it together

If you both follow that logic, you both get 1. If you had both shared, you’d both have 3. The “smart” choice for each makes both worse off. That’s the dilemma.

Play it: share or keep?

Your partner follows one secret rule. Some always share, some never do, and some copy you. Watch what happens to your score, then run a whole tournament.

Part 1 · Play

Ten rounds with a mystery partner

Each round you both choose at the same time. Both share: 3 points each. Both keep: 1 each. If one keeps while the other shares, the keeper gets 5 and the sharer gets 0. Your partner follows one secret rule. Can you work it out?

You

0

Round

1 of 10

Partner

0

··
··
··
··
··
··
··
··
··
··

Top row you, bottom row partner. 🤝 share · ✊ keep

Part 2 · Run a tournament

Which rule wins? It depends on the crowd

Like Robert Axelrod’s famous computer tournament: every player meets every other player for 200 rounds. Choose who comes, and see who scores the most points per round on average.

Sunny

Always shares, no matter what.

1

Grabby

Always keeps, no matter what.

1

Echo

Shares first, then copies what you did last round. (Tit for Tat)

1

Hedge

Shares until you keep once, then keeps forever. (Grim Trigger)

1

Flip

Shares, keeps, shares, keeps… whatever you do.

1

Patience

Only keeps after you keep two rounds in a row. (Tit for Two Tats)

1
🦔 Hedge
2.60
🦜 Echo
2.50
🔁 Flip
2.31
🐢 Patience
2.30
🦀 Grabby
2.22
🌞 Sunny
2.10

Hedge wins this crowd. Rules that share first but hit back after a keep do well here, because they team up with each other and can’t be pushed around. No rule wins in every crowd.

The tournament that surprised everyone

In 1980, political scientist Robert Axelrod invited experts to send in computer programs that would play the prisoner’s dilemma against each other. 14 programs were sent in, and each pair played 200 rounds.

The winner was the simplest program of all, Tit for Tat, sent by Anatol Rapoport: share in the first round, then copy whatever the other player did last. Axelrod ran a second tournament with 62 entries, and everyone knew Tit for Tat had won. It won again.

Here’s the strange part: Tit for Tat never beats anyone in a single match. At best it ties. It wins the tournament by getting lots of points with other nice players and by not being pushed around by mean ones. Axelrod wrote about it in his 1984 book The Evolution of Cooperation.

Later scientists found that no rule is best against every crowd. When mistakes happen, a slightly more forgiving rule can do better, and against lots of easy sharers, always keeping wins. You can test that in the tournament above.

Axelrod’s four habits

  • 😊 Nice. Never be the first to keep.
  • 🛡️ Hits back. If they keep, keep back once, so you can’t be pushed around.
  • 🤝 Forgiving. When they share again, share again. No grudges forever.
  • 🔍 Clear. Be easy to read, so others learn sharing with you pays.

Prisoner’s dilemmas in real life

🍋 Two lemonade stands

Each one sells more by cutting its price a little. When both keep cutting, neither makes any money.

⚽ Hogging the ball

Each player looks better by shooting instead of passing. When everyone hogs, the team loses.

🐟 The shared pond

Each family catches a few extra fish. When everyone does, the pond runs out. (This one is called the tragedy of the commons.)

📱 Screen time at a sleepover

Each kid wants one more video. If nobody stops, nobody sleeps, and everyone is grumpy tomorrow.

🦇 Vampire bats

Bats that had a good night share food with hungry roost-mates, and bats tend to share with those that shared with them before.

🧹 Group projects

Each person saves effort by letting others do the work. If everyone does that, the project fails.

The fixes people use are the same ones Axelrod found: play again with the same people, build a reputation, make promises you can check, and agree on rules. That’s why trust and reputation is a whole unit in our grade 4 course.

How to play it in class or at home

  1. 1

    Make cards

    Each player gets two cards: Share and Keep. Or use thumbs up and thumbs down.

  2. 2

    Choose in secret

    Both players pick a card and reveal at the same moment. No talking during the round.

  3. 3

    Score it

    Two Shares: 3 each. Two Keeps: 1 each. One Keep and one Share: 5 for the keeper, 0 for the sharer.

  4. 4

    Play 10 rounds

    Don’t say when the last round is. Knowing the end changes how people play (try it and see!).

  5. 5

    Talk about it

    Who scored the most? Which pair scored the most together? Did anyone change after being “kept” on?

  6. 6

    Try a twist

    Let players talk before each round, or switch partners every round. What changes?

Prisoner’s dilemma practice questions

Eight questions from grade 3 to grade 7. Tap an answer to see if you’re right, and why.

Share or keep: check yourself

8 questions · tap an answer

  1. Question 1 · Grade 3

    You and a partner both choose Share. How many points do you each get?

  2. Question 2 · Grade 3

    Your partner shares. If you keep instead, what happens this round?

  3. Question 3 · Grade 4

    Why is it called a dilemma?

  4. Question 4 · Grade 4

    Echo shares first, then copies your last move. You keep in round 3. What does Echo do in round 4?

  5. Question 5 · Grade 4

    In Robert Axelrod’s 1980 tournament, which program won?

  6. Question 6 · Grade 5

    Which of these is NOT one of the habits Axelrod found in the winning rules?

  7. Question 7 · Grade 6

    Two lemonade stands keep cutting their prices to beat each other, until neither makes money. Why is that like the prisoner’s dilemma?

  8. Question 8 · Grade 7

    In a crowd full of players who always share, which rule scores the most?

Where it fits in the Game Theory course

In grade 3, kids meet share-or-keep as a table game and learn the best-reply trap. In grade 4 they run island tournaments against characters with secret rules (Sunny, Grabby, Echo and friends) and learn why reputation matters. In grade 7 they enter their own rule into a tournament and learn Axelrod’s four habits. See the whole Game Theory for kids course, or try Nash equilibrium and rock, paper, scissors strategy next.

Questions about the prisoner’s dilemma

What is the prisoner’s dilemma in simple words?
Two players each choose to cooperate (share) or not (keep) at the same time. Whatever the other does, not cooperating scores you more. But if both think that way, both end up worse off than if both had cooperated. It shows why doing what’s best for yourself can leave everyone worse off.
Why is it called the prisoner’s dilemma?
The original story is about two suspects questioned in separate rooms, each offered a deal to blame the other. Mathematicians Merrill Flood and Melvin Dresher came up with the game at the RAND Corporation in 1950, and Albert Tucker gave it the prison story and the name. For kids we use points and “share or keep”, which is the same game.
What is the best strategy in the prisoner’s dilemma?
If you only play once, keeping (defecting) always scores you more, which is why it’s a dilemma. If you play many rounds with the same partner, rules that start nice, hit back after a keep and forgive quickly, like Tit for Tat, tend to do very well. Robert Axelrod’s tournaments showed this, but later research found no single rule is best against every crowd.
What age can kids learn the prisoner’s dilemma?
Around grade 3 or 4, once kids can compare points in a small table. Younger kids can play a share-or-keep game with stickers. In iMasterly’s Game Theory course it appears in grade 3 (Share or Keep?) and grade 4 (The Island Tournament).
How do you play the prisoner’s dilemma in a classroom?
Pair students up. Each round, both secretly hold up a card that says Share or Keep, then reveal together. Score 3 each for two Shares, 1 each for two Keeps, and 5 and 0 when one keeps and one shares. Play 10 rounds without saying how many rounds are left, then ask: who scored the most, and which pairs scored the most together?
Is Tit for Tat always the best?
No. It won both of Axelrod’s tournaments under those rules, but its score depends on who else is playing. In a crowd full of easy sharers, always keeping does better, and when mistakes happen, slightly more forgiving rules can beat it. The tournament on this page lets you test that.

Strategy games that teach real thinking

Game Theory for every grade, K–8: take-turn games, tournaments, auctions and fair sharing, with Ms. Emma thinking out loud beside your child.