Skip to main content

Reproduce the Axelrod iterated prisoners dilemma tournament

Project description

https://coveralls.io/repos/Axelrod-Python/Axelrod/badge.svg https://img.shields.io/pypi/v/Axelrod.svg https://travis-ci.org/Axelrod-Python/Axelrod.svg?branch=packaging https://zenodo.org/badge/19509/Axelrod-Python/Axelrod.svg

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

Axelrod

A 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.

Currently the library contains well over 100 strategies and can perform a variety of tournament types (RoundRobin, Noisy, Spatially-distributed, and probabilistically ending) and population dynamics while taking advantage of multi-core processors.

Please contribute 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!

Installation

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

Note that on Ubuntu some users have had problems installing matplotlib. This seems to help with that:

sudo apt-get install libfreetype6-dev
sudo apt-get install libpng12-0-dev

Usage

The full documentation can be found here: axelrod.readthedocs.org/.

The documentation includes details of how to setup a tournament but here is a brief example showing how to get a simple 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']

There is also a notebooks repository which shows further examples of using the library.

Results

A tournament with the full set of strategies from the library can be found at https://github.com/Axelrod-Python/tournament. These results can be easily viewed at http://axelrod-tournament.readthedocs.org.

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

Example notebooks

https://github.com/Axelrod-Python/Axelrod-notebooks contains a set of example Jupyter notebooks.

Projects that use this library

If you happen to use this library for anything from a blog post to a research paper please list it here:

Contributors

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Axelrod-1.10.0.tar.gz (101.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Axelrod-1.10.0-py2.py3-none-any.whl (90.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Axelrod-1.10.0.tar.gz.

File metadata

  • Download URL: Axelrod-1.10.0.tar.gz
  • Upload date:
  • Size: 101.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Axelrod-1.10.0.tar.gz
Algorithm Hash digest
SHA256 579ed552a526874e57620a08c696c9bd00d3be7215f661f7b2a842566d965c1f
MD5 333732956312fea623fc5b763c02d0e6
BLAKE2b-256 980b7290d7a615437f0a3d06dd589d09ba53492aa2af1fb7e891cb8478e20949

See more details on using hashes here.

File details

Details for the file Axelrod-1.10.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Axelrod-1.10.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3b309ab8fa51794efef0f5d57e04130ed2b505a60eaf6327fe4e0b65411606d9
MD5 5e789a00f890d316c6a74194338a3998
BLAKE2b-256 59b8bebca6e22b8a4e0c55757c96cf7fe75a75a37c18b277c3d0b7bc63841be2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page