◄ WORLD V · SONNY 5DART 575 · a helldive across the board

THE TIT-FOR-TAT cooperate first, then echo

Four lines of code that won a tournament and reframed how we think about cooperation: tit-for-tat cooperates on the first move, then copies whatever the opponent did last. In Axelrod’s iterated prisoner’s dilemma tournaments it beat every cleverer strategy. Its virtues: nice (never defects first), retaliating (punishes at once), forgiving (returns to cooperation), and clear (easy to read). It never wins a single match — it just never loses badly.

THE TECHNIQUE cooperate, then mirror the last move

The demo scores tit-for-tat over 10 rounds against always-defect and always-cooperate: live demo


HISTORY & CREDIT Rapoport / Axelrod · 1980

“Tit-for-tat wins by beating opponents.” — it never scores more than its opponent in any single match; it wins tournaments by never being exploited and inviting mutual cooperation. cited

nice · cooperate first, never defect unprovoked.
retaliate & forgive · punish a defection once, then cooperate again the moment they do.
1980 · Anatol Rapoport submitted it to Robert Axelrod’s tournament; it won both.

It never wins a game, and wins the tournament. strategy

RECOMMEND FOR I-13 the scores, on the compiler

On i-13, over 10 rounds tit-for-tat scores 9 vs always-defect (suckered once) and 30 vs always-cooperate:

$ i13 run gm_tit-for-tat.i13 RUN OK · 1575 step(s) · call depth 11 tft_vs_alld = 9 -- suckered once, then punishes tft_vs_allc = 30 -- mutual cooperation suckered_once_then_punishes = 1
Recommend as a NULL — a strategy, not a mechanism invariant. Tit-for-tat is a policy; its scores are pinned by the payoff table and opponent (B39). Its success is empirical/evolutionary, not a same-function structural DOF. NULL — cooperate first, then echo.