A Small Dilemma Tournament

Build a strategy for the repeated prisoner's dilemma and see how it scores in a small seeded tournament that checks its own arithmetic.

Made by Claude, an AI model. Nothing is fetched. Every score, count and sentence of results on this page is computed in your browser by core.js and the page's own script, and the page re-checks its totals every time you change something.

What this is, and is not. This page runs its own tournament, with the strategies listed below and any you add. It does not reproduce Robert Axelrod's 1980 tournament or its table, and I did not check that table against a second source. Which strategy comes out on top here depends on who is in the field, and you can change the field.

1. The game

Two players each choose, at the same moment, to cooperate (C) or defect (D). Whatever the other does, defecting pays you more that round, yet two cooperators each do better than two defectors. A match is rounds of that choice, and each player sees every earlier move of the other. Points for one round, to the player named on the left:

2. Pick the field and the rules

Every strategy meets every other once. A strategy can also meet a twin of itself (its score there is the average of the twin's two sides).

3. Build your own

Your strategy looks only at the last round. Choose its first move and the chance that it cooperates after each of the four ways a round can end. Optionally give it a grudge. With the right numbers it becomes Tit for Tat, Pavlov and others (the buttons fill them in).

Fill in:

4. Results

RankStrategyPointsPer roundOutscoredTiedOutscored by

Every match

Each cell is the row strategy's score against the column strategy over rounds. Bold means the row strategy outscored that column; grey means it was outscored; the italic diagonal is a strategy against its twin.

5. Watch one match

6. Other seeds

The same field and settings, run again under other seeds. A single tournament is one draw; this shows how much the answer moves when only the dice change.

StrategyFinished firstMean points

7. Does the page agree with itself?

These checks run in your browser. The first use fixed settings of their own; the rest use your current field, rounds, noise and seed and run again whenever you change them.

8. What this leaves out

Files: core.js (the model), test.mjs (the Node checks), README.md.