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

Meta Winner Ensemble #757

Merged
merged 3 commits into from
Nov 5, 2016
Merged

Meta Winner Ensemble #757

merged 3 commits into from
Nov 5, 2016

Conversation

marcharper
Copy link
Member

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.

t.proposed_history.append(r)

if opponent.defections == 0:
# Don't poke the bear
Copy link
Member

Choose a reason for hiding this comment

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

😄

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.

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."""
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 something like:

Names:

Meta Winner Ensemble: Original name by Marc Harper

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


def test_strategy(self):
self.first_play_test(C)

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 test (for a given random seed) just for a few plays please.

Copy link
Member Author

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.

@marcharper
Copy link
Member Author

marcharper commented Nov 5, 2016

I fixed the doc test and squashed the commit into the first one. 2dd113b should fix it.

@drvinceknight
Copy link
Member

Thanks @marcharper :)

@drvinceknight drvinceknight merged commit 2ab2a9f into master Nov 5, 2016
@marcharper marcharper deleted the mwe branch November 11, 2016 18:26
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.

3 participants