Prisoner's dilemma simulator
The prisoner's dilemma is a game where each player scores more by betraying, whatever the other does, yet both score less when both betray. Over many rounds, strategies that cooperate first but punish betrayal tend to come out ahead, and mistakes can change which one wins.
| They cooperate | They betray | |
|---|---|---|
| You cooperate | 3, 3 | 0, 5 |
| You betray | 5, 0 | 1, 1 |
One match
Cooperates BetraysRounds 1–20 of 200; totals count every round
Tournament
Predict first
Worked example
Tit for tat plays 10 rounds against always defect, then 10 rounds against a copy of itself. Scores per round: 5 for betraying a cooperator, 3 each for cooperating, 1 each for both betraying, 0 for being betrayed.
- Round 1: tit for tat cooperates and is betrayed: 0 to 5.
- Rounds 2 to 10: it copies the betrayal, and both score 1 a round.
- Final score: tit for tat 9, always defect 14.
- Against its own copy, both cooperate every round: 30 each.
Tit for tat loses to always defect, 9 to 14, but its friendly match earns it 30: more than always defect took from its win.
Keep learning in short lessons
Interactive lessons, a few minutes each, in the Mochivia app for iPhone.