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=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.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.2.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distributions

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

axelrod_fortran-0.2.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

axelrod_fortran-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (7.4 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for axelrod-fortran-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cd3e99d3cfaf3078bd25b55f2daaa2b0b04cd264308dbab920702088431af316
MD5 718ac1714935c35c8f6441cd7cf73c7d
BLAKE2b-256 7ffbadf86f6bae46ee878fc9e76380b5a0e75ae8d2cad2fdbd835d28e5f70d43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for axelrod_fortran-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ec025c57b09f78d2329d9f8e849b064c5ab2afe54af9a08f1ede4d86c36cb18
MD5 7acbe01868a24022af229289269589aa
BLAKE2b-256 2f0ec35fc224eeb9b1015601f21ae6c03251fb65e76b0ec39708f7eed1567693

See more details on using hashes here.

File details

Details for the file axelrod_fortran-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for axelrod_fortran-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 737e4ee7c6a1fbaf1c9ee1320ec90a98ee4ccbb8999e678a0282652ad4c8b8d4
MD5 7e5a6532d7466ab3a7f654b238d78345
BLAKE2b-256 2ab4dd62165f1c651c99f0d61d0b7071f40d14aa31f2ca0c356efaccdc83d79d

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