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

Added Slow TF2T #659

Merged
merged 9 commits into from
Jul 16, 2016
Merged

Added Slow TF2T #659

merged 9 commits into from
Jul 16, 2016

Conversation

ranjinidas
Copy link
Member

Corrected strategy from last pull request.


name = 'Slow Tit For Two Tats'
classifier = {
'memory_depth': 2, # Four-Vector = (1.,0.,1.,0.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The # Four-Vector = (1., 0., 1., 0.) isn't needed anymore.

@drvinceknight
Copy link
Member

This is looking good @ranjinidas! Thanks!

We're still missing a couple of tests, we'd be happy to help:

  1. Would you like to do this yourself?
  2. Would you like one of us to walk you through it?
  3. Would you like one of us to do it?

Whatever you would prefer :)

Also, as a side note. I think (although I'm not sure) the errors you were having might have been because the doctests failed half way through and there were some files written that were not deleted... That's just a hunch though: they all passed fine on travis (a system hooked in to github that runs the test suite for every PR).


class SlowTitForTwoTats(Player):
"""
A player that plays [c,c], then if the opponent plays the same move twice,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we write "A player that plays C twice, ...". This is not terribly important: just looks nicer to me :)

@ranjinidas
Copy link
Member Author

Hi @drvinceknight, thanks for reviewing this! I have a test written but can check with you or someone else on Gitter before adding it in.

@drvinceknight
Copy link
Member

Awesome: I'm online now if that's helpful :)


def strategy(self, opponent):
#Play [c, c]
if len(self.history)<2:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny bit of PEP8:

if len(self.history) < 2:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this in! Thanks!

@drvinceknight
Copy link
Member

This looks great to me! 👍

I've left one very minor PEP8 comment. We have a two core dev review policy so once one of the others has taken a look (and possibly added their own comments etc) this will go in :) Thanks a lot for working on this.


def strategy(self, opponent):

#Play [c, c]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Start with two cooperations

@marcharper
Copy link
Member

Looks good to me, we can sweep up any PEP8 issues sometime later.

@marcharper marcharper merged commit ed8798a into Axelrod-Python:master Jul 16, 2016
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

4 participants