Skip to content
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

Merged
merged 4 commits into from
Jun 1, 2017
Merged

Add strategies TF1, TF2, and TF3 #1036

merged 4 commits into from
Jun 1, 2017

Conversation

marcharper
Copy link
Member

Trained strategies used in the Moran paper.

@meatballs
Copy link
Member

OK, I'll bite. What does the 'TF' stand for?

@drvinceknight
Copy link
Member

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
Copy link
Member

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...

@meatballs
Copy link
Member

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)
Copy link
Member

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,
Copy link
Member

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,
Copy link
Member

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,
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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),
Copy link
Member

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)?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

@marcharper
Copy link
Member Author

Added tests and updated memory_depths

@drvinceknight
Copy link
Member

Closes #884

@drvinceknight drvinceknight merged commit 1d34818 into master Jun 1, 2017
@drvinceknight drvinceknight deleted the tfx branch June 1, 2017 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants