Skip to content

Conversation

@Nikoleta-v3
Copy link
Member

@Nikoleta-v3 Nikoleta-v3 commented Nov 13, 2019

Hello everyone,

While working on one of my projects I realised that the strategy Fool Me Forever, which is an original strategy implemented within the library, is actually the same as the strategy EasyGo from
Prison1998 and Li2011.

Source code for Fool me Forever (link to source code here):

    @staticmethod
    def strategy(opponent: Player) -> Action:
        if opponent.defections > 0:
            return C
        return D

Source code for EasyGo (link to source code here):

    @staticmethod
    def strategy(opponent: Player) -> Action:
        """Begins by playing D, then plays C for the remaining rounds if the
        opponent ever plays D."""
        if opponent.defections:
            return C
        return D

The code snippets, the Ashlock fingerprints for both strategies and their performance in the Axelrod-Python standard tournament (result csv: https://github.com/Axelrod-Python/tournament/blob/gh-pages/assets/std_summary.csv) are the same.

fool_me_forever

easygo

This pr removes Fool me Forever (because it's an original strategy), the imports and tests associated with it. Let me know if it's okay and if there is something I forgot to do 👍

@Nikoleta-v3
Copy link
Member Author

I saw the failure 👍 fixing it now

@marcharper
Copy link
Member

Nice catch :)

NMWELongMemory creates a team from strategies
within the library. Fool Me Forever was part of
the team and by removing it the behaviour
of the strategy changed. The strategy is stochastic
and with the right seed we can recreate the expected
behaviour for the test to pass.
@marcharper
Copy link
Member

marcharper commented Nov 14, 2019

Since we've mentioned FoolMeForever in our publications we should mark it as an alternative name for EasyGo in its docstring.

Copy link
Member

@drvinceknight drvinceknight left a comment

Choose a reason for hiding this comment

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

Thanks @Nikoleta-v3 👍

@marcharper marcharper merged commit c669a93 into Axelrod-Python:master Nov 14, 2019
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.

3 participants