Skip to content
A research tool for the Iterated Prisoner's Dilemma
Branch: master
Clone or download


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Revert "Remove a strategy to ensure test fails." Apr 15, 2020
axelrod Delete deleteme; uploaded by mistake. Apr 17, 2020
docs Merge pull request #1332 from Axelrod-Python/add-original-gradual-to-… Apr 15, 2020
test_outputs Re write the result set Feb 3, 2018
.editorconfig adds further file types to editorconfig Mar 10, 2015
.gitattributes Letting git merge hypothesis db files Dec 15, 2015
.gitignore Re write the result set Feb 3, 2018
.mailmap Revert "corrects Owen Campbell email address" Oct 15, 2015 Run black code formatter. Oct 29, 2018 Release v4.9.1 Apr 8, 2020
CITATION.rst Add a minor fix to the CITATION.rst Apr 11, 2017
CONTRIBUTING.rst Create contributing.rst Mar 28, 2017
LICENSE.txt Change copyright holders to project team members Jun 4, 2016 Fix broken data file imports. Apr 8, 2020
README.rst Update core contributors list. Apr 8, 2020 Make hyperlink. Apr 8, 2020 Added documentation to the Nov 5, 2019
matplotlibrc isort and add a comment to mplrc Aug 16, 2018 Added some tests Mar 27, 2020
requirements.txt Merge branch 'fix-missing-yml-fil' into move-to-github-actions Apr 8, 2020 Fix some type hints Oct 4, 2019 Run black code formatter. Oct 29, 2018
setup.cfg Add setup.cfg for wheel distribution Sep 9, 2016 Merge branch 'fix-missing-yml-fil' into move-to-github-actions Apr 8, 2020
test Move filename back to and add build_results. Update t… May 8, 2016


Join the chat at



A Python library with the following principles and goals:

  1. Enabling the reproduction of previous Iterated Prisoner's Dilemma research as easily as possible.
  2. Creating the de-facto tool for future Iterated Prisoner's Dilemma research.
  3. Providing as simple a means as possible for anyone to define and contribute new and original Iterated Prisoner's Dilemma strategies.
  4. Emphasizing readability along with an open and welcoming community that is accommodating for developers and researchers of a variety of skill levels.


With Axelrod you:

The library has 100% test coverage and is extensively documented. See the documentation for details and examples of all the features:

An open reproducible framework for the study of the iterated prisoner's dilemma: a peer reviewed paper introducing the library (22 authors).


The library requires Python 3.6 or greater.

The simplest way to install is:

$ pip install axelrod

To install from source:

$ git clone
$ cd Axelrod
$ python install

Quick Start

The following runs a basic tournament:

>>> import axelrod as axl
>>> axl.seed(0)  # Set a seed
>>> players = [s() for s in axl.demo_strategies]  # Create players
>>> tournament = axl.Tournament(players)  # Create a tournament
>>> results =  # Play the tournament
>>> results.ranked_names
['Defector', 'Grudger', 'Tit For Tat', 'Cooperator', 'Random: 0.5']



All contributions are welcome!

You can find helpful instructions about contributing in the documentation:


You can find a list of publications that make use of or cite the library on the citations page.


The library has had many awesome contributions from many great contributors. The Core developers of the project are:

You can’t perform that action at this time.