As an exercise in working with agent based models, I've organized a tournament based on the Prisoner's Dilemma. In each game of the prisoner's dilemma, two "prisoners" have to make a decision to either cooperate with the other prisoner or defect and betray them. When both prisoner's cooperate they receive a moderate reward, but when one prisoner cooperates and the other defects, the cooperating prisoner receives nothing while the defecting prisoner receives a large reward. Finally, if both prisoners defect, they receive a minimal reward.
For this exercise, you will be asked to create your own implementation of a Prisoner to participate in a tournament, where each Prisoner will play everybody else's Prisoner multiple times. You can find a basic definition of the Prisoner class here. I've also written a tournament system to have all Prisoners play the dilemma in class, so make sure you get your Prisoner in before class starts!
To submit your Prisoner, write a class that extends the base_class.py found in the prisoner_classes directory, place it in the prisoner_classes directory, and make a pull request to the linked repo.
Repo again: https://github.com/apan64/Complexity_IPD/blob/master/ipd.ipynb
If you have any questions just shoot me an email!
-Andrew