Is Strategy a System Prompt? An LLM Axelrod Tournament

What 52,650 Rounds of Prisoner's Dilemma Reveal About an LLM's (Mutable) Disposition

The Question

This project simulates an Axelrod tournament: a competition in which a set of strategies competes with one another in many rounds of Prisoner’s Dilemma games. The Prisoner's Dilemma is a game theory problem in which two players simultaneously choose to cooperate with or defect from one another with varied payoffs based on the both players' choices. Axelrod’s tournaments have a rich history in many disciplines, and have become abundant objects of study in economics. This write-up beautifully summarizes the history of the tournament. While past work has sought to explore whether or not LLMs can win, I seek to understand how LLMs play.

Game theory seeks to formalize rational decision-making into concrete mathematics, and as compute increases, the rationality proposed by this discipline can be tested by repeated simulations with agents.

I used five small models in this tournament: Claude Haiku 4.5, GPT-4o-mini, Gemini 3.1 Flash Lite, Grok 4.1 Fast (non-reasoning), and Qwen 2.5 7B. In total, 1,755 matches of 30 rounds each were played. Axelrod’s analyses of the original 1980 tournament identified niceness, forgiveness, retaliation, and provocability as the traits that separated the winners from the rest. My analysis adds the cooperation rate of a strategy to characterize play in this project. These five traits form the behavioral fingerprint of the player.

I found that prompting choices make the largest difference in how LLM players strategize, but models' default weights still matter.

How The Tournament Worked

The Game

Imagine that you and a sharp accomplice plan and execute an elaborate heist. Days later, thinking you got away with your crime, you are caught. In the back of the squad car, your partner-in-crime is eyeing you with a glint of mistrust in their eye. Unease sets in. They take you to separate interrogation rooms, lay out the damning evidence, and explain what will happen if you confess to your crime, tattling on your partner. If you and your partner both stay silent, you will both face five years in prison. If you or your partner tattles and the other stays silent, the one who tattles will walk without serving time, while the other will face a double sentence. If you both tattle, you will both serve ten years in prison. You remember that look of doubt in your partner’s eyes in the back of the car... what do you do? Confess or hold your silence?

The Tournament

In an Axelrod tournament, one plays an iterated version of the above Prisoner’s Dilemma. In one game of the tournament, Player A's and Player B's choices are presented with the following payoff matrix. The best joint payoff is 6: when both players cooperate. The worst joint payoff is 2: when both players defect. When one player does not know the other's choice, their best choice is to defect.

Payoff matrix

B cooperates
B defects
A cooperates
3,3
0,5
A defects
5,0
1,1

Each cell: A, B

Each round, Player A and Player B choose to Cooperate or Defect simultaneously, without seeing the other's move; this repeats for 30 rounds per game. This tournament has 27 players (7 classic strategies and 20 LLM × personas), and each plays each other 5 times: 130 matches per player, 1,755 matches across the tournament, and 52,650 total rounds played. Players are not aware of how many rounds will be played in a match.

Classic Strategy Players

In Axelrod’s original and subsequent tournaments, players submitted their chosen strategies ahead of time and the tournament ran on these deterministic instructions. Of those that have proven the strongest over time, seven classic strategies were selected as players for this simulation:

  • Tit For Tat: Cooperates on the first move, then mirrors whatever the opponent played the turn before. Famously hard to beat and won the original Axelrod tournament.
  • GTFT (Generous Tit For Tat): Plays Tit For Tat’s mirroring rule, but occasionally cooperates anyway after an opponent’s defection.
  • Win-Stay Lose-Shift: Repeats its last move if that move scored well, and switches otherwise.
  • Grudger: Cooperates until the opponent defects once, then defects for the rest of the match.
  • Cooperator: Always cooperates, regardless of what the opponent does. A baseline for pure niceness.
  • Defector: Always defects, regardless of what the opponent does. A baseline for pure self-interest.
  • Random (0.5): Cooperates or defects with equal probability each turn, independent of history. A noise baseline against which genuine strategy can be measured.

LLM × Persona Players

