A simulation for the Iterated Prisoner's Dilemma that outperforms Tit-For-Tat
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
create_mutants.m
runner.m
simulate_prisoners_dilemma.m

README.md

Better-Than-tit-for-tat

A small piece of matlab code that aims at reproducing the results of Nowak and Sigmund's Nature 1993 paper A strategy of win-stay, lose-shift that outperforms tit-for-tat in the Prisoner's Dilemma game.

The surprising result is that a simple strategy called Pavlov (due to the work of Ivan Pavlov on classical conditioning), fares better population-wise than tit-for-tat, whose success in Axelrod's Tournaments received widespread attention.

The code reproduces the main figure of the paper, which shows Pavlov outperforming tit-for-tat in the long run:

Prisoner's Dilemma with pop size of 100

The Blog Post

I wrote a blog post analyzing the paper. Its 2 main contributions, which end up evolving a strategy that outperforms tit-for-tat reside in

  • Noting that in the real world it is very hard to follow a deterministic strategy. Therefore, it makes more sense to represent strategies as probabilities
  • Demonstrating that it is possible to efficiently simulate large populations and iterations of the Prisoner's Dilemma under these conditions

Of course, check the blog post to see the details.