una-dinosauria / better-than-tit-for-tat

A simulation for the Iterated Prisoner's Dilemma that outperforms Tit-For-Tat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A simulation for the Iterated Prisoner's Dilemma that outperforms Tit-For-Tat

License:MIT License


Languages

Language:MATLAB 100.0%