-
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
fixed the rock-paper-scissors docs example #1419
Conversation
Not actually sure what's causing the sphinx failure on read the docs. Here's the stack trace:
I believe this is fixed here: readthedocs/readthedocs.org#10290. Will open a PR (hopefully) a fix to your branch @alexhroom. |
This is to fix a build problem that surfaced on Axelrod-Python#1419
I've opened alexhroom#1 |
Add a read the docs config file.
@drvinceknight looks like it's working - i also had to add numpy to the doc requirements.txt since it isn't being mocked. |
I'm still not convinced we want this to be true -- it feels like a type mismatch. axl.action.D could reasonably equal RPSAction.S as well (being the last play rather than the second play). We're forcing a specific permutation of the actions for not a lot of benefit IMO. Regardless of the mapping chosen, a 2x2 player like TFT may be able to technically play a game of higher dimension, but only in a degenerate way (restricted to a subset of actions). I don't see that this is really useful, other than perhaps refactoring some of the (degenerate) pure strategies like Cooperator and Defector to be more generic. |
@marcharper it matters a lot less now we've got a better idea on how we're going to redesign/refactor strategies - i'll leave this for now and create a separate PR just with the RTD fix. |
Fixes a mistake in the doc page added by #1413 - it turns out that strategies can recognise actions from different games corresponding to the same row/column, so long as both of the
Action
classes have a total ordering. That is:Using the example code from before this PR:
axl.rockpaperscissors.RPSAction.P == axl.Action.D
->False
After this PR:
axl.rockpaperscissors.RPSAction.P == axl.Action.D
->True
This is good news for the interoperability of different games! :)