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

Nice meta #794

Merged
merged 7 commits into from
Jan 1, 2017
Merged

Nice meta #794

merged 7 commits into from
Jan 1, 2017

Conversation

marcharper
Copy link
Member

@marcharper marcharper commented Dec 23, 2016

Once upon a time I made all the MetaWinner strategies "nice" -- they never defect unless the opponent does first. This added a lot of nice strategies to the library. In this PR I add a transformer to make any strategy nice, and diversify the meta strategy collection a bit by making some not nice.

I recommend that we remove some of the variants from the standard collection in the near future-- there's not much difference in performance among the variants, and there are a number of better strategies incoming. But that's a conversation for another PR.

Copy link
Member

@drvinceknight drvinceknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the look of this transformer :)

@@ -219,6 +216,19 @@ def forgiver_wrapper(player, opponent, action, p):
forgiver_wrapper, name_prefix="Forgiving")


def nice_wrapper(player, opponent, action):
"""If a strategy wants to defect, flip to cooperate with the given
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This docstring isn't correct right? There is no probability involved.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, lazy copy paste on my part.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@drvinceknight
Copy link
Member

One final thing, could you add a little something about this transformer to http://axelrod.readthedocs.io/en/latest/tutorials/advanced/strategy_transformers.html?

@meatballs meatballs merged commit 10bf24a into master Jan 1, 2017
@meatballs meatballs deleted the nice_meta branch January 1, 2017 15:20
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

3 participants