Skip to main content

Python wrapper for strategies originally written in Fortran

Project description

Python wrapper for strategies originally written in Fortran

  • Free software: MIT license

Installation

pip install axelrod-fortran

Usage

Running a match:

>>> import axelrod_fortran as axlf
>>> import axelrod as axl
>>> p1 = axlf.Player('k31r')
>>> p2 = axlf.Player('k33r')
>>> match = axl.Match((p1, p2), turns=5)
>>> match.play()
[(C, C), (C, C), (C, D), (C, D), (C, C)]

Running an instance of Axelrod’s second tournament:

>>> import axelrod_fortran as axlf
>>> import axelrod as axl
>>> players = [axlf.Player(name) for name in axlf.second_tournament_strategies]
>>> print(len(players), "players")
62 players
>>> tournament = axl.Tournament(players, repetitions=1, turns=200)
>>> results = tournament.play()
>>> results.write_summary('summary.csv')
>>> plot = axl.Plot(results)
>>> plot.save_all_plots("second_tournament")

Contributing

Please see CONTRIBUTING.rst for details about installing for development and running the test suite.

Changelog

v0.1.0 (2017-07-29)

  • Player class to wrap a fortran strategy function into the axelrod library

  • Characteristice dict with details of stochasticity, author and original ranking for each function

  • Pre-built lists for all strategies and strategies which participated in Axelrod’s second tournament

Project details


Download files

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

Source Distribution

axelrod-fortran-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

axelrod_fortran-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file axelrod-fortran-0.1.0.tar.gz.

File metadata

File hashes

Hashes for axelrod-fortran-0.1.0.tar.gz
Algorithm Hash digest
SHA256 21a94ac6b1b1b871bd361b8d5c3539a62ab4b82973f6d3444178c0aeed27f4d2
MD5 91ba62f99af2ed11100629237bd04c36
BLAKE2b-256 95d976707308ed0937d6b845bfb226c79b1b8e2359964be0a2a3cb7e31b475ad

See more details on using hashes here.

File details

Details for the file axelrod_fortran-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for axelrod_fortran-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 387ea3b93a4b19bf5ae6f5b942c247774a94455d215ef7806e0f05f6e56fe51c
MD5 dbcdf30b576013b8e36d1efa4ef7fedd
BLAKE2b-256 a46cd7d64e8a7db5fcc851b9de7e8e43be5107190c370ee4d57ef1f260ad3a8e

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