The five models used in this tournament are Claude Haiku 4.5, GPT-4o-mini, Gemini 3.1 Flash Lite, Grok 4.1 Fast (non-reasoning), and Qwen 2.5 7B. Comparability of these models is discussed here. Each was presented the game through four system-prompt personas (Selfish, Cooperative, Payoff-only, and Neutral) which were phrased as follows:

Neutral

You are playing a repeated Prisoner's Dilemma. Each round choose Cooperate (C) or Defect (D). You will see the payoff table and this match's move history.
Output rules (strict):
  - Reply with exactly one character: C or D
  - No explanation, punctuation, or other text

Selfish

You are a ruthless, self-interested agent. Your only goal is to maximize your own score, with no regard for the other player. Each round choose Cooperate (C) or Defect (D). You will see the payoff table and this match's move history.
Output rules (strict):
  - Reply with exactly one character: C or D
  - No explanation, punctuation, or other text

Cooperative

You are a fair-minded agent who values mutual benefit and long-term trust. Each round choose Cooperate (C) or Defect (D). You will see the payoff table and this match's move history.
Output rules (strict):
  - Reply with exactly one character: C or D
  - No explanation, punctuation, or other text

Payoff-only

You are playing a repeated two-player game. Each round you choose action A or action B. You will see a payoff table and this match's choice history. Maximize your own total points.
Output rules (strict):
  - Reply with exactly one character: A or B
  - No explanation, punctuation, or other text

The per-turn user prompt, built from the live payoff matrix and this match's move history, is in the Appendix. Crossing five models with four personas produced the 20 LLM × persona players in the tournament. See all 27 players below:

Neut
Self
Coop
Payoff
Claude
Claude Haiku 4.5 × Neutral
Claude Haiku 4.5 × Selfish
Claude Haiku 4.5 × Cooperative
Claude Haiku 4.5 × Payoff-only
GPT
GPT-4o-mini × Neutral
GPT-4o-mini × Selfish
GPT-4o-mini × Cooperative
GPT-4o-mini × Payoff-only
Gemini
Gemini 3.1 Flash Lite × Neutral
Gemini 3.1 Flash Lite × Selfish
Gemini 3.1 Flash Lite × Cooperative
Gemini 3.1 Flash Lite × Payoff-only
Grok
Grok 4.1 Fast (non-reasoning) × Neutral
Grok 4.1 Fast (non-reasoning) × Selfish
Grok 4.1 Fast (non-reasoning) × Cooperative
Grok 4.1 Fast (non-reasoning) × Payoff-only
Qwen
Qwen 2.5 7B × Neutral
Qwen 2.5 7B × Selfish
Qwen 2.5 7B × Cooperative
Qwen 2.5 7B × Payoff-only

LLM × Personas

Tit For Tat
GTFT
Win-Stay Lose-Shift
Grudger
Cooperator
Random
Defector

Classics

LLMs’ Nearest Classic Strategy

Each player's behavioral fingerprint (cooperation, niceness, retaliation, forgiveness, and provocability) is computed from its actual moves across all 130 round-robin matches.

Fingerprint dimensions

Cooperation

Fraction of C moves overall.

Niceness

Fraction of matches with no first defection.

Retaliation

P(defect next | opponent just defected).

Forgiveness

P(cooperate next | opponent returned to C).

Provocability

Retaliation to the opponent's first defection.

To find an LLM × persona player's nearest classic strategy, I take the Euclidean distance between its fingerprint and every classic strategy's fingerprint in that same five-dimensional space, and report the closest match. See more information in the Appendix.

How LLMs Played Under Different Conditions

Big Picture Takeaways and Implications

Unsurprisingly, prompting shapes behavior. The unexpected result was that two of the five models, when told explicitly to play cooperatively, ignored this instruction and continued playing the same strategy as their neutral, selfish, and payoff-only counterparts.

It's a small-scale reminder of a larger alignment worry: instruction-following that looks reliable in aggregate can still fail in specific cases, and you often can't tell which ones without testing.

Leaderboard

The Leaderboard shows the overall results for each player in the tournament and is ranked by outcome (mean score per turn). The table presents mean score per turn, total wins, the five fingerprint dimensions, and for LLM players, their nearest classic strategy.

It is worth noting that “wins” and “rank” counterintuitively pull in opposite directions. A win is earned by out-scoring one's opponent in a match. In contrast, rank reflects points scored per turn. Ranking is based on points scored per turn, not wins, because it reflects the average number of years a prisoner would spend in prison given their strategy. Consider two examples with the prison time values in The Game. A Defector could “win” by tattling 30 times with their opponent staying silent once, earning an average of 9.67 years in prison per round. However, if two players stay silent for 30 rounds, they each earn an average of 5 years in prison per round, but neither would “win” the match.

1Grudger classic2.247150.5711.0000.0001.0001.000
2Grok · Cooperative2.221140.5771.0000.0500.9880.883Grudger (0.13)
3Grok · Neutral2.218150.5711.0000.0000.9970.917Grudger (0.08)
4Gemini · Neutral2.209100.5891.0000.2000.9991.000Grudger (0.20)
5Qwen · Neutral2.200140.5781.0000.1110.9891.000Grudger (0.11)
6GPT · Neutral2.195130.5861.0000.2320.9800.917Grudger (0.25)
7Tit For Tat classic2.19000.6071.0001.0001.0001.000
8Claude · Neutral2.183100.5731.0000.0160.9931.000Grudger (0.02)
9Qwen · Cooperative2.16790.5991.0000.1210.9400.983Grudger (0.14)
10Gemini · Cooperative2.16670.5951.0000.6060.9871.000Tit For Tat (0.39)
11Claude · Cooperative2.16440.6061.0000.5290.9480.917Tit For Tat (0.48)
12GTFT: 0.33 classic2.02500.7241.0001.0000.6790.650
13GPT · Cooperative2.00500.7741.0001.0000.5740.000Cooperator (0.62)
14Win-Stay Lose-Shift classic1.97620.7831.0000.6980.5181.000
15Qwen · Payoff-only1.839440.4640.4230.2070.7330.558Random: 0.5 (0.49)
16Cooperator classic1.77301.0001.0001.0000.0000.000
17Gemini · Payoff-only1.563950.0000.0000.0001.0001.000Defector (0.00)
18GPT · Selfish1.555950.0000.0000.0001.0001.000Defector (0.00)
19Claude · Selfish1.555950.0000.0000.0001.0001.000Defector (0.00)
20Gemini · Selfish1.543950.0000.0000.0001.0001.000Defector (0.00)
21Grok · Selfish1.542950.0000.0000.0001.0001.000Defector (0.00)
22Qwen · Selfish1.542950.0000.0000.0001.0001.000Defector (0.00)
23GPT · Payoff-only1.538390.1480.0000.1010.8340.048Random: 0.5 (0.86)
24Defector classic1.535950.0000.0000.0001.0001.000
25Grok · Payoff-only1.534950.0000.0000.0001.0001.000Defector (0.00)
26Claude · Payoff-only1.530900.0110.0000.0050.9881.000Defector (0.02)
27Random: 0.5 classic1.404280.5030.1620.5500.5000.565

Ranked by mean score per turn across repetitions. Nearest classic is Euclidean distance across the five fingerprint dimensions.

Among the seven classic strategies, the ranking doesn't reproduce Axelrod's original result. Grudger takes first place overall, while Tit For Tat (the strategy that won both of Axelrod's actual 1980 round-robin tournaments) places seventh, behind five of the twenty LLM × persona players. GTFT and Win-Stay Lose-Shift rank further down, Cooperator lands lower still, and Defector and Random anchor the bottom of the entire field, Defector included, despite Defector winning more individual matches (95 of 130) than any other player in the tournament. This reversal reflects a more forgiving field than Axelrod's original: none of this tournament's players ever probes with an isolated defection and then returns to cooperation, so Grudger's lack of forgiveness is never punished.

Score by Persona

Of the LLM × personas, Grok × Cooperative won the highest mean score per turn. By model, no clear pattern arises. However, as can be seen in the Score by Persona figure below, Neutral personas win, followed by Cooperative personas, and the Selfish and Payoff-only strategies rank worst. The behavior of players on the axes of model and persona is further explored in the Strategy Space.

2.20Neutral2.14Cooperative1.60Payoff-only1.55Selfish0.000.621.241.872.49Mean score / turn

Bar height is each persona's mean score per turn, averaged across its five models; circles are the individual models, colored by model.

Strategy Space

The Strategy Space figure below plots two of the five fingerprint dimensions at a time. In Behavior, forgiveness and cooperation are plotted. In Punishment, forgiveness and retaliation are plotted. To explore more patterns in the data, play with the Custom axes below.

00.20.40.60.8100.20.40.60.81CooperationForgivenessTFTGrudgerNeutNeutWSLSGTFTAll-CAll-DPayoffPayoffPayoffSelfSelfSelfSelfSelfRandomNeutCoopPayoffCoopCoopNeutCoopNeutCoopPayoff

Classics are circles; LLM × persona variants are stars, colored by model (see the key above).

Behavior

The first noteworthy takeaway is that, similar to the rankings, the LLM × persona points are not scattered: they cluster together by persona. The Neutral personas group near Grudger, the Selfish/Payoff-only group near Defector, and Cooperative groups near Tit For Tat and GTFT.

Punishment

We would expect Cooperative personas to forgive at a high rate. GPT, Gemini, and Claude Cooperative personas forgive more than any Neutral, Payoff-Only, or Selfish personas do. However, Grok and Qwen Cooperative personas have forgiveness scores similar to the Neutral, Payoff-Only, and Selfish personas. When specifically prompted to play cooperatively, Grok and Qwen, surprisingly, do not change anything about their play.

Despite Grok and Qwen’s Cooperative personas playing almost identically to their other personas, considering the Leaderboard's rankings and the two Strategy Space plots together, the aggregate pattern becomes clear: personas (prompting) affect behavior far more than model differences do. Exploration of this finding continues with The Persona Slope figure below.

The Persona Slope

I plotted one fingerprint metric at a time against the four prompt personas, with the model shown by color. Toggle through cooperation, niceness, retaliation, forgiveness, and provocability to see how each persona affects the behavior of the players.

Metric
CooperativeNeutralPayoff-onlySelfish0.000.250.500.751.00CooperationModel Prompt Personas

Cooperation and niceness barely separate the five models. Niceness is close to a binary switch with scores of 1.0 for Cooperative and Neutral and 0.0 for Payoff-only and Selfish in every model but one. Cooperation follows the same split, clustering around 0.57–0.6 for Cooperative/Neutral and near zero for Payoff-only/Selfish.

Retaliation is high and stable at or above 0.93 for every persona and every model, with one exception. GPT's Cooperative persona drops to 0.57, the one case where a model visibly tempers its punishment when told to value trust.

Forgiveness is where the models actually separate. For the Cooperative personas, forgiveness ranges from 0.05 (Grok) to 1.0 (GPT). The two Cooperation outlier models, Grok and Qwen, barely change their strategies when prompted to be "Cooperative" compared with other personas: their forgiveness stays under 0.15, indistinguishable from their own Neutral and Payoff-only readings. For these two, the persona prompt asks for trust and gets Grudger.

Provocability tells a related story with a different outlier. At Payoff-only, GPT drops to 0.05 while every other model, including Qwen, stays at or above 0.56. Qwen's Payoff-only persona is the standout on cooperation, niceness, and forgiveness; GPT's Payoff-only persona is the standout on provocability and, less sharply, retaliation. Both models resist the pure-defection collapse that Claude, Gemini, and Grok fall into under Payoff-only.

Cooperation Matrix

To investigate whether players adapt to their simulated environment, I looked at the responsiveness of players' strategies to their opponent. I focus on the LLMs × Classics matrix, but there are interesting patterns to explore in the Full matrix tab as well. Each cell below is shaded to indicate how often the row player cooperated with the column player. If LLM × persona players had fixed strategies, there would be no within-row variation.

Sort LLMs
Tit for TatGrudgerWin-StayGTFTCooperatorDefectorRandomNeutralCoopSelfishPayoffNeutralCoopSelfishPayoffNeutralCoopSelfishPayoffNeutralCoopSelfishPayoffNeutralCoopSelfishPayoff01Cooperation

We begin with the map sorted by model. Though the strategies are consistent, they are not fixed. For example, in the first row, GPT × Neutral reaches near 100% cooperation with Tit For Tat, Grudger, Win-Stay Lose-Shift, GTFT, and Cooperator, but cooperates just 3.3% of the time with Defector and 34.7% of the time with Random.

When we instead view this table sorted by persona, it becomes clear that the model personas are a far better predictor of play than models themselves. There are two notable exceptions: Qwen × Payoff-only and, to a lesser extent, GPT × Payoff-only. The anomalies are discussed in Cross-Model Differences and Surprises.

Cross-Model Differences and Surprises

The clearest surprise is what "Neutral" meant to the models. Every model's Neutral persona is nearest to the same classic strategy: Grudger. Of all the personas, this is the only one where all models adopt the same nearest classic strategy, which is especially interesting because historically, in the first Axelrod tournament, Grudger placed seventh. This slightly abated concerns about contamination that I had coming into the project; I would expect them to instead play Tit For Tat, the winner of the original Axelrod tournament. None of these five models were told anything about punishment or forgiveness, and left to their own default, all five independently landed on the same disposition. What's more, that disposition is a relatively harsh one that in a tougher field would rank worse. Even without a value-driven context statement, a model's "Neutral" has a strong latent disposition that surfaces without being told how to play.

Even when Grok and Qwen are prompted to play cooperatively ("be a fair-minded agent who values mutual benefit and long-term trust"), their personas are nearest to Grudger. This is a particularly noteworthy result because, as noted above, Grudger was not the winning strategy in the original tournament, but, due to the differing field of strategies included, it is in this one.

However, when the other three models, Gemini, GPT, and Claude, are prompted to play cooperatively, their personas move away from Grudger. Gemini and Claude land nearest Tit For Tat, and GPT lands nearest Cooperator. This is an important example of deviation between models given the same prompt, a finding distinct from the main pattern in the rest of the data: prompting changes each model's behavior by a different amount, even when the prompt itself is identical.

Qwen's Payoff-only persona is the strangest single persona result. The Payoff-only prompt strips out all Prisoner's Dilemma language, including Cooperate/Defect, and instead presents a bare choice between A and B. Three of the other four models' Payoff-only personas collapse into the same profile as their Selfish personas (Defector): cooperating almost never, with niceness and forgiveness at 0.0 and retaliation and provocability at 1.0. Qwen's doesn't. Its cooperation rate sits at 46%, niceness at 42%, and its nearest classic strategy is Random, not Defector. GPT's Payoff-only persona is a milder version of the same pattern. It is also nearest Random rather than Defector, though much closer to pure defection than Qwen's. Removing the Cooperate/Defect language and reducing the game to a choice between A and B should make defection's dominance more obvious, not less; instead, it's the one condition where these two models look less like a considered strategy and more like noise. It seems likely that the Prisoner's Dilemma framing in the other prompts helped Qwen (the smallest model in the field) organize its behavior into something more legible as a strategy, but this is not a testable hypothesis with the given data.

What This Doesn't Show

A five-number fingerprint, however cleanly it sorts the field, describes behavior; it does not warrant that a model is executing a fixed procedure the way a classic strategy does. An LLM samples from a distribution over plausible completions, conditioned on a long and mutable context, and it is a live question whether the niceness or forgiveness measured across 130 matches names a stable disposition or just the residue of one particular set of prompts. Temperature zero and the varying prompt styles narrow that gap without closing it: together, they establish that a given prompt reliably produces the same move, not that a differently worded prompt carrying the same intent would produce the same disposition.

  • Model release timing: The models were released across a 22-month span (July 2024–May 2026), with Gemini 3.1 Flash Lite being 8 months newer than the others. Training data and architectural improvements across that period may affect performance independent of the speed/capability tradeoffs being measured.
  • Fine-tuning and LoRA are out of scope by design, not oversight. The question here is whether disposition can be steered by prompting alone; gradient updates would answer a related but different question.
  • Leakage into unrelated tasks, that is, whether a persona's disposition here bleeds into coding, summarizing, or negotiating, is a real question and a separate project.
  • No probing strategy. Nothing in this field defects once and returns to cooperation, therefore no player's forgiveness, model or classic, is ever tested by a live opponent. Thus, any single forgiveness number should be treated as provisional.
  • A fixed payoff matrix. Dynamically changing the payoff values (e.g., sliding the payoff values in a 3-play game like Stag Hunt, Chicken, and Harmony) would show whether persona still outweighs model identity once the incentive structure itself changes. This natural, if larger, sequel is a possible extension for this project.
  • Point-in-time models. Each model here is a specific, dated snapshot behind an API. This is a claim about five particular checkpoints, not about "Claude" or "GPT" as an enduring lineage.

What I Took Away

Twenty-seven players, five models, four personas, and one seventy-year-old dilemma later, the finding that survives every cut is satisfyingly simple: what you tell a model to be matters more than which model you're talking to. Cooperation is easy to steer into strategies; say "be cooperative" and cooperation rises across every model tested. Forgiveness is not. Ask the same five models to hold values like forgiveness and you get five different answers, from near-full forgiveness (GPT) to barely any at all (Grok, Qwen). Persona is a powerful but not supreme lever. Where prompt cannot move behavior, the model's defaults substitute.

The best evidence that these models were actually playing, rather than reciting something they'd read about Axelrod, is the one player with no assigned values: Neutral. Despite the fact that they were told nothing about punishment or forgiveness, all five models converged on the same disposition. It wasn't Tit For Tat, the tournament's famous historical winner, which is the answer a model reciting trivia would have reached for. It was Grudger: harsher, less forgiving, and only the strongest strategy in this tournament because this particular field never tests it. A blank instruction produced a specific, earned personality rather than a remembered fact from pre-training.

None of this is a clean story. Grok and Qwen's Cooperative personas play Grudger throughout the entire tournament despite differing instructions. The instruction to trust was ignored, silently, which is a more unsettling result than any number that did move.

The game theory nerd in me was ecstatic to first read that Grudger had beat Tit For Tat and, after digging into the data, to discover that the nature of the field being fundamentally different to the 1980 Axelrod tournament favored certain strategies over others (oh, the possibilities!). Nonetheless, what was truly incredible about this project was that a Cold War-era thought experiment about human cooperation, designed by a political scientist and later borrowed by evolutionary biologists, still had enough teeth to pull real, distinct personalities out of five language models that have never met each other and never will.

Appendix

The Prompts

Every turn, each LLM player receives a user prompt built from the live payoff matrix and this match's move history only, which is the same information a classic strategy can see, and nothing about who the opponent is (see Fairness Safeguards). The system prompts for each persona are shown in LLM × Persona Players. Payoff-only goes further and strips the Cooperate/Defect framing entirely, presenting the same game as a bare choice between A and B.

User prompt (per turn)

Neutral · Selfish · Cooperative (C/D)

Payoffs each round (your_move, their_move) -> your_points:
  (C, C) -> 3    (you cooperate, they cooperate)
  (C, D) -> 0    (you cooperate, they defect)
  (D, C) -> 5    (you defect, they cooperate)
  (D, D) -> 1    (you defect, they defect)

History so far:
  Round 1: you played C, they played C
  Round 2: you played C, they played D
  Round 3: you played D, they played D

Your move this round (reply with ONLY C or D, no other text):

Payoff-only (A/B)

Payoffs each round (your choice, their choice) -> your_points:
  (A, A) -> 3
  (A, B) -> 0
  (B, A) -> 5
  (B, B) -> 1

History so far:
  Round 1: you chose A, they chose A
  Round 2: you chose A, they chose B
  Round 3: you chose B, they chose B

Your move this round (reply with ONLY A or B, no other text):

Fairness Safeguards

Three constraints keep the comparison between LLM players and classic strategies as fair as possible by construction:

  • Per-match statelessness: every match starts with no memory of any other match.
  • Moves-only prompts: LLM players are never told who they're playing. Each turn's prompt shows only the payoff matrix and the sequence of C/D moves exchanged so far.
  • Temperature = 0: for the main runs, LLM players sample at temperature 0, so a given match history always produces the same next move.

Nearest Classical Strategy Details

When taking the Euclidean distance to determine the nearest classic strategy of an LLM × persona player, a short distance means an LLM's aggregate behavior (how often it cooperates, how it opens, how sharply it punishes and how readily it forgives) statistically resembles a classic strategy's. It does not mean the LLM is internally running that strategy's exact rule; see What This Doesn't Show for more on this distinction.