Tested tool guide
Tested browser tools
Checked August 16, 2026
What prisoners-dilemma-simulator does, with a checked example
Pick two strategies and this tool plays an iterated prisoner's dilemma between them: each round both choose cooperate or defect, and the classic payoffs apply - mutual cooperation earns 3 each, mutual defection earns 1 each, defecting against a cooperator earns 5, and being exploited earns 0. Presets include tit-for-tat, always defect, and random, and tournament mode pits every strategy against every other over a chosen number of rounds. The result that surprises most users: always defect beats tit-for-tat one-on-one, yet loses the tournament, because a one-time 5-point bonus is worth less than many rounds of 3-point cooperation.
Worked example
A concrete input and expected output from the current implementation.
Input
Tit-for-tat vs. Always defect, 10 rounds
->
Expected output
Round 1: cooperate vs. defect (0-5). Rounds 2-10: defect vs. defect (1-1 each round). Final totals: tit-for-tat 9, always defect 14.
Tit-for-tat cooperates on its opening move, so always defect collects the 5-point temptation once; after that tit-for-tat retaliates and both defect for the remaining nine rounds at 1 point per round. The defector wins this match 14-9, which is precisely why the tournament result is different: 14 against this one opponent, but only 1 per round against every other.