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

Refactor tests for Prober. #1023

Merged
merged 2 commits into from
May 25, 2017
Merged

Refactor tests for Prober. #1023

merged 2 commits into from
May 25, 2017

Conversation

drvinceknight
Copy link
Member

Addresses #884

Also reformats strategy docstrings (which addresses #225).

Copy link
Member

@marcharper marcharper left a comment

Choose a reason for hiding this comment

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

One question

self.first_play_test(C)
# Always retaliate a defection
self.responses_test([D], [C] * 2, [C, D])
actions = [(C, D)] + [(D, D)] * 10
Copy link
Member

Choose a reason for hiding this comment

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

Is this one equivalent? The original test had a cooperation then a defection by the opponent. If we want to replace the test then one with alternator seems more appropriate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Against an Alternator this test becomes stochastic because the strategy randomly defects against a cooperation. The test we're replacing just checked the first defection and not a set of future rounds. I'll change this to use a MockPlayer that starts with C and then D for the remaining rounds.

Addresses #884

Also reformats strategy docstrings (which addresses #225).
@marcharper marcharper merged commit 1d3d81f into master May 25, 2017
@marcharper marcharper deleted the 884-prober branch July 19, 2017 14:31
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