Evolving the full strategy space from “Games between Programs”

In Games between Programs, Stephen Wolfram enumerated every strategy a small finite-state machine can encode for the iterated Prisoner’s Dilemma and ranked them by average payoff against all others. Following a suggestion from Steven Strogatz, I extended this with population dynamics. The strategy spaces are the same (22 distinct 2-state and 956 distinct 3-state machines), but each generation, strategies grow or shrink according to their payoff against the current population, so the field everyone is scored against changes over time.

The code is in Python rather than Wolfram Language: GitHub - sean-mcclure/evolving-wolfram-ipd: Evolutionary extension of Wolfram's "Games between Programs" (2026), as proposed by Steven Strogatz: all finite-state-machine strategies for the iterated Prisoner's Dilemma, now with population dynamics. Replicator and Moran models, noise, mutation, and full parameter sweeps. · GitHub
Write-up: Dynamics Don't Restore a Universal Rule | Micro-Paper

Some results:

  • 2 states, no errors: Grim Trigger dominates, as in the static ranking.
  • 2 states, 1% errors plus mutation: the population never settles. It cycles Tit for Tat → Always Cooperate → Always Defect → Tit for Tat, about every 52 generations. This is the cycle described by Imhof, Fudenberg & Nowak (2005) and Toupo, Rand & Strogatz, here emerging on its own from all 22 strategies.
  • 3 states, no errors: the static top 10 all go extinct, and no single strategy dominates (the largest holds 6.5%). Every survivor never defects first.
  • Finite population (N = 200, 1% errors): Always Defect takes over.

So no rule wins across contexts, which echoes the essay’s conclusion that there’s no choice but to run the competitions and see what happens.

A question for anyone who knows the essay’s setup: I reproduce the counts (22 and 956) by treating machines as identical when they respond the same way to every non-empty opponent history, with every machine opening with C. But my static score for Grim Trigger is −0.909 against the essay’s −0.866. I used payoffs of −1 (both cooperate), −2 (both defect), −3 (sucker) and 0 (temptation). Could anyone share the exact payoff table (it appears only as an image) and say whether the averages include each machine playing itself?