GithubHelp home page GithubHelp logo

jamesbroadhead / axelrod Goto Github PK

View Code? Open in Web Editor NEW

This project forked from axelrod-python/axelrod

0.0 3.0 5.0 131.08 MB

A repository used to reproduce Axelrod's tournament

Home Page: http://axelrod.readthedocs.org/

License: MIT License

Python 99.81% Shell 0.19%

axelrod's Introduction

https://badge.waffle.io/Axelrod-Python/Axelrod.svg?label=ready&title=Ready https://travis-ci.org/Axelrod-Python/Axelrod.svg?branch=packaging

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

Axelrod

A repository with the following goals:

  1. To enable the reproduction of previous Iterated Prisoner's Dilemma research as easily as possible.
  2. To produce the de-facto tool for any future Iterated Prisoner's Dilemma research.
  3. To provide as simple a means as possible for anyone to define and contribute new and original Iterated Prisoner's Dilemma strategies.

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

Usage

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

The documentation includes details of how to setup a tournament but here is an example showing how to create a tournament with all stochastic strategies:

import axelrod
strategies = [s() for s in axelrod.ordinary_strategies if s().classifier['stochastic']]
tournament = axelrod.Tournament(strategies)
results = tournament.play()

The results object now contains all the results we could need:

print(results.ranked_names)

gives:

['Meta Hunter', 'Inverse', 'Forgetful Fool Me Once', 'GTFT: 0.33', 'Champion', 'ZD-GTFT-2', 'Eatherley', 'Math Constant Hunter', 'Random Hunter', 'Soft Joss: 0.9', 'Meta Majority', 'Nice Average Copier', 'Feld', 'Meta Minority', 'Grofman', 'Stochastic WSLS', 'ZD-Extort-2', 'Tullock', 'Joss: 0.9', 'Arrogant QLearner', 'Average Copier', 'Cautious QLearner', 'Hesitant QLearner', 'Risky QLearner', 'Random: 0.5', 'Meta Winner']

Results

A tournament with the full set of strategies from the library can be found at https://github.com/Axelrod-Python/tournament. Here is the latest graphical version of the results:

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.

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:

axelrod's People

Contributors

avaren avatar bricef avatar deane avatar drvinceknight avatar funkyhat avatar geraintpalmer avatar gitter-badger avatar hollytibble avatar jamesbroadhead avatar jasyoung315 avatar jomuel avatar karlos78 avatar langner avatar lvisintini avatar marcharper avatar martinjc avatar meatballs avatar pmslavin avatar r4vi avatar risicle avatar salimfadhley avatar theref avatar timothyf1 avatar tricoder42 avatar uglyfruitcake avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.