Skip to content

Commit

Permalink
Add bibliography and sources to 2 strategies.
Browse files Browse the repository at this point in the history
Adding them to Grudger and TitForTat.
  • Loading branch information
drvinceknight committed Aug 9, 2016
1 parent 92e2c64 commit a1dc343
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
11 changes: 10 additions & 1 deletion axelrod/strategies/grudger.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
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:
- Friedman's strategy: [Axelrod1980]_
- Grudger: [Li2011]_
- Grim: [Berg2015]_
"""

name = 'Grudger'
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
5 changes: 5 additions & 0 deletions docs/reference/bibliography.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bibliography
============
.. [Axelrod1980] Axelrod, R. (1980). Effective Choice in the Prisoner’s Dilemma. Journal of Conflict Resolution, 24(1), 3–25.
.. [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.
.. [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.
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

0 comments on commit a1dc343

Please sign in to comment.