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

Soft tf2t: rebase #650

Closed
wants to merge 5 commits into from
Closed

Soft tf2t: rebase #650

wants to merge 5 commits into from

Conversation

marcharper
Copy link
Member

Hi @ranjinidas : I rebased your branch onto the latest master so that it is easier for us to review. We'll also need to add some tests, but we can take care of that if needed.

@drvinceknight
Copy link
Member

Unless I'm misunderstanding the strategy you have written is already implemented as TitFor2Tats: https://github.com/Axelrod-Python/Axelrod/blob/master/axelrod/strategies/titfortat.py#L40

Is that right @ranjinidas ?

if len(self.history) == 0:
return C

if opponent.history[-2] == [D, D]:
Copy link
Member

Choose a reason for hiding this comment

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

I think you wanted this to be opponent.history[-2:] == [D, D] so that it sliced the list. Otherwise opponent.history[-2] is just the second from last element which would either be C or D.

@drvinceknight
Copy link
Member

If you'd like a hand at all feel free to jump in to the chat room here: https://gitter.im/Axelrod-Python/Axelrod

There's usually a couple of us around and we're happy to help :)

@ranjinidas
Copy link
Member

Hi Vince and Marc,

Thanks for your replies! I didn't realize Tit for Two Tats and Slow Tit for
Two Tats were two different things. It was open in the Desired New
Strategies Issue, but thanks for letting me now!

I'm a beginner in Python and OSS, and I will try again with another
strategy, but thank you for being so supportive.

Best,
Ranjini

On Wed, Jul 6, 2016 at 10:24 AM, Vince Knight [email protected]
wrote:

If you'd like a hand at all feel free to jump in to the chat room here:
https://gitter.im/Axelrod-Python/Axelrod

There's usually a couple of us around and we're happy to help :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#650 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AO-Ia5SHNyhA4dG3ITG-6SYCgmF37JyNks5qS7qhgaJpZM4JGH9f
.

@drvinceknight
Copy link
Member

As far as I can tell soft tit for two tats isn't there but slow tit for 2 tats is and is defined as:

Plays [c,c], then if opponent plays two consecutive time the same move plays its move.

Looking through your commits, it looks like you started writing this strategy here: d4dbe8a (you can click on that) but then you changed it here: 3ee3876 to become tit for 2 tats.

I'm a beginner in Python and OSS, and I will try again with another
strategy, but thank you for being so supportive.

I think implementing slow tit for 2 tats is probably a good choice of strategy :) We're happy to help out :)

@ranjinidas
Copy link
Member

@drvinceknight Thanks for the feedback. :) I'll go back to working on that strategy.

@drvinceknight
Copy link
Member

Closing this as it's superseded by #659 (we can always open it again if need be).

@marcharper marcharper deleted the soft_tf2t branch August 20, 2016 22:12
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.

4 participants