Skip to content

Commit

Permalink
Edit of documentation
Browse files Browse the repository at this point in the history
Closes #675

This also lays some early work for #225 by putting a bibliography.rst
file in place and adding sources to a handful of strategies (TitForTat,
Grudger, Joss and WSLS).
- add minor modifications to landing page.
- remove incorrect statement about installation.
- tweak match docs.
- fix PEP8 in simple tournament docs.
- make minor adj to results + add bibliography
- add a bibliography and adds some references to some of the strategies.
- tidy of syntax for interactions.
- remove digits (skipping doctest anyway).
- tiny change to noisy tournament docs.
- apply minor changes to spatial tournament.
- add relevant bibliographic items.
- add reference for morality docs.
- import axl in strategy docs.
- import as axl in transformers docs.
- set a seed with axl in making tourn docs.
- make minor stylistic tweaks to read and write docs
- remove unclear part of contrib guidelines: perhaps I just misunderstood what this was saying?
- add a word to index for strategy contrib
- simplify and correct strategy contrib instructions.
- add instructions about references to contrib docs.
- improve rst syntax in add strategy docs.
- minor fixes to class contrib.
- minor tweaks to writing tests.
- grammar in running tests.
- grammar in contributing to the library.
- simplify the tournament overview section.
- sources for some strategies.
  • Loading branch information
drvinceknight committed Aug 11, 2016
1 parent 45a35ce commit 20b41cb
Show file tree
Hide file tree
Showing 32 changed files with 225 additions and 680 deletions.
5 changes: 5 additions & 0 deletions axelrod/strategies/axelrod_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ class Joss(MemoryOnePlayer):
"""
Cooperates with probability 0.9 when the opponent cooperates, otherwise
emulates Tit-For-Tat.
Names:
- Joss [Axelrod1980]_
- Hard Joss [Stewart2012]_
"""

name = "Joss"
Expand Down
12 changes: 11 additions & 1 deletion axelrod/strategies/grudger.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
C, D = Actions.C, Actions.D

class Grudger(Player):
"""A player starts by cooperating however will defect if at any point the opponent has defected."""
"""
A player starts by cooperating however will defect if at any point the
opponent has defected.
Names:

This comment has been minimized.

Copy link
@marcharper

marcharper Aug 11, 2016

Member

YES

- Friedman's strategy: [Axelrod1980]_
- Grudger: [Li2011]_
- Grim: [Berg2015]_
- Grim Trigger: [Banks1980]_
"""

name = 'Grudger'
classifier = {
Expand Down
10 changes: 9 additions & 1 deletion axelrod/strategies/memoryone.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ def strategy(self, opponent):


class WinStayLoseShift(MemoryOnePlayer):
"""Win-Stay Lose-Shift, also called Pavlov."""
"""
Win-Stay Lose-Shift, also called Pavlov.
Names:
- WSLS: [Stewart2012]_
- Win Stay Lose Shift: [Nowak1993]_
- Pavlov: [Kraines1989]_
"""

name = 'Win-Stay Lose-Shift'
classifier = {
Expand Down
5 changes: 5 additions & 0 deletions axelrod/strategies/titfortat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class TitForTat(Player):
Note that the code for this strategy is written in a fairly verbose
way. This is done so that it can serve as an example strategy for
those who might be new to Python.
Names
- Rapoport's strategy: [Axelrod1980]_
- TitForTat: [Axelrod1980]_
"""

# These are various properties for the strategy
Expand Down
2 changes: 2 additions & 0 deletions docs/community.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _community:

Community
=========

Expand Down
8 changes: 5 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ Study the evolutionary process using a Moran process::
As well as this, the library has a growing collection of strategies. The
:ref:`strategies-index` gives a description of them.

For further details there is a library of tutorials available:
For further details there is a library of :ref:`tutorials` available and a
:ref:`community` page with information about how to get support and/or make
contributions.

Tutorials
---------
Table of Contents
-----------------

.. toctree::
:maxdepth: 3
Expand Down
19 changes: 19 additions & 0 deletions docs/reference/bibliography.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _bibliography:

Bibliography
============

This is a collection of various bibliographic items referenced in the
documentation.

.. [Axelrod1980] Axelrod, R. (1980). Effective Choice in the Prisoner’s Dilemma. Journal of Conflict Resolution, 24(1), 3–25.
.. [Banks1980] Banks, J. S., & Sundaram, R. K. (1990). Repeated games, finite automata, and complexity. Games and Economic Behavior, 2(2), 97–117. http://doi.org/10.1016/0899-8256(90)90024-O
.. [Berg2015] Berg, P. Van Den, & Weissing, F. J. (2015). The importance of mechanisms for the evolution of cooperation. Proceedings of the Royal Society B-Biological Sciences, 282.
.. [Kraines1989] Kraines, D. & Kraines, V. Theor Decis (1989) 26: 47. doi:10.1007/BF00134056
.. [Li2011] Li, J., Hingston, P., Member, S., & Kendall, G. (2011). Engineering Design of Strategies for Winning Iterated Prisoner ’ s Dilemma Competitions, 3(4), 348–360.
.. [Nowak1992] Nowak, M. a., & May, R. M. (1992). Evolutionary games and spatial chaos. Nature. http://doi.org/10.1038/359826a0
.. [Nowak1993] Nowak, M., & Sigmund, K. (1993). A strategy of win-stay, lose-shift that outperforms tit-for-tat in the Prisoner’s Dilemma game. Nature, 364(6432), 56–58. http://doi.org/10.1038/364056a0
.. [Press2012] Press, W. H., & Dyson, F. J. (2012). Iterated Prisoner’s Dilemma contains strategies that dominate any evolutionary opponent. Proceedings of the National Academy of Sciences, 109(26), 10409–10413. http://doi.org/10.1073/pnas.1206569109
.. [Singer-Clark2014] Singer-Clark, T. (2014). Morality Metrics On Iterated Prisoner’s Dilemma Players.
.. [Stewart2012] Stewart, a. J., & Plotkin, J. B. (2012). Extortion and cooperation in the Prisoner’s Dilemma. Proceedings of the National Academy of Sciences, 109(26), 10134–10135. http://doi.org/10.1073/pnas.1208087109
.. [Szabó1992] Szabó, G., & Fáth, G. (2007). Evolutionary games on graphs. Physics Reports, 446(4-6), 97–216. http://doi.org/10.1016/j.physrep.2007.04.004
1 change: 1 addition & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Contents:
play_contexts.rst
overview_of_strategies.rst
all_strategies.rst
bibliography.rst
glossary.rst
Loading

0 comments on commit 20b41cb

Please sign in to comment.