-
Notifications
You must be signed in to change notification settings - Fork 278
299 - Docs #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
299 - Docs #372
Changes from all commits
e9a72e3
8fcef33
9612c06
2a7224c
29da9e9
77e5c28
0cea46a
5689be3
a65d78f
1c51688
60d3200
6d24583
4edbedc
47f2b86
340d961
b8c315a
8ec0e35
2a66782
02d7fd7
9c252db
0155030
488ee8d
737d5f3
46fbb7b
ab32b89
570c236
b2196cb
86f72a4
d165b67
92d3bf9
d10983e
19e4f0c
8def6fb
4e9c953
8c72309
2adcc5a
f4e0de5
a1ec90c
1f1bfbd
e06af3f
3e16aa0
b980146
aa5678e
1fac8af
eff9529
41adada
67c1659
0514fdf
c449c85
10a31e4
8e72d47
f38ef4e
e932e60
fd228a2
1b5a188
5024ba1
0d1e1ac
99ad48d
63432f7
15d7cc2
5996fd9
f242d43
5b2afea
07fd6ea
afaf49c
dc0b98d
7ece707
410d193
b1d814f
099e48b
23c1e83
bad6072
ff436a8
a00afc5
b589c35
48bc92c
33f1d49
976224a
b594dad
a3a5b28
68cbbed
70c7461
04a1fdd
32b74f8
3986514
ad5c4c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ _build/ | |
*.log | ||
dist/ | ||
MANIFEST | ||
Axelrod.egg-info |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Glossary | ||
======== | ||
|
||
There are a variety of terms used in the documentation and throughout the | ||
library. Here is an overview: | ||
|
||
An action | ||
--------- | ||
|
||
An **action** is either :code:`C` or :code:`D`. | ||
You can access these actions as follows but should not really have a reason to:: | ||
|
||
>>> import axelrod as axl | ||
>>> axl.Actions.C | ||
'C' | ||
>>> axl.Actions.D | ||
'D' | ||
|
||
A play | ||
------ | ||
|
||
A **play** is a single player choosing an **action**. | ||
In terms of code this is equivalent to:: | ||
|
||
>>> p1, p2 = axl.Cooperator(), axl.Defector() | ||
>>> p1.play(p2) # This constitues two 'plays' (p1 plays and p2 plays). | ||
|
||
This is equivalent to :code:`p2.play(p1)`. Either function invokes both | ||
:code:`p1.strategy(p2)` and :code:`p2.strategy(p1)`. | ||
|
||
A turn | ||
------ | ||
|
||
A **turn** is a 1 shot interaction between two players. It is in effect a | ||
composition of two **plays**. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each turn has four possible sets of plays: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @marcharper have added both of those suggestions: b2196cb |
||
|
||
Each turn has four possible outcomes of a play: :code:`(C, C)`, :code:`(C, D)`, | ||
:code:`(D, C)`, or :code:`(D, D)`. | ||
|
||
A match | ||
------- | ||
|
||
A **match** is a consecutive number of **turns**. The default number of turns | ||
used in the tournament is 200. Here is a single match between two players over | ||
10 turns:: | ||
|
||
>>> p1, p2 = axl.Cooperator(), axl.Defector() | ||
>>> for turn in range(10): | ||
... p1.play(p2) | ||
>>> p1.history, p2.history | ||
(['C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'], ['D', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D']) | ||
|
||
A win | ||
----- | ||
|
||
A **win** is attributed to the player who has the higher total score at the end | ||
of a match. For the example above, :code:`Defector` would win that match. | ||
|
||
A round robin | ||
------------- | ||
|
||
A **round robin** is the set of all potential (order invariant) matches between | ||
a given collection of players. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should mention here that a round robin also includes self-interactions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point. Will do. On 22 October 2015 at 17:35, Owen Campbell notifications@github.com wrote:
Dr Vincent Knight There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I don't think we should, this self-interaction is only relevant to the playoff matrix but (shouldn't be) isn't relevant to an actual tournament. |
||
A tournament | ||
------------ | ||
|
||
A **tournament** is a repetition of round robins so as to smooth out stochastic effects. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Reference | ||
========= | ||
|
||
This section is the reference guide for the various components of the library. | ||
|
||
Contents: | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
overview_of_strategies.rst | ||
glossary.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equivalent to
p2.play(p1)
. Either function invokes bothp1.strategy(p2)
andp2.strategy(p1)
.