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 match_attributes to match class #609

Merged
merged 5 commits into from
May 31, 2016
Merged

Add match_attributes to match class #609

merged 5 commits into from
May 31, 2016

Conversation

meatballs
Copy link
Member

closes #538

@drvinceknight
Copy link
Member

Could have some tests showing checking behaviour when passing non defaults.

@drvinceknight
Copy link
Member

The prob end tournament now tells the players the length of the match (which it shouldn't).

I'm not sure where this got introduced (not in this PR I don't think), but this PR would allow us to pass a turns: float('inf') so that the players don't know the match length.

I think it would need the tournament to have a: self.build_match method which the prob end tournament could overwrite... It would be good to add a test to the prob end tournament that checks that players don't know the match lengths...

@meatballs
Copy link
Member Author

is that not a separate bug which needs another issue created?

@drvinceknight
Copy link
Member

is that not a separate bug which needs another issue created?

I think it is indeed a separate thing, it's definitely not introduced by this right? (Still got my head deep in marking so if you could just confirm I'm not talking nonsense)...

@meatballs
Copy link
Member Author

It's not something that this PR introduced.

@@ -32,6 +32,19 @@ def test_init(self, turns, game):
self.assertEqual(match.noise, 0)
self.assertEqual(match.game.RPST(), game.RPST())

@given(turns=integers(min_value=1, max_value=200), game=games())
@example(turns=5, game=axelrod.DefaultGame)
def test_init(self, turns, game):
Copy link
Member

Choose a reason for hiding this comment

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

Can you change the name of this method to test_init_with_non_default_match_attributes or perhaps something that's less of a mouthful (but something that isn't test_init)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agghhhh!! Cut and paste strikes again!

@drvinceknight
Copy link
Member

Good to go from me. This clears the way for a nice fix of #610. 👍

@meatballs
Copy link
Member Author

That last commit fixes #610

@drvinceknight
Copy link
Member

Cool, I've opened #611, as a PR to this branch with a single test that just checks that players do indeed not know the length of the match. Done using the final transformer on the cooperators and checking their cooperation rating.

@drvinceknight drvinceknight merged commit a34f7e4 into master May 31, 2016
@marcharper marcharper deleted the 538 branch July 22, 2016 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting information passed to players by matches
2 participants