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

Files

Permalink
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
.prepare-commit-msg.py Run black code formatter. Oct 29, 2018
CHANGES.md 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
MANIFEST.in Fix broken data file imports. Apr 8, 2020
README.rst Update core contributors list. Apr 8, 2020
citations.md Make hyperlink. Apr 8, 2020
doctests.py Added documentation to the doctests.py Nov 5, 2019
matplotlibrc isort test_plot.py and add a comment to mplrc Aug 16, 2018
rebuild_classifier_table.py Added some tests Mar 27, 2020
requirements.txt Merge branch 'fix-missing-yml-fil' into move-to-github-actions Apr 8, 2020
run_mypy.py Fix some type hints Oct 4, 2019
run_strategy_indexer.py Run black code formatter. Oct 29, 2018
setup.cfg Add setup.cfg for wheel distribution Sep 9, 2016
setup.py Merge branch 'fix-missing-yml-fil' into move-to-github-actions Apr 8, 2020
test Move filename back to tournament.play and add build_results. Update t… May 8, 2016

README.rst

Join the chat at https://gitter.im/Axelrod-Python/Axelrod

Axelrod

Goals

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.

Features

With Axelrod you:

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

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

Installation

The library requires Python 3.6 or greater.

The simplest way to install is:

$ pip install axelrod

To install from source:

$ git clone https://github.com/Axelrod-Python/Axelrod.git
$ cd Axelrod
$ python setup.py 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 = tournament.play()  # Play the tournament
>>> results.ranked_names
['Defector', 'Grudger', 'Tit For Tat', 'Cooperator', 'Random: 0.5']

Examples

Contributing

All contributions are welcome!

You can find helpful instructions about contributing in the documentation: http://axelrod.readthedocs.org/en/latest/tutorials/contributing/index.html

Publications

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

Contributors

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.