Skip to content

Commit e7922ab

Browse files
committed
Merge pull request #270 from Axelrod-Python/vk-265
For - 265 updating the README
2 parents 4da6da9 + 98c419a commit e7922ab

File tree

1 file changed

+24
-78
lines changed

1 file changed

+24
-78
lines changed

README.rst

Lines changed: 24 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. image:: https://badge.waffle.io/Axelrod-Python/Axelrod.svg?label=ready&title=Ready
22
:target: https://waffle.io/Axelrod-Python/Axelrod
33

4-
54
.. image:: https://coveralls.io/repos/Axelrod-Python/Axelrod/badge.svg
65
:target: https://coveralls.io/r/Axelrod-Python/Axelrod
76

@@ -42,98 +41,45 @@ The simplest way to install is::
4241

4342
$ pip install axelrod
4443

45-
Here is an asciicast showing how to install and use the library:
46-
47-
.. image:: https://asciinema.org/a/18590.png
48-
:width: 50%
49-
:target: https://asciinema.org/a/18590
50-
5144
Otherwise::
5245

5346
$ git clone https://github.com/Axelrod-Python/Axelrod.git
5447
$ cd Axelrod
5548
$ python setup.py install
5649

57-
Note that (as documented at http://axelrod.readthedocs.org/) you do not need to
58-
run the last step to use this package (you can run all the code from the root of
59-
the directory).
60-
61-
Results
62-
=======
63-
64-
This repository contains Python (2.7) code that reproduces the
65-
tournament. To run the tournament, you simply need to:
66-
67-
::
68-
69-
$ python run_axelrod
70-
71-
This automatically outputs a ``png`` file with the results. You can see
72-
the results from the latest run of the tournament here:
73-
74-
.. figure:: ./assets/strategies_boxplot.png
75-
:alt:
76-
77-
You can see the results from the latest run of the tournament here with
78-
the cheating strategies (which manipulate/read what the opponent does):
79-
80-
.. figure:: ./assets/all_strategies_boxplot.png
81-
:alt:
82-
83-
Also the pairwise performance of each strategy versus all others:
84-
85-
.. figure:: ./assets/strategies_payoff.png
86-
:alt:
50+
Usage
51+
-----
8752

88-
Please do contribute :)
89-
90-
Note that you can run ``python run_axelrod -h`` for further
91-
options available: for example, cheating strategies can be excluded for
92-
faster results by running:
93-
94-
::
95-
96-
$ python run_axelrod --xc --xa
97-
98-
You can also run the tournament in parallel (below will run 4 parallel
99-
processes):
100-
101-
::
102-
103-
$ python run_axelrod -p 4
104-
105-
You can run with all available CPUs with:
106-
107-
::
108-
109-
$ python run_axelrod -p 0
53+
The full documentation can be found here:
54+
`axelrod.readthedocs.org/ <http://axelrod.readthedocs.org/>`__.
11055

111-
Awesome visualisation
112-
---------------------
56+
The documentation includes details of how to setup a tournament but here is an
57+
example showing how to create a tournament with all stochastic strategies::
11358

114-
`martinjc <https://github.com/martinjc>`__ put together a pretty awesome
115-
visualisation of this using d3. Hosted on gh-pages it can be seen here:
116-
`drvinceknight.github.io/Axelrod <http://drvinceknight.github.io/Axelrod/>`__.
59+
import axelrod
60+
strategies = [s() for s in axelrod.ordinary_strategies if s().stochastic]
61+
tournament = axelrod.Tournament(strategies)
62+
results = tournament.play()
11763

118-
Documentation
119-
-------------
64+
The :code:`results` object now contains all the results we could need::
12065

121-
There is currently a very sparse set of documentation up here:
122-
`axelrod.readthedocs.org/ <http://axelrod.readthedocs.org/>`__.
66+
print(results.ranked_names)
12367

124-
To write/render the documenation locally, you will need
125-
`sphinx <http://sphinx-doc.org/>`__:
68+
gives::
12669

127-
::
70+
['Inverse', 'Forgetful Fool Me Once', 'Nice Average Copier', 'Champion',
71+
'Generous Tit-For-Tat', 'Eatherley', 'ZD-GTFT-2', 'Meta Majority', 'Soft Joss',
72+
'Average Copier', 'Feld', 'Stochastic WSLS', 'Tullock', 'Joss', 'ZD-Extort-2',
73+
'Grofman', 'Random', 'Meta Winner', 'Meta Minority']
12874

129-
$ pip install sphinx sphinx-autobuild mock
130-
131-
Once you have sphinx:
75+
Results
76+
=======
13277

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

135-
$ cd docs
136-
$ make html
82+
.. image:: http://axelrod-python.github.io/tournament/assets/strategies_boxplot.svg
13783

13884
Contributing
13985
============
@@ -183,7 +129,7 @@ paper please list it here:
183129
by `marcharper <https://github.com/marcharper>`_.
184130
- `Axelrod-Python related blog articles
185131
<http://www.thomascampbell.me.uk/category/axelrod.html>`_
186-
by `Uglyfruitcake <https://github.com/uglyfruitcake>`_.
132+
by `Uglyfruitcake <https://github.com/uglyfruitcake>`_.
187133

188134
.. |Join the chat at https://gitter.im/Axelrod-Python/Axelrod| image:: https://badges.gitter.im/Join%20Chat.svg
189135
:target: https://gitter.im/Axelrod-Python/Axelrod?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

0 commit comments

Comments
 (0)