-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add new strategy VeryBad #869
Conversation
axelrod/strategies/verybad.py
Outdated
total_moves = len(opponent.history) | ||
cooperations = opponent.cooperations | ||
|
||
cooperation_probability = cooperations / (total_moves * 1.0) |
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 is no need for * 1.0
here (this is all Python 3).
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 though it couldn't hurt. Changing it now.
I've taken a look at the paper and I'm really not sure there's enough details there for us to assume this is an implementation of that strategy:
The fact that they say "uses probability" makes me think that there should be some randomness somewhere... That doesn't mean this strategy shouldn't be added to the library but I'm not sure we can say it's an implementation of the one from that paper... It might need to change name. Will be good to get the others' thoughts on this. |
@drvinceknight I was confused by the lack of details too, but I assumed the most general meaning. |
Yeah it's really confusing and one of the problems with modern research where papers are written that are not possible to replicate... It might be that like I said on #866 we might need to say "losely based on a description given in...". Another option might be getting in touch with the authors and explaining what you're doing and asking for more details? |
@drvinceknight I will try to contact one of the authors to clarify both. |
If we don't hear back from the others just use your best judgement and update the docstrings to make it clear that a complete description could not be obtained. |
It has been almost a week, and I haven't heard back from any of the authors. |
Thanks @janga1997 . Please check the docstring formatting, that's why the build "failed". You can see the warnings / errors by running "make html" from within the docs directory. |
axelrod/strategies/verybad.py
Outdated
implementation | ||
P(C) = Cooperations / Total_Moves | ||
P(D) = Defections / Total_Moves = 1 - P(C) | ||
Names: |
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.
Could you add a blank line before Names
please.
Remove 1.0 from division Update docstrings to reflect lack of information Change docstrings Formatting fix
#379
Here is the paper . Page 3.