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

Specific strategy: Graaskamp #1109

Closed
drvinceknight opened this issue Aug 4, 2017 · 9 comments
Closed

Specific strategy: Graaskamp #1109

drvinceknight opened this issue Aug 4, 2017 · 9 comments

Comments

@drvinceknight
Copy link
Member

drvinceknight commented Aug 4, 2017

This strategy is one of the strategies from Axelrod's first tournament. It is described here http://axelrod.readthedocs.io/en/stable/reference/overview_of_strategies.html#graaskamp as:

  1. Play Tit For Tat for the first 50 rounds;
  2. Defects on round 51;
  3. Plays 5 further rounds of Tit For Tat;
  4. A check is then made to see if the opponent is playing randomly in which case it defects for the rest of the game;
  5. The strategy also checks to see if the opponent is playing Tit For Tat or another strategy from a preliminary tournament called ‘Analogy’. If so it plays Tit For Tat. If not it cooperates and randomly defects every 5 to 15 moves.

Step 4 can be implemented using a chi squared test similarly to the Stein and Rapaport strategy which is implemented here: https://github.com/Axelrod-Python/Axelrod/blob/master/axelrod/strategies/axelrod_first.py#L496

Step 5 is a bit tricky as it refers to a strategy called "Analogy". I have not been able to find any information describing this strategy. I suggest that anyone who tries to work on this does their best to find that information but if there is non available let us simply ignore that part of the check but clearly point that out in the documentation of the strategy.

(Other strategies that we'd like to implement are available here: #379)

Note that this issue was originally at #1051 however that now corresponds to an implementation of a different strategy written by Graaskamp (for Axelrod's second tournament).

@souravsingh
Copy link
Contributor

@drvinceknight I am interested in working on the issue.

@drvinceknight
Copy link
Member Author

That would be great @souravsingh 👍

@souravsingh
Copy link
Contributor

@drvinceknight I have a question- Is this strategy related to the PR at #1115

@drvinceknight
Copy link
Member Author

@drvinceknight I have a question- Is this strategy related to the PR at #1115

No.

That's related to:

Note that this issue was originally at #1051 however that now corresponds to an implementation of a different strategy written by Graaskamp (for Axelrod's second tournament).

@souravsingh
Copy link
Contributor

The description of the strategy looks very similar to what is written here- #1051

@drvinceknight
Copy link
Member Author

#1051 started out as this strategy but has since changed to be about a completely different strategy. That is why this issue has been opened.

Note that this issue was originally at #1051 however that now corresponds to an implementation of a different strategy written by Graaskamp (for Axelrod's second tournament).

@vrishank97
Copy link

vrishank97 commented Sep 13, 2017

I have implemented the strategy upto step 4 and haven't found information on step 5.
Should we omit step 5?
If so should it cooperate and randomly defect every 5 to 15 moves round 58 onwards?

@drvinceknight
Copy link
Member Author

I think we should implement (and clearly document in the docstring) the following change to rule 5:

The strategy also checks to see if the opponent is playing Tit For Tat. If so it plays Tit For Tat. If not it cooperates and randomly defects every 5 to 15 moves.

IE it only checks if the opponent is playing TfT. In which case it responds by paying TfT otherwise it cooperates and randomly defects every 5 to 15 moves. I suggest that this late part is implemented as:

For the 10 moves that happen every 5 to 15 moves the strategy plays randomly.

@yashaslokesh
Copy link

I've started working on this strategy, this would be my first contribution to OSS.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants