-
Notifications
You must be signed in to change notification settings - Fork 264
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
Include some references and names for strategies. #741
Conversation
opponent has defected, but forgets after mem_length matches, with | ||
1 <= mem_length <= 20 proportional to the amount of time the opponent | ||
has played C. The inverse of Punisher. | ||
An inverse player of Punisher. |
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.
This is not clearer than what was there. What do you mean by 'inverse'?
"""A player who learns the best strategies through the q-learning | ||
algorithm. | ||
|
||
Q-learning algorithm: http://www.cse.unsw.edu.au/~cs9417ml/RL1/algorithms.html |
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.
I don't think this is necessary here.
|
||
Names: | ||
|
||
- LimitedRetaliate3: Original strategy by Owen Campbell |
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.
Just pinging @meatballs to check that these (see above) where indeed his.
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.
We confirmed it in PyCon. But I'll make sure to ping the author for now on.
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.
Guilty
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.
We confirmed it in PyCon. But I'll make sure to ping the author for now on.
No that's cool, hadn't realised you had chatted :) 👍
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.
😄
|
||
Names: | ||
|
||
- Hard Tit For Tat: |
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.
Reference?
|
||
Names: | ||
|
||
- Hard Tit For Two Tats: |
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.
Reference?
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.
I couldn't find all the Tit for Tat altered strategies reference. I believe some of the could be in the initial tournaments with different names. I need to further investigate these .
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.
Cool. In those cases can you put:
- Hard Tit For Two Tats: Reference required.
It's still better to have the name clearly there for the case of people looking for it.
Although I think you can probably find Hard Tit For Two Tats in various papers.
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.
You are correct. I am leaving 'Reference required' for now though.
http://perso.uclouvain.be/vincent.blondel/workshops/2003/beaufils.pdf """ | ||
Names: | ||
|
||
- Gradual: http://perso.uclouvain.be/vincent.blondel/workshops/2003/beaufils.pdf |
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.
Can you reference using the bibliography.
@@ -18,3 +18,8 @@ documentation. | |||
.. [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 | |||
.. [Tzafestas2000] Tzafestas, E. (2000). Toward adaptive cooperative behavior. From Animals to Animals: Proceedings of the 6th International Conference on the Simulation of Adaptive Behavior {(SAB-2000)}, 2, 334–340. | |||
.. [Axelrod1984] The Evolution of Cooperation. Basic Books. ISBN 0-465-02121-2. |
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.
Can you keep these in alphabetical order please.
@Nikoleta-v3 also looks like this needs to be rebased on to current master. |
…hue-Morse sequence. The strategies are original strategies writen by Gareint Palmer, thus this was added to the documentation. Also added a link of the Thue Morse sequence used by strategies. Finally, corrected the description a bit.
Random was a strategy initially used in the first tournament of Axelrod.
Added names and the fact that they are original created by O. Campbell.
Added a link to a q-algorithm site, also added the author because the strategies are original.
A lot are missing. I need to futher investigate the first strategies of Axelrod's tornament and if the match with different types of Tit for Tat.
These are original strategies from our contributors. Such as Geraint and Owen.
First paper to include random is that of Axelrod.
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.
Just a couple of minor things from me.
opponent has defected, but forgets after mem_length matches, with | ||
1 <= mem_length <= 20 proportional to the amount of time the opponent | ||
has played C. The inverse of Punisher. | ||
An inverse player of Punisher. Similarly the player starts by cooperating however will defect if at any point the |
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.
I think this should be: "An inverted version of Punisher."
|
||
This qlearner is quick to come to conclusions and doesn't care about the future. | ||
- RiskyQLearner: Original strategy by Geraint Palmer |
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.
Risky Q Learner
(RiskyQLearner is the name of the class)
|
||
Names: | ||
|
||
- ArrogantQLearner: Original strategy by Geraint Palmer |
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.
Arrogant Q Learner
|
||
Names: | ||
|
||
- HesitantQLearner: Original strategy by Geraint Palmer |
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.
Hesitant Q Learner
|
||
Names: | ||
|
||
- CautiousQLearner: Original strategy by Geraint Palmer |
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.
Cautious Q Learner
|
||
Names: | ||
|
||
- Tit for two Tats: [Axelrod1984]_ |
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.
"Two tits for Tat" I assume?
@@ -148,7 +176,12 @@ def strategy(opponent): | |||
|
|||
class AntiTitForTat(Player): | |||
"""A strategy that plays the opposite of the opponents previous move. | |||
This is similar to BULLY above, except that the first move is cooperation.""" | |||
This is similar to BULLY above, except that the first move is cooperation. |
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.
Can you get rid of "above" please, so:
This is similar to Bully, except that...
@@ -7,14 +7,20 @@ 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. | |||
.. [Axelrod1984] The Evolution of Cooperation. Basic Books. ISBN 0-465-02121-2. | |||
.. [Axelrod1995] Wu, J. and Axelrod, R. (1995) ‘How to cope with noise in the Iterated prisoner’s dilemma’, Journal of Conflict Resolution, 39(1), pp. 183–189. doi: 10.1177/0022002795039001008. |
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.
No need for the '
.. [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 | ||
.. [Beaufils1997] Beaufils, B. and Delahaye, J. (1997) ‘Our Meeting With Gradual: A Good Strategy For The Iterated Prisoner’s Dilemma’. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.4041 |
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.
Same comment.
.. [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. | ||
.. [Hilde2013] Hilbe, C., Nowak, M.A. and Traulsen, A. (2013) ‘Adaptive dynamics of extortion and compliance’, PLoS ONE, 8(11), p. e77886. doi: 10.1371/journal.pone.0077886. |
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.
Same comment.
I was getting an error because of the line space.
Making sure ":" is after name and '-' space before name.
Gradual's paper has been added to bibliography.
@drvinceknight I believe I addressed all your comments. I also did rebase. Waiting for further comments from @meatballs 😄 |
This is fine by me. I've edited the name of the PR so that it's verbose. |
1 <= mem_length <= 20 proportional to the amount of time the opponent | ||
has played C. The inverse of Punisher. | ||
An inverted version of Punisher. Similarly the player starts by cooperating however will defect if at any point the | ||
opponent has defected, but forgets after mem_length matches, with 1 <= mem_length <= 20. This time mem_lenght is |
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.
typo: 'mem_lenght' should be 'mem_length'
@@ -109,9 +115,14 @@ def reset(self): | |||
|
|||
|
|||
class ArrogantQLearner(RiskyQLearner): | |||
"""A player who learns the best strategies through the q-learning algorithm. | |||
"""A player who learns the best strategies through the q-learning | |||
algorithm. | |||
|
|||
This Q learner jumps to quick conclusions and care about the future. |
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.
typo: 'care' should be 'cares'
@@ -84,7 +96,13 @@ class Bully(Player): | |||
"""A player that behaves opposite to Tit For Tat, including first move. | |||
|
|||
Starts by defecting and then does the opposite of opponent's previous move. | |||
This is the complete opposite of TIT FOR TAT, also called BULLY in literature. | |||
This is the complete opposite of Tit For Tat, also called BULLY in | |||
literature. |
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.
typo: should be 'in THE literature'
@@ -128,7 +151,12 @@ def strategy(self, opponent): | |||
|
|||
|
|||
class SuspiciousTitForTat(Player): | |||
"""A TFT that initially defects.""" | |||
"""A variant of Tit For Tats that starts off with a defection. |
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.
typo: 'Tats' should be 'Tat'
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.
All done @meatballs 😄
Part of issue 225.
Documentation for a few strategies. Including various names and author.