-
Notifications
You must be signed in to change notification settings - Fork 269
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 strategies TF1, TF2, and TF3 #1036
Conversation
OK, I'll bite. What does the 'TF' stand for? |
Trained FSM (finite state machine): they're the 3 strategies trained for the moran paper :) |
|
||
Names: | ||
|
||
- TF1: Original name by Marc Harper |
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.
We should remember to include the moran paper as a reference for this once we have a title etc...
Aha! I hadn't made the connection between 'F' and 'FSM.' Must be time for further coffee.... |
} | ||
|
||
def test_strategy(self): | ||
self.first_play_test(C) |
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.
As a regression test could you include a 5 turn play against alternator? (Same for the other 2)
name = "TF1" | ||
player = axelrod.TF1 | ||
expected_classifier = { | ||
'memory_depth': 16, |
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.
Memory depth is infinite.
name = "TF2" | ||
player = axelrod.TF2 | ||
expected_classifier = { | ||
'memory_depth': 16, |
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.
Memory depth is infinite.
name = "TF3" | ||
player = axelrod.TF3 | ||
expected_classifier = { | ||
'memory_depth': 8, |
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.
Memory depth is infinite.
|
||
name = "TF3" | ||
classifier = { | ||
'memory_depth': 8, # Estimate |
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.
float('inf')
(explanation: Axelrod-Python/axelrod-moran#42).
|
||
name = "TF2" | ||
classifier = { | ||
'memory_depth': 16, # Estimate |
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.
float('inf')
(not an estimate)
|
||
name = "TF1" | ||
classifier = { | ||
'memory_depth': 16, # Estimate |
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.
float('inf')
and no need for estimate: it has a handshake.
(2, C, 14, D), (2, D, 9, D), | ||
(3, C, 0, C), (3, D, 1, D), | ||
(4, C, 1, D), (4, D, 2, D), | ||
# (5, C, 12, C), (5, D, 6, C), |
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.
I confirm these aren't reachable. Do we want to remove them (as opposed to having them commented out)?
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.
I left them in for historical reference, I guess it doesn't really matter since they are impossible states.
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.
Perhaps add another line comment saying: # Unreachable states
?
I'm not overly bothered just trying to think of whether or not this will confuse future us.
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 took them out. They are in the Moran repository if we ever need them for any reason.
Added tests and updated memory_depths |
Closes #884 |
Trained strategies used in the Moran paper.