Cooperation Lab: Can Kindness Beat Betrayal?

  • Play twelve rounds against cooperation, betrayal, copying, grudges or other explicit strategies.
  • Choose a tournament roster, change match length and move errors, and inspect every pairing.
  • Replay a seeded result or share its rankings and assumptions in a tournament link or result card.

Being nice sounds sensible until someone gets five points for taking advantage of you. Being nasty sounds profitable until you spend the next hundred rounds surrounded by people who remember it.

ContentBASE Cooperation Lab is an interactive Prisoner’s Dilemma simulator about that tension. Play a short match yourself, then put cooperation, betrayal, retaliation and forgiveness into a repeatable strategy tournament. The company you keep turns out to matter quite a lot.

Cooperation Lab

Play a repeated Prisoner's Dilemma, test cooperation and betrayal, and compare seeded strategy tournaments with clear rules.

Loading Cooperation Lab… Enable JavaScript to experiment.

1. Start With a Temptation

Each round, two players independently choose whether to cooperate or defect. They make their decisions before seeing the other player’s current choice.

  • Both cooperate: each earns 3 points.
  • One defects while the other cooperates: the defector earns 5; the cooperator earns 0.
  • Both defect: each earns 1 point.

Defection gives the higher individual payoff in a single round, whichever action the other player takes. Yet both players receive more from mutual cooperation than from mutual defection. Repeated encounters let a move affect what comes next.

The lab uses these fixed payoffs throughout. It explores an abstract game, not money, criminal sentencing or a recommendation for handling actual people.

Cooperation Lab artwork showing green cooperation and amber defection cards, the four game payoffs and a strategy tournament ranking.

2. Play a Match Before Picking a Favourite

The practice area gives you twelve rounds against a selected strategy. Choose Cooperate or Defect, inspect the outcome and decide what to do next.

Start against Tit for Tat. It cooperates first, then copies your previous actual move. Cooperate together for a while. Then defect once. You will see that the immediate reward and the effect on the next round are different parts of the story.

The opponent never peeks at the button you are about to press. It uses the state left by earlier rounds. If move errors are enabled, the result also tells you when an intended move was flipped.

Choose New practice match to start over. The selected tournament seed and error rate also apply to practice. Your practice choices stay in your browser and are not included in shared tournament links.

3. Meet the Seven Contestants

Each contestant follows a small, explicit rule:

  • Cooperator: always cooperates.
  • Defector: always defects.
  • Tit for Tat: cooperates first, then copies the opponent’s previous actual move.
  • Generous Tit for Tat: follows the same copying rule but has a fixed 10% chance of cooperating after the opponent defects.
  • Grudger: cooperates until the opponent defects once, then defects for the rest of that match.
  • Win–Stay, Lose–Shift: starts with cooperation, repeats its own previous actual move after earning 3 or 5 points, and switches after earning 0 or 1.
  • Random: makes a fresh 50/50 choice each round.

These are fixed scripts. They do not learn your personality, discover clever plans or count backward from the final round. Their simplicity makes it possible to follow why a particular interaction succeeds or unravels.

4. The Winner Depends on Who Else Was Invited

Each ranking now shows the range and sample standard deviation of its paired-repeat mean scores. These describe variation within the selected seeded tournament, not confidence intervals or evidence of a universally best strategy. One paired repeat cannot estimate variation. Tournament calculations yield between small batches so the controls remain responsive.

Select the strategies you want to enter and run a tournament. Every selected strategy meets every selected opponent, including another copy of itself. Each opponent strategy receives equal weight in the final score.

A Friendly Room creates a mostly cooperative group. Invite a Defector adds someone prepared to exploit it. Add Mistakes brings back the full roster with a 5% move error rate.

There is no requirement that one strategy lead in all three situations. A contestant can score well by exploiting an unconditional cooperator and poorly against retaliators. Another can build productive relationships while rarely finishing ahead of the person across the table.

The ranking uses mean points per round, not the number of head-to-head victories. Getting a smaller share of a large cooperative outcome can be better than winning a string of miserable encounters.

5. Add Mistakes and Watch the Grudges Spread

The move error rate is the probability that an intended action flips. It applies independently to each player on each round. An intended cooperation can become defection, and an intended defection can become cooperation.

Afterwards, both players observe the actual moves, including their own. The lab does not add a second layer of mistaken perception. This distinction matters: the scripts react to what happened, even if it happened by accident.

A single accidental defection can poison a Grudger match permanently. Copying strategies can fall into alternating retaliation. Forgiveness and recovery rules can sometimes help, but they can also give an exploiter more opportunities. Explore the consequences rather than assuming one moral from the start.

At zero errors, Random and Generous Tit for Tat still make random decisions. Paired repeats help average those outcomes; a fixed seed makes the complete experiment repeatable.

6. Inspect the Match Behind the Average

The payoff matrix shows each row strategy’s mean points per round against each column strategy. Select a cell to open that pairing in Follow One Match, or choose the two strategies directly.

The chart follows cumulative points through the first seeded match in that pairing. The C/D chips show each player’s actual moves. A small dot marks a move error.

That trace is one match, not the average of every repeat. It helps explain a mechanism; the matrix summarises the repeated matches. Keeping those two views distinct avoids mistaking an entertaining single sequence for the whole result.

7. What This Tournament Measures

Match length, selected opponents, errors, paired repeats and seed determine the experiment. A paired repeat runs both player positions with fresh deterministic random streams, and every match starts with a clean history.

Scores and cooperation rates average equally across the selected opponent strategies, including self-play. Self-play averages both copies. The bar scale always runs from 0 to 5 points per round, making different tournaments easier to compare.

There is no changing population, reproduction, mutation or evolutionary selection in this version. It does not reproduce Axelrod’s historical tournament, and it does not establish an optimal strategy for every repeated dilemma. Change the game and you can change the conclusion.

8. Share a Tournament Someone Else Can Run

Run tournament uses the visible seed and settings. New seed & run draws a new seed. The presets retain the current seed so changing the environment is easier to inspect.

Copy tournament link preserves the roster, match length, error rate, repeats and seed. Common pairings retain their random streams when unrelated strategies are removed. That gives you a useful way to investigate how a changed roster affects the averages.

You can also preview and save a result card containing the rankings, cooperation rates, payoffs and settings. Include the replay link when sharing a claim that your favourite strategy has finally beaten everybody else.

9. Cooperation Simulator Questions

9.1 Is This The Evolution of Trust?

No. Nicky Case’s The Evolution of Trust is an existing interactive introduction to related ideas. Cooperation Lab is an independent ContentBASE companion with manual play, selectable tournaments, explicit error rules, pairing inspection and replayable results.

9.2 Does Tit for Tat Always Win?

No. Its result depends on the opponents, payoffs, match structure and errors. This lab lets you change some of those conditions and examine what happens.

9.3 Why Include Self-Play?

How a strategy behaves with another copy of itself is part of this tournament’s environment. Both copies make their own decisions and experience independent move errors. The method is stated explicitly so that the average has a clear meaning.

9.4 Does the Tournament Keep Running When I Switch Tabs?

A tournament is calculated immediately when you run it. The results stay available while you use another tab. Practice advances only when you choose a move; there is no background clock secretly choosing for you.

10. Try Another Small Rule With Large Consequences

Cooperation Lab is one of the experiments in ContentBASE Tools. Explore another chain reaction in Traffic Jam Lab, challenge your probability intuition in One-in-a-Million Lab, or put a lifetime of repeated risks into the ContentBASE Life Simulator.


Citations

  1. Axelrod, R. and Hamilton, W. D. (1981). The Evolution of Cooperation. Science 211(4489), 1390–1396. Research context for repeated Prisoner's Dilemmas; this tool does not reproduce the historical tournament or evolutionary model. (Axelrod and Hamilton: The Evolution of Cooperation)
  2. Nowak, M. and Sigmund, K. (1993). A strategy of win-stay, lose-shift that outperforms tit-for-tat in the Prisoner's Dilemma game. Nature 364, 56–58. Research context for the named strategy, in a different evolutionary setting. (Nowak and Sigmund: Win–Stay, Lose–Shift)
  3. Nicky Case's existing interactive explanation of cooperation and trust. Listed as a related work, not a source of copied code, artwork or a claim that the original disappeared. (Nicky Case: The Evolution of Trust)
Cindy, ContentBASE creator assistant

MEET CINDY

Your ContentBASE creator assistant

Cindy helps creators find Canva templates, content ideas, and simple ways to make better social media posts faster.

Want ready-to-use templates? Claim the free Canva bundles or browse the full bundle store.