# Evolving the full strategy space from “Games between Programs”

**URL:** <https://community.wolfram.com/t/evolving-the-full-strategy-space-from-games-between-programs/28293>\
**Category:** Ideas\
**Tags:** physics, graphics-and-visualization, modeling\
**Created:** [October 8, 2026, 5:57pm UTC](https://community.wolfram.com/t/evolving-the-full-strategy-space-from-games-between-programs/28293 "2026-10-08T17:57:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanmcclure](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/seanmcclure/32/46215_2.png) [@seanmcclure](https://community.wolfram.com/u/seanmcclure)\
**Post date:** [October 8, 2026, 5:57pm UTC](https://community.wolfram.com/t/evolving-the-full-strategy-space-from-games-between-programs/28293/1 "2026-10-08T17:57:22Z")

</div>

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](https://github.com/sean-mcclure/evolving-wolfram-ipd)  
Write-up: [Dynamics Don't Restore a Universal Rule | Micro-Paper](https://sean-mcclure.com/micropapers/evolving_wolfram_ipd.html)

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?

 ![tweet5_cycle](https://global.discourse-cdn.com/wolfram/original/3X/3/2/32d4e7f5928d3acb5fd24a2804374f432d4a51d5.png)

 ![tweet6_rank_vs_survival](https://global.discourse-cdn.com/wolfram/original/3X/e/8/e8e819c796345e88b7f5e733046e19b9d29538ac.png)
