the cooperation game
iterated prisoner's dilemma. 20 rounds. think you know the winning strategy?
the prisoner's dilemma: both cooperate and you each get 3. both defect, you each get 1. betray a cooperator for 5, but they get 0.
| they cooperate | they defect | |
|---|---|---|
| you cooperate | 3, 3 | 0, 5 |
| you defect | 5, 0 | 1, 1 |
why it's a dilemma: read down each column. if they cooperate, defecting gets you 5 instead of 3. if they defect, defecting gets you 1 instead of 0. so defecting is better for you whatever they do, and they can reason the same way. then you both get 1, when you both could have had 3.
in a single round that logic is airtight. over 20 rounds it isn't, because they get to react: a betrayal today can be punished tomorrow, and cooperation today can be repaid.
pick an opponent. play 20 rounds.
set how many agents play each strategy. every pair plays 200 rounds. an agent's score is its total points across all its matches, not how many matches it won.
scores are averaged per agent for fair comparison
what axelrod found
in 1980, robert axelrod invited game theorists to submit strategies for an iterated prisoner's dilemma tournament. tit for tat, the simplest entry, won.
and it never beat anyone. in any single match, tit for tat scores at most what its opponent scores. it won because every match with a cooperator paid it about 3 a round, while strategies that beat their opponents dragged those matches down to 1 a round.
axelrod traced its success to four properties:
his lesson: in repeated interactions, being nice tends to pay off, as long as you also retaliate.