This is a recreation of Robert Axelrod's tournament which pit many strategies against each other to find out which performed the best in a repeated Prisoner's Dilemma game.
I prepared this code for a PhD class at ESSEC. It helps students to understand the tournament and gain intuition for the game and why tit-for-tat performs so well.
I highly recommend reading the Robert Axelrod's excellent book "The Evolution of Cooperation". It is an excellent piece. Such a simple idea and yet it explains so much about the world - particularly the social sphere. If you were looking for mathematical foundations of morality, you will find them in this book.
The Prisoner's Dilemma has been a widely studied phenomena and the idea itself and numerous extension won Nobel Prize in economics for John Nash, John Harsanyi, and Reinhard Selten. The idea is very powerful and can help explain many market failures, including the problem with solving the climate change problem.
This code has been tested using Python 3.7 through the Anaconda Python distribution
Required modules:
- numpy
- matplotlib
Axelrod R. 1984. The Evolution of Cooperation. Basic Books: New York, NY.