Skip to main content

Reproduce the Axelrod iterated prisoners dilemma tournament

Project description

.. image:: https://badge.waffle.io/Axelrod-Python/Axelrod.svg?label=ready&title=Ready
:target: https://waffle.io/Axelrod-Python/Axelrod

.. image:: https://travis-ci.org/Axelrod-Python/Axelrod.svg?branch=packaging
:target: https://travis-ci.org/Axelrod-Python/Axelrod
|Join the chat at https://gitter.im/Axelrod-Python/Axelrod|

Axelrod
=======

A repository to reproduce Axelrod's iterated prisoner's dilemma.
**Please contribute strategies via pull request (or just get in touch
with me).**

For an overview of how to use and contribute to this repository, see the
documentation: http://axelrod.readthedocs.org/

Results
=======

This repository contains Python (2.7) code that reproduces the
tournament. To run the tournament, you simply need to:

::

$ python run_tournament.py

This automatically outputs a ``png`` file with the results. You can see
the results from the latest run of the tournament here:

.. figure:: ./assets/strategies_boxplot.png
:alt:

As you can see: the 'tit for tat' strategy has not won in this instance,
that is mainly because more strategies are needed to get anywhere near
Axelrod's tournament.

You can see the results from the latest run of the tournament here with
the cheating strategies (which manipulate/read what the opponent does):

.. figure:: ./assets/all_strategies_boxplot.png
:alt:

Please do contribute :)

Note that you can run ``python run_tournament.py -h`` for further
options available: for example, cheating strategies can be excluded for
faster results by running:

::

$ python run_tournament.py --xc --xa

You can also run the tournament in parallel (below will run 4 parallel
processes):

::

$ python run_tournament.py -p 4

You can run with all available CPUs with:

::

$ python run_tournament.py -p 0

Awesome visualisation
---------------------

`martinjc <https://github.com/martinjc>`__ put together a pretty awesome
visualisation of this using d3. Hosted on gh-pages it can be seen here:
`drvinceknight.github.io/Axelrod <http://drvinceknight.github.io/Axelrod/>`__.

Documentation
-------------

There is currently a very sparse set of documentation up here:
`axelrod.readthedocs.org/ <http://axelrod.readthedocs.org/>`__.

To write/render the documenation locally, you will need
`sphinx <http://sphinx-doc.org/>`__:

::

$ pip install sphinx sphinx-autobuild

Once you have sphinx:

::

$ cd docs
$ make html

Contributing
============

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.

.. image:: https://graphs.waffle.io/Axelrod-Python/Axelrod/throughput.svg
:target: https://waffle.io/Axelrod-Python/Axelrod/metrics
:alt: 'Throughput Graph'

Contributors
============

- `JasYoung314 <https://github.com/JasYoung314>`__
- `Karlos78 <https://github.com/Karlos78>`__
- `drvinceknight <https://twitter.com/drvinceknight>`__
- `geraintpalmer <https://github.com/geraintpalmer>`__
- `hollymarissa <https://github.com/hollymarissa>`__
- `jomuel <https://github.com/jomuel>`__
- `langner <https://github.com/langner>`__
- `marcharper <https://github.com/marcharper>`__
- `martinjc <https://github.com/martinjc>`__
- `meatballs <https://github.com/meatballs>`__
- `theref <https://github.com/theref>`__
- `timothyf1 <https://github.com/timothyf1>`__
- `uglyfruitcake <https://github.com/uglyfruitcake>`__
- `pmslavin <https://github.com/pmslavin>`__

.. |Join the chat at https://gitter.im/Axelrod-Python/Axelrod| image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/Axelrod-Python/Axelrod?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

Project details


Release history Release notifications | RSS feed

This version

0.0.6

Download files

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

Source Distribution

Axelrod-0.0.6.tar.gz (55.1 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for Axelrod-0.0.6.tar.gz
Algorithm Hash digest
SHA256 527138e92c774ff17fcd5172a46f2e839de70f5b63e045730ab6e64b0e74af17
MD5 6b09e8cf9530b88cf474866b7f9bacd6
BLAKE2b-256 2376ec9b67fffe007a13220cfffb86849d0f3aa8fa711c234bcc7c41bfdf68ef

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