You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage.rst
+45-3Lines changed: 45 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
Usage
2
2
=====
3
3
4
-
This library is intended to allow for users to create their own tournaments (and incorporating various strategies as required) and comes with a script that runs the tournament with a variety of options:
4
+
This library is intended to allow for users to create their own tournaments (and
5
+
incorporating various strategies as required) and comes with a script that runs
6
+
the tournament with a variety of options:
5
7
6
8
1. `Using as a library`_
7
9
2. `Running the tournament`_
@@ -149,13 +151,17 @@ gives::
149
151
150
152
3
151
153
152
-
So even with a large quantity of :code:`Defector` only a small number of :code:`TitForTat` strategies is required.
154
+
So even with a large quantity of :code:`Defector` only a small number of
155
+
:code:`TitForTat` strategies is required.
153
156
154
157
155
158
Graphics
156
159
^^^^^^^^
157
160
158
-
The whole library can be used without any other non base Python libraries however if you have `matplotlib <http://matplotlib.org/>`_ installed on your system (this is installed automatically if you used :code:`pip install axelrod`) there are various graphical things coded in and ready to go.
161
+
The whole library can be used without any other non base Python libraries
162
+
however if you have `matplotlib <http://matplotlib.org/>`_ installed on your
163
+
system (this is installed automatically if you used :code:`pip install axelrod`)
164
+
there are various graphical things coded in and ready to go.
159
165
160
166
Let us see the global scores for the basic strategies::
161
167
@@ -179,6 +185,42 @@ If we run the same tournament but with 5 :code:`Defector` and 3 :code:`TitForTat
179
185
:width:50%
180
186
:align:center
181
187
188
+
Non default arguments
189
+
^^^^^^^^^^^^^^^^^^^^^
190
+
191
+
By default the tournament is run for 200 rounds and repeated 10 times. This are
192
+
the default values and can be changed::
193
+
194
+
import axelrod
195
+
strategies = [s() for s in axelrod.basic_strategies]
0 commit comments