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")
63 players
>>> tournament = axl.Tournament(players, repetitions=1,
...                             turns=63, match_attributes={"length": -1})
>>> 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.3.1 (2017-08-04)

  • Identify strategy K61R as Champion by Danny Champion ranked at 2.

v0.3.0 (2017-08-04)

  • Identify strategy K92R as Tit For Tat by Anatol Rapoport ranked at 1.

v0.2.0 (2017-07-30)

  • Identify strategy K74R as participating in the second tournament, written by Edward Friedland and ranked at 61

All changes between v0.1.0 and this release

v0.1.0 (2017-07-29)

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

  • Characteristics 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.3.1.tar.gz (10.3 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.3.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for axelrod-fortran-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c330c018cfa9be22288b1918aad5de94a13e9f203c87dfa61cdd6d14c0424b71
MD5 9e5da3e229b1758a1332c226300e79d0
BLAKE2b-256 a207c7148bc06a15cadc52b6d6eef883789dac2b7ef560eda57b0de30a22b4eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for axelrod_fortran-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 498194ea5e0e8ffc198e95c2af87e2967a639fa2bffa5d820333d7f37e9ff609
MD5 ce967013befa585d1a34acdbda439d7c
BLAKE2b-256 1345e4cdaba9f11fdaeb21d5b4554261e40a2cc8e362faaa34bc334a0d0f368b

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