-
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
Meta Winner Ensemble #757
Meta Winner Ensemble #757
Conversation
t.proposed_history.append(r) | ||
|
||
if opponent.defections == 0: | ||
# Don't poke the bear |
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 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.
As well as my two small requests, I don't understand why this hasn't tripped this test (which should check that it's in long_run_time_strategies
): https://github.com/Axelrod-Python/Axelrod/blob/master/axelrod/tests/unit/test_classification.py#L170
@@ -165,6 +165,32 @@ def meta_strategy(self, results, opponent): | |||
|
|||
return bestresult | |||
|
|||
class MetaWinnerEnsemble(MetaWinner): | |||
"""A variant of MetaWinner that chooses one of the top scoring strategies at random against each opponent.""" |
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 something like:
Names:
Meta Winner Ensemble: Original name by Marc Harper
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
|
||
def test_strategy(self): | ||
self.first_play_test(C) | ||
|
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 test (for a given random seed) just for a few plays please.
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 added two deterministic test cases.
|
Thanks @marcharper :) |
New strategy: Meta Winner Ensemble
Rather than take the "best" strategy, this MetaWinner variant chooses randomly from some of the top strategies computed each round against each opponent. In the full tournament it comes in 7th and is now the current best meta strategy.
I spent a little time tuning the parameter of how many strategies to pick from but not a lot, so it's possible that there's room for improvement.