-
Notifications
You must be signed in to change notification settings - Fork 264
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
Adding contrite TfT #639
Adding contrite TfT #639
Conversation
The test checks that the reset method changes the value of the state.
Is there a better way of doing this?
Tests fail here as I have a test that identifies a bug: #637 Working on a fix :) TODO: Still need actual tests of the strategy
if not opponent.history: | ||
return C | ||
|
||
# If contrite and but managed to cooperate: apologise. |
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.
Just a typo in the comment - 'and but'
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.
Fixing now :)
You could just make a new instance:
The prefix is there to prevent overwriting the original class; in this case it doesn't matter but it may in other contexts. I'd prefer to leave the default with some prefix. Actually, the transformer is supposed to take a name_prefix parameter:
so that the following would work:
but as you can see it's not implemented properly. |
Thanks: have fixed that using your suggestion.
Me too, I like having the prefix. Would be great to be able to pass the prefix (or |
Have opened #642 |
Closes #636
A strategy that plays like TfT if there is no noise. If there is noise and it defects because of noise (intending to cooperate), if the opponent cooperates but defects as a result of the noisy defection then it cooperates to try and bring back mutual cooperation.
Wasn't sure if there was a better way to handling the renaming from the
TrackHistoryTransformer
(without my change it adds a prefix to the strategy)?Note that this is on top of #638 (as it needed that fix to work for the 'reduce to tft' test to work).