-
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
Nice meta #794
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.
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 |
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 docstring isn't correct right? There is no probability involved.
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.
Yep, lazy copy paste on my part.
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.
Done
One final thing, could you add a little something about this transformer to http://axelrod.readthedocs.io/en/latest/tutorials/advanced/strategy_transformers.html? |
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.