Reproduce the Axelrod iterated prisoners dilemma tournament
Project description
Axelrod
Goals
A Python library with the following principles and goals:
Enabling the reproduction of previous Iterated Prisoner’s Dilemma research as easily as possible.
Creating the de-facto tool for future Iterated Prisoner’s Dilemma research.
Providing as simple a means as possible for anyone to define and contribute new and original Iterated Prisoner’s Dilemma strategies.
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:
have access to over 200 strategies, including original and classics like Tit For Tat and Win Stay Lose Shift. These are extendable through parametrization and a collection of strategy transformers.
can create head to head matches between pairs of strategies.
can create tournaments over a number of strategies.
can study population dynamics through Moran processes and an infinite population model.
can analyse detailed results of tournaments and matches.
can visualise results of tournaments.
can reproduce a number of contemporary research topics such as fingerprinting of strategies and morality metrics.
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 is tested on Python versions 3.8, 3.9, and 3.10.
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 >>> players = [s() for s in axl.demo_strategies] # Create players >>> tournament = axl.Tournament(players, seed=1) # Create a tournament >>> results = tournament.play() # Play the tournament >>> results.ranked_names ['Defector', 'Grudger', 'Tit For Tat', 'Cooperator', 'Random: 0.5']
Examples
https://github.com/Axelrod-Python/tournament is a tournament pitting all the strategies in the repository against each other. These results can be easily viewed at http://axelrod-tournament.readthedocs.org.
https://github.com/Axelrod-Python/Axelrod-notebooks contains a set of example Jupyter notebooks.
https://github.com/Axelrod-Python/Axelrod-fingerprint contains fingerprints (data and plots) of all strategies in the library.
Contributing
All contributions are welcome!
You can find helpful instructions about contributing in the documentation: https://axelrod.readthedocs.io/en/latest/how-to/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:
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
Built Distribution
File details
Details for the file axelrod-4.13.1.tar.gz
.
File metadata
- Download URL: axelrod-4.13.1.tar.gz
- Upload date:
- Size: 258.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a4f006f6f7929efcc3ea86eede96b5c668983f65bb7acb378f227ac74a40da |
|
MD5 | 4b7748a394f2b053a30511f664c13a93 |
|
BLAKE2b-256 | 6f555ac391b72833bf0cee97d6b3fca2173de9b5939625cc7145699f4052a9a5 |
File details
Details for the file axelrod-4.13.1-py3-none-any.whl
.
File metadata
- Download URL: axelrod-4.13.1-py3-none-any.whl
- Upload date:
- Size: 345.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63ee3a3a64ffb68945b9dd4172fcee43f39a2cde83a0ad04a09e0edcf8af8113 |
|
MD5 | 392f219080b9632125fa0aff78293aee |
|
BLAKE2b-256 | 33d55578f9af596db192ae209f5b4c6525ea615d9c778e8afec629873f3b4140 |