-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add SlowTitForTwoTats2 Strategy #926
Conversation
Strategy from PRISON(1998) that plays C twice for opening. If opponent plays same move twice in a row, the player mimics that move, otherwise just plays it's previous move.
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 two minor things as far as I can see: this looks great! 👍
axelrod/strategies/titfortat.py
Outdated
if opponent.history[-2] == opponent.history[-1]: | ||
return opponent.history[-1] | ||
|
||
# Otherwise cooperate |
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.
Otherwise play own previous move
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.
Doh! Fixed in newest push.
@@ -75,7 +75,7 @@ | |||
TitForTat, TitFor2Tats, TwoTitsForTat, Bully, SneakyTitForTat, | |||
SuspiciousTitForTat, AntiTitForTat, HardTitForTat, HardTitFor2Tats, | |||
OmegaTFT, Gradual, ContriteTitForTat, SlowTitForTwoTats, AdaptiveTitForTat, | |||
SpitefulTitForTat) | |||
SpitefulTitForTat, SlowTitForTwoTats2) |
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.
You also need to add this strategy to the all_strategies
list in this file.
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.
Should be fixed now.
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.
Looks good to me! Thanks @jtsmith2 :)
Strategy from PRISON(1998) that plays C twice for opening. If opponent plays same move twice in a row, the player mimics that move, otherwise just plays it's previous move.
'slow_tft' from PRISON list in #379