-
Notifications
You must be signed in to change notification settings - Fork 267
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
New Strategy From the PRISON (http://www.lifl.fr/IPD/ipd.frame.html) #720
Conversation
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.
Thanks @Huaraz2, there are some merge conflict markers left over.
.. automodule:: axelrod.strategies.worseandworse | ||
:members: | ||
:undoc-members: | ||
======= |
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.
There's a merge conflict here.
<<<<<<< HEAD | ||
.. [Prison] LIFL (1998) DIP - page principale. Available at: http://www.lifl.fr/IPD/ipd.frame.html (Accessed: 19 September 2016). | ||
======= |
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.
And a merge conflict here.
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.
fixed in latest commit.
@@ -18,4 +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. | |||
.. [PRISON1998] LIFL (1998) PRISON. Available at: http://www.lifl.fr/IPD/ipd.frame.html (Accessed: 19 September 2016). |
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.
Looks like you deleted this line but this is in the master branch so best go with it.
…of github.com:Axelrod-Python/Axelrod
Not quite sure why the doc tests are failing |
Could you adjust the doctests in lines 50 and 84 of docs/tutorials/advanced/classification_of_strategies.rst ? Just increase both of those expected counts by 1 as they are affected by your new strategy and causing the the doctest to fail. |
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 believe the appveyor failure has been fixed on master (it's a particular hypothesis test case), could you rebase?
The travis one is a real failure it seems.
The
if randint(0, expected_length) < (current_round): | ||
return Actions.D | ||
return Actions.C | ||
except: |
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 haven't reviewed the strategy properly (once all tests are sorted I will) but this general except is not great: better to catch the actual error. Also, not sure why you're hardcoding 200, is that just for some tests when the match_attributes
isn't passed? I think I'd prefer a different default behaviour there, perhaps just cooperate or defect or randomly cooperate or defect...
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.
@drvinceknight would you prefer it to be an if/else statement? The reason why travis is failing is because random.seed(1) and random.seed(2) are different for python 2.7 and python 3
implemented 'Worse and worse' strategy as suggested in #379. Made this strategy during the PyconUK sprint yesterday.