-
Notifications
You must be signed in to change notification settings - Fork 278
Added an AdaptiveCooperator strategy. #1477
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
base: dev
Are you sure you want to change the base?
Conversation
So the build is failing because:
I see that what you have written follows the documentation perfectly but that looks to be out of date (this is a documentation bug). If you take a look at a similar test file for example here you'll see that in fact the import needs to be:
If you fix that and push it hopefully that fixes the error. |
Just fixed the TestPlayer class and pushed again - checks still failed. I think this has to do with the classifier, since |
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.
So it looks like you used an incorrect classification key.
Co-authored-by: Vince Knight <[email protected]>
Co-authored-by: Vince Knight <[email protected]>
I tried again and it doesn't seem to work. It looks like the test is failing because of test coverage, but when I added some more tests, it still fails! |
You're right, it's coverage but there are also some tests that are failing. Coverage From the log:
Line 53 is not being hit when running the tests:
That implies that we don't have a test which checks this specific set of conditions. Test failures There are some remaining tests that are not passing. One of them is for example:
I believe this is because you have not reset all the attributes in the rest method:
should be:
although I think that you could remove the method completely and it will use the parent class There are a few other failures that are in the doctests but also some more in the unit tests that I'd need to look at a bit more closely. You might find running the tests locally helpful so that you can iterate this a bit more quickly. There is some information on doing that here: https://axelrod.readthedocs.io/en/stable/how-to/contributing/running_tests.html For example to just run the test file for your strategy you could run:
|
Was unable to run
python rebuild_classifier_table.py
due to network issues, but the rest should be correct. I created adaptive_cooperator.py, test_adaptive_cooperator.py, made changes to the doctest, references, and _strategy.py.