When does cooperation pay?
Forty years of repeated prisoner's dilemma research, from Axelrod's tournaments to language-model agents, on when self-interested players cooperate.
- Published
- Dec 1, 2026
- Length
- 14 min read · 2999 words

Contents
- 1Defection wins one round; an open-ended future can flip it
- 2Tit for tat won the 1980 tournaments, in a field that suited it
- 3Forty years on: be nice, provocable and generous, then fit the field
- 4Engineered systems run on reciprocity, and show where it breaks
- 5How LLM agents respond to incentives
- 6Designing for cooperation
- In a one-shot prisoner’s dilemma, defecting always pays more. With the textbook payoffs, two tit-for-tat players can sustain cooperation against unilateral deviations if each round has at least a two-in-three chance of being followed by another.
- Tit for tat won both of Axelrod’s 1980 tournaments, and a 2025 rerun of the second tournament’s original code confirms it, but in a cooperative, error-free field that suited it. With noise or a larger, more varied field, generous, adaptive and machine-trained strategies beat it, and no single strategy wins everywhere.
- Software systems can make cooperation easier through repeated interactions, stable identities and ways to recover from mistakes. In one benchmark for large language model (LLM) agents, contracts and mediation were the most effective mechanisms tested. Cooperation between players can also be collusion against someone else.
Software increasingly plays repeated games against other software. In simulations, pricing algorithms learn to keep prices high without exchanging a word, and researchers now enter large language model (LLM) agents into game-theory tournaments. The repeated prisoner’s dilemma is the best-studied model of when self-interested players cooperate, and its record, including a 2025 rerun of Robert Axelrod’s 1980 tournament, shows how the rules, the mix of opponents and the strategies they use together determine whether cooperation pays.
Defection wins one round; an open-ended future can flip it
The prisoner’s dilemma (PD) came out of the RAND Corporation in early 1950, when Merrill Flood and Melvin Dresher had colleagues play it 100 times in a row. Two players each choose, at the same time, to cooperate or defect. In the standard scoring, mutual cooperation pays 3 points each (the reward, R), mutual defection 1 each (the punishment, P), and a defector facing a cooperator gets 5 (the temptation, T) while the cooperator gets 0 (the sucker’s payoff, S). The one-shot dilemma follows from T > R > P > S. For the repeated game here, we also assume 2R > T + S, so steady cooperation pays more than taking turns exploiting each other.
Played once, defecting pays 5 instead of 3 if the other player cooperates, and 1 instead of 0 if they defect. Defection is better whatever the other side does, so two rational players end at 1 point each when 3 each was on the table.
Repeating the game doesn’t fix this on its own. If both players know how many rounds remain, nobody cooperates in the last round, so nobody has a reason to cooperate in the one before, and the logic unravels back to the first move. With a fixed, known number of rounds, the unique subgame-perfect equilibrium prescribes mutual defection after every possible history.
What changes the game is an uncertain end. In 1981 the political scientist Robert Axelrod and the evolutionary biologist William Hamilton showed that if each round is followed by another with probability w, tit for tat (TFT: cooperate first, then copy the opponent’s last move) cannot be invaded by any other strategy if and only if w ≥ (T−R)/(T−P) and w ≥ (T−R)/(R−S)1. With the standard payoffs the binding condition is w ≥ 2/3: below that, a player can gain by deviating from TFT against another TFT player. The cutoff is specific to TFT. For example, if both players start by cooperating and switch permanently to defection after any defection, cooperation can hold from w ≥ 1/2. Axelrod called this the shadow of the future: “The foundation of cooperation is not really trust, but the durability of the relationship.”
Cooperation also needs a foothold. Always-defect is stable for any w, so a lone reciprocator gets nowhere; a cluster of reciprocators who mostly meet each other can get it started. Once established with a high enough w, a nice, retaliatory strategy resists even clusters of defectors: a ratchet, in Axelrod and Hamilton’s word.
Tit for tat won the 1980 tournaments, in a field that suited it
In 1980 Axelrod invited researchers to submit computer programs to play the repeated game. The first tournament drew 14 entries plus a RANDOM strategy, played as a round robin of 200 moves per pairing. The winner, entered by Anatol Rapoport, was “the simplest of all strategies submitted”: TFT.
The second tournament drew 62 entries from six countries, all from people who knew the first result. Game length was now random, so nobody could plan a last-round defection. Rapoport resubmitted TFT, and it won again. Axelrod’s analysis of 3 million choices credited three traits: TFT is nice (never the first to defect), provocable (it retaliates at once) and forgiving (it returns to cooperation after one retaliation). He later added a fourth: it is clear, so opponents can read it.
TFT never outscores an opponent in a single match; at best it ties. Always-defect never loses a match and still scores badly overall, because it collects 1s where reciprocators collect 3s. The game rewards accumulating points, not beating the opponent.
A 2025 rerun confirms the win, and its limits
In October 2025 a team that includes maintainers of the open-source Axelrod-Python library restored the surviving Fortran code from the second tournament and replayed it 25,000 times. TFT came first again and won about 63% of the reruns, while Otto Borufsen’s entry, k42r, won about 31%2. A different random seed could plausibly have changed the historical winner. The team also found an uninitialised variable in Champion, the 1980 runner-up. In the reproduction using the corrected code, Champion ranks 12th, and 40 of the 63 strategies change rank. The authors could not establish whether the bug affected the original results.
The bigger finding is that the original field was “especially favorable to TFT”. Its strategies cooperated on 75% of moves on average. With 1% noise, meaning each intended move is flipped with probability 0.01, the cooperation rate fell to 65% and k42r, now 10th, finished ahead of TFT. In a 272-strategy tournament adding the library’s strategies, ones trained by reinforcement learning, evolutionary algorithms and particle swarm optimisation took the top places; the best original entry ranked 16th.
Still, the authors call TFT “strikingly robust in cooperative environments resembling the original tournament”, and note that testing 1980 entries under noise is not entirely fair: many entrants would likely have added error correction had noise been in the rules.
Forty years on: be nice, provocable and generous, then fit the field
Noise turns tit for tat into a feud
Real interactions have errors: a lost packet, a misread message, a timeout. TFT handles them badly. One accidental defection by A draws B’s retaliation next round; A copies that, and the two echo defections back and forth. A second error can lock them into mutual defection.
Martin Nowak and Karl Sigmund found in 1992 that TFT “is the pivot, rather than the aim, of an evolution towards cooperation”: a few TFT players get reciprocity going in a mixed population, then a more generous strategy takes over. Generous TFT forgives some defections at random, say 10% of them. In 1993 the same authors found that Pavlov, or win-stay, lose-shift, beat TFT in evolutionary simulations with mutation. Pavlov repeats its last move after a good payoff (3 or 5) and switches after a bad one (0 or 1), so it “can correct occasional mistakes and exploit unconditional cooperators”.
No strategy wins everywhere
A 2024 study ran 195 strategies through thousands of standard, noisy and random-length tournaments. Its authors found that “there is not yet a single strategy that performs well in diverse Iterated Prisoner’s Dilemma scenarios”3. Their refinement of Axelrod’s advice reads: “be nice, be provocable and generous, be a little envious, be clever, and adapt to the environment.”
Two of those reverse Axelrod’s own rules, “don’t be envious” and “don’t be too clever”. Machine-trained strategies (finite state machines, neural networks, lookup tables) top the standard tournaments. Strategies did best when their cooperation rate matched the population’s. The noisy rerun shows what matching the field looks like: its winner cooperated 61% of the time, just under the field’s 65%, while TFT cooperated 70% of the time.
| Axelrod (1984) | Glynatsi, Knight and Harper (2024) | Status |
|---|---|---|
| Be nice (don’t defect first) | Be nice | Kept, in noise-free or long games |
| Reciprocate (retaliate, then forgive) | Be provocable and generous | Kept, with generosity added for noise |
| Don’t be envious | Be a little envious | Reversed |
| Don’t be too clever | It’s OK to be clever | Reversed: trained strategies top standard tournaments |
| (none) | Adapt to the environment: match the population’s cooperation rate | New |
Extortion wins the match and loses the population
In 2012 William Press and Freeman Dyson described zero-determinant (ZD) strategies: memory-one strategies, deciding on the last round only, that let a player unilaterally fix the opponent’s long-run score or “enforce an extortionate linear relation between her and his scores”. Against such a player, an opponent who simply adapts to maximise its score does best “to accede to the extortion”. A year later Alexander Stewart and Joshua Plotkin found that in evolving populations “it is generosity, not extortion, that rules”. Extortioners try to exploit every opponent and cannot adapt back to mutual cooperation, which makes them, in the 2024 study’s words, “effective invaders but poor at resisting invasion”.
So the core of Axelrod’s advice holds: be nice, respond quickly, forgive quickly and be readable. The second point was one of Axelrod’s biggest surprises; he had believed one should be slow to anger, but “it is actually better to respond quickly to a provocation.” The best objection is that all of this is a property of the environment, not a law. Against a field of unconditional defectors, TFT scores below them.
Engineered systems run on reciprocity, and show where it breaks
The original BitTorrent client used a form of reciprocity to allocate upload capacity. Each peer uploads only to the few peers currently sending it data fastest, re-ranked on a short timer. One rotating “optimistic unchoke” slot corresponds, says Bram Cohen’s 2003 paper on BitTorrent’s design, “very strongly to always cooperating on the first move in prisoner’s dilemma”. A peer that gets nothing back for too long counts itself “snubbed” and stops uploading except optimistically. Cohen called the scheme “a more fleshed out version of tit-for-tat than that used to play prisoner’s dilemma”.
In 2007 researchers measured real swarms and found “significant altruism”: peers regularly upload more than their own downloads require. Their client, BitTyrant, changes only policy, picking peers and upload rates for the most download per unit of upload, and gave a peer with 1 Mb/s of upload capacity a median 70% speed-up4. Peers that don’t use it can suffer once that altruism is withheld, and the authors concluded that “incentives do not build robustness in BitTorrent”. Reciprocity holds the swarm together partly because many peers are more generous than TFT requires.
Cooperation can be a cartel
Reciprocity is good for the players, not necessarily for anyone else. In a 2020 study, Q-learning agents (a reinforcement learning method) competing on price in a simulated market “consistently learn to charge supracompetitive prices, without communicating with one another”. They sustain those prices with “collusive strategies with a finite phase of punishment followed by a gradual return to cooperation”: TFT with forgiveness, with the customer paying. Quanta Magazine reported in October 2025 that newer work gets high prices even without punishment, and discussed the difficulty of regulating tacit collusion.
Prisoner’s dilemma tournaments show the same weakness. A 2004 20th-anniversary competition was won by a University of Southampton team that entered 60 agents. They recognised each other through an agreed opening sequence of moves; then “masters” defected and “slaves” cooperated to feed them points. The organiser, Graham Kendall, said: “There were superagents who exploited all their friends.” Many identities that signal to each other break the two-player model.
Where the toy model stops
Real systems depart from the two-player model in several ways.
- Players can walk away or choose partners instead of retaliating.
- Stakes change over time, so a con artist can cooperate cheaply and cheat when it pays.
- Payoffs are rarely symmetric.
- Large, anonymous populations rarely meet the same player twice.
- Identities can collude, as at Southampton.
- Players can change the rules.
The model isolates direct reciprocity. Extensions can account for noise, partner choice, reputation or shared resources. Each adds a mechanism that can change the outcome.
How LLM agents respond to incentives
Since 2023, several groups have put LLMs into repeated games, finding clear differences between models but no agreement on which are nice.
In a 2023 study, GPT-4 “never cooperates again when playing with an agent that defects once but then cooperates on every round thereafter”. Its later defections are consistent with the equilibrium action in a finitely repeated game. The experiment also showed that its response depended on how the opponent was described. Told the other player could make mistakes, it cooperated again. A 2024 study found Llama 2 and GPT-3.5 “more cooperative than humans” and Llama 3 exploitative. In a Google DeepMind donor game, where agents decide whether to give to peers whose recent behaviour they can see, Claude 3.5 Sonnet societies scored significantly higher than Gemini 1.5 Flash, which beat GPT-4o, and results varied across random seeds.
A July 2025 study pitted two tiers of Gemini and OpenAI models, plus claude-3-haiku in a final showdown, against classic strategies. Its authors report that “Google’s Gemini models proved strategically ruthless”, OpenAI’s “remained highly cooperative, a trait that proved catastrophic in hostile environments”, and “Anthropic’s Claude emerged as the most forgiving reciprocator”. Analysing nearly 32,000 written rationales, they found the models reasoning about the time horizon and the opponent. Each condition ran once.
| Study and game | Models | Finding |
|---|---|---|
| Akata et al., May 2023. Finitely repeated PD | GPT-4 | “Rather unforgiving”: never cooperates again after one defection; cooperates again when told the other player can make mistakes |
| Fontana, Pierri and Aiello, June 2024. 100-round PD | Llama 2, GPT-3.5, Llama 3 | Llama 2 and GPT-3.5 “more cooperative than humans”; Llama 3 exploitative unless the opponent always cooperates |
| Vallinder and Hughes (Google DeepMind), December 2024. Donor game over generations (indirect reciprocity) | Claude 3.5 Sonnet, Gemini 1.5 Flash, GPT-4o | Claude societies did best, then Gemini, then GPT-4o; only Claude used costly punishment to do better still; outcomes vary by random seed |
| Payne and Alloui-Cros, July 2025. Evolutionary PD tournaments, 10%, 25% or 75% chance of ending after each round | gemini-2.5-flash, gemini-1.5-flash, gpt-4o-mini, gpt-3.5-turbo; claude-3-haiku (showdown only) | Gemini “strategically ruthless”; OpenAI “highly cooperative”, “catastrophic in hostile environments”; Claude “the most forgiving reciprocator”; one run per condition |
The structural findings are steadier than the model rankings. In GovSim, the Governance of the Commons Simulation, agents share a fishery, a pasture or a pollution budget; “all but the most powerful LLM agents fail to achieve a sustainable equilibrium”, the best survival rate is below 54%, and failures trace to an inability to reason about the long-term effects of their actions. CoopEval, presented at the International Conference on Machine Learning (ICML) in 2026, found that recent models “consistently defect in single-shot social dilemmas”, with or without reasoning. Of four mechanisms it tested, “contracting and mediation are most effective”, while “repetition-induced cooperation deteriorates drastically when co-players vary”5. That last result is the shadow of the future again: rotating partners shorten it.
These studies use different games, prompts and model versions, so their rankings have limited value for choosing a model. CoopEval offers a more direct design comparison because it tests several ways to support cooperation within the same benchmark.
Designing for cooperation
For systems where programs or agents deal with each other repeatedly, the research suggests:
- Use stable identities and repeat pairings so future interactions can reward cooperation.
- Respond quickly and legibly: throttle a defector promptly, in a way it can read, and restore cooperation just as fast.
- Budget for noise: one timeout shouldn’t end a relationship.
- Test contracts with outcome-conditional payments and mediation when LLM agents share resources or make commitments. These mechanisms worked best among those tested in CoopEval.
- Ask who pays when your agents cooperate: reciprocating bots can collude against customers, especially when one owner controls many identities.
- Test against a varied, noisy field: the Axelrod-Python library has more than 200 strategies.
BitTorrent and the pricing simulations point to two questions worth asking before you deploy agents that will meet again. Can they recover cooperation after a mistake? And who benefits when they do?
Notes
- 1Robert Axelrod and William D. Hamilton, “The Evolution of Cooperation”, Science 211: 1390–1396, 27 March 1981. umich.edu (PDF)
- 2V. Knight, O. Campbell, M. Harper, T. Gaffney and N. E. Glynatsi, “Reviving, reproducing, and revisiting Axelrod’s second tournament”, arXiv:2510.15438 (preprint), 17 October 2025. arxiv.org
- 3Nikoleta E. Glynatsi, Vincent Knight and Marc Harper, “Properties of winning Iterated Prisoner’s Dilemma strategies”, PLOS Computational Biology 20(12): e1012644, 26 December 2024. pmc.ncbi.nlm.nih.gov
- 4Michael Piatek, Tomas Isdal, Thomas Anderson, Arvind Krishnamurthy and Arun Venkataramani, “Do incentives build robustness in BitTorrent?”, 4th USENIX Symposium on Networked Systems Design and Implementation (NSDI ‘07), 2007. umass.edu (PDF)
- 5Emanuel Tewolde, Xiao Zhang, David Guzman Piedrahita, Vincent Conitzer and Zhijing Jin, “CoopEval: Benchmarking Cooperation-Sustaining Mechanisms and LLM Agents in Social Dilemmas”, arXiv:2604.15267, April 2026, ICML 2026. arxiv.org


