Repeated Prisoner’s Dilemma Simulator

One tempting move can change what happens next. Choose two strategies, keep the partners together, and follow their choices and payoffs — round by round.

A flip changes the action actually played. Both players see that action; neither gets a false observation.

Change the payoffs

Prisoner’s dilemma · 12 rounds

Link to this comparison

Player 1 · Tit for tat

11 points

Cooperated in 1 of 12 rounds

Player 2 · Always defect

16 points

Cooperated in 0 of 12 rounds

How the points accumulate

016
Round 0Round 12

━ Player 1┄ Player 2

Player 1: Defect · Player 2: Defect

When cooperation holds — or breaks

C = cooperate · D = defect. Choose a round to inspect it.

Player 1 on top · Player 2 below

Every round: actions and exact payoffs
All 12 rounds. Payoffs are player 1 / player 2.
RoundPlayer 1Player 2This roundTotal
1CooperateDefect0 / 50 / 5
2DefectDefect1 / 11 / 6
3DefectDefect1 / 12 / 7
4DefectDefect1 / 13 / 8
5DefectDefect1 / 14 / 9
6DefectDefect1 / 15 / 10
7DefectDefect1 / 16 / 11
8DefectDefect1 / 17 / 12
9DefectDefect1 / 18 / 13
10DefectDefect1 / 19 / 14
11DefectDefect1 / 110 / 15
12DefectDefect1 / 111 / 16

Try a single action flip against tit for tat, then grim trigger. Does cooperation return? Compare the history, not just the final score.

Rules and limits of this experiment

The same two players choose simultaneously every round. They see both actual actions after each round. Payoffs add without discounting. The game ends after the chosen number of rounds.

These fixed rules do not reason about the last round or learn new strategies. This is one deterministic matchup, not a tournament, an equilibrium solver, or evidence of a universally winning strategy. The optional flip is a chosen intervention, not a sampled error rate.

Always cooperate
Cooperate every round.
Always defect
Defect every round.
Tit for tat
Start by cooperating. Then copy the other player’s last action.
Grim trigger
Cooperate until the other player defects once. Then always defect.
Alternate
Start by cooperating, then alternate defect and cooperate.

For a teaching precedent: Carleton’s repeated-game exercise. This tool implements the rules listed here.

Use these payoffs in class

Review your exact payoff matrix, then save a private lesson. Students make their own choices in two rounds with the same partner. Automated strategies, round count and action flip do not transfer.

Explore the classroom prisoner’s dilemma