-
Notifications
You must be signed in to change notification settings - Fork 268
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
Write description/ex of receive_match_attributes
#1128
Conversation
Note we only need to do this when the inputs from the match are used to change some other variable. Some other minor tweaks here: - Remove unneeded data file. This was checked in at some point but shouldn't have been. - Remove outdated documentation about repr. This is now done automatically by the parent class. - Make some minor stylistic changes. - PEP8 (column width) - Change to use class hyperlink instead of code syntax highlighting.
the :code:`Random` strategy takes a parameter :code:`p` for how often it | ||
cooperates, and the :code:`__repr__` method adds the value of this parameter to | ||
the name:: | ||
Some strategies make specific use of the variables of a match to create their |
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.
Maybe a bit more detail here. After:
+Some strategies make specific use of the variables of a match to create their
+own attributes.
Then:
In principle these attributes could change throughout a match or tournament if the match properties (like the game matrix) change, so we require that this logic live in the
the :code:receive_match_attributes
method for correct dynamic updating. Here is how this is done for
+:class:Stalker <axelrod.strategies.stalker.Stalker>
:
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! 👍
b626fa6
to
9ae4307
Compare
@@ -24,7 +24,7 @@ script: | |||
- cd docs; make html | |||
# Run the test suit with coverage | |||
- cd .. | |||
- travis_wait 30 coverage run --source=axelrod -m unittest discover | |||
- travis_wait 60 coverage run --source=axelrod -m unittest discover |
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.
Maybe we should work on decreasing the time it takes all the tests to run
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.
Maybe we should work on decreasing the time it takes all the tests to run
That was mainly the purpose of the work I did on #1121.
There I reduced the test runs times on travis - where it's very long - from approx 40 mins to approx 20 mins. (Note that locally the full test suite takes about 10 mins on my small laptop - similar on appveyor.)
Just now it failed on a timeout which would have just been a random event. The 30 minute limit was arbitrary there's no reason not to increase it to 60. It hadn't timed out for a while since #1121 (before that it was essentially timing out every other run) but we'll keep an eye on it.
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.
That was mainly the purpose of the work I did on #1121.
(Just in case you only read the title of that issue, the rest of the comments there detail the work I went through minimising test suite run time and why I did it there. 👍)
Note we only need to do this when the inputs from the match are used to
change some other variable.
Some other minor tweaks here:
This was checked in at some point but shouldn't have been.
This is now done automatically by the parent class.