Skip to content
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

Merged
merged 5 commits into from
Feb 27, 2017
Merged

Conversation

janga1997
Copy link
Member

#379
Here is the paper . Page 3.

total_moves = len(opponent.history)
cooperations = opponent.cooperations

cooperation_probability = cooperations / (total_moves * 1.0)
Copy link
Member

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).

Copy link
Member Author

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.

@drvinceknight
Copy link
Member

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:

It cooperates in the first three rounds, and uses probability (it implements a memory, which stores the opponent’s moves) to decide for cooperating or defecting.

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.

@janga1997
Copy link
Member Author

@drvinceknight I was confused by the lack of details too, but I assumed the most general meaning.
I could definitely be wrong about the intentions of the paper.

@drvinceknight
Copy link
Member

I was confused by the lack of details too, but I assumed the most general meaning.
I could definitely be wrong about the intentions of the paper.

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?

@janga1997
Copy link
Member Author

@drvinceknight I will try to contact one of the authors to clarify both.

@marcharper
Copy link
Member

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.

@janga1997
Copy link
Member Author

It has been almost a week, and I haven't heard back from any of the authors.
I'm updating the docstrings for both the strategies.

@marcharper
Copy link
Member

marcharper commented Feb 26, 2017

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.

implementation
P(C) = Cooperations / Total_Moves
P(D) = Defections / Total_Moves = 1 - P(C)
Names:
Copy link
Member

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.

@meatballs meatballs merged commit 8f07243 into Axelrod-Python:master Feb 27, 2017
Remove 1.0 from division

Update docstrings to reflect lack of information

Change docstrings

Formatting fix
@janga1997 janga1997 changed the title Add strategy VeryBad Add new strategy VeryBad Mar 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants