A repository with the following goals:
- To enable the reproduction of previous Iterated Prisoner's Dilemma research as easily as possible.
- To produce the de-facto tool for any future Iterated Prisoner's Dilemma research.
- To provide as simple a means as possible for anyone to define and contribute new and original Iterated Prisoner's Dilemma strategies.
Please contribute strategies via pull request (or just get in touch with us).
For an overview of how to use and contribute to this repository, see the documentation: http://axelrod.readthedocs.org/
If you do use this library for your personal research we would love to hear about it: please do add a link at the bottom of this README file (PR's welcome or again, just let us know) :) If there is something that is missing in this library and that you would like implemented so as to be able to carry out a project please open an issue and let us know!
The simplest way to install is:
$ pip install axelrod
Otherwise:
$ git clone https://github.com/Axelrod-Python/Axelrod.git
$ cd Axelrod
$ python setup.py install
The full documentation can be found here: axelrod.readthedocs.org/.
The documentation includes details of how to setup a tournament but here is an example showing how to create a tournament with all stochastic strategies:
import axelrod
strategies = [s() for s in axelrod.ordinary_strategies if s().stochastic]
tournament = axelrod.Tournament(strategies)
results = tournament.play()
The results
object now contains all the results we could need:
print(results.ranked_names)
gives:
['Inverse', 'Forgetful Fool Me Once', 'Nice Average Copier', 'Champion',
'Generous Tit-For-Tat', 'Eatherley', 'ZD-GTFT-2', 'Meta Majority', 'Soft Joss',
'Average Copier', 'Feld', 'Stochastic WSLS', 'Tullock', 'Joss', 'ZD-Extort-2',
'Grofman', 'Random', 'Meta Winner', 'Meta Minority']
A tournament with the full set of strategies from the library can be found at https://github.com/Axelrod-Python/tournament. Here is the latest graphical version of the results:
All contributions are welcome: with a particular emphasis on contributing further strategies.
You can find helpful instructions about contributing in the documentation: http://axelrod.readthedocs.org/en/latest/contributing.html.
- JasYoung314
- Karlos78
- drvinceknight
- geraintpalmer
- hollymarissa
- jomuel
- langner
- marcharper
- martinjc
- meatballs
- theref
- timothyf1
- uglyfruitcake
- pmslavin
If you happen to use this library for anything from a blog post to a research paper please list it here:
- A 2015 pedagogic paper on active learning by drvinceknight published in MSOR Connections: the library is mentioned briefly as a way of demonstrating repeated games.
- A repository with various example tournaments and visualizations of strategies by marcharper.
- Axelrod-Python related blog articles by Uglyfruitcake.