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

Retains history classifier #1336

Open
marcharper opened this issue Apr 21, 2020 · 2 comments
Open

Retains history classifier #1336

marcharper opened this issue Apr 21, 2020 · 2 comments

Comments

@marcharper
Copy link
Member

In the course of #1288 I added a test for Match reproducibility given a random seed. The strategy Darwin fails this test because it retains history at the class level. While this is an exception now, it's easy to imagine future games or variations that would intentionally retain history (in a way that's not considered cheating). So perhaps it makes sense to have a classifier field for "retains_history".

@marcharper
Copy link
Member Author

marcharper commented Apr 21, 2020

This is the (failing) test:

    def test_reproducibility_of_play(self):
        player = self.player()
        player_clone = player.clone()
        coplayer = axl.Random(0.5)
        coplayer_clone = coplayer.clone()
        m1 = axl.Match((player, coplayer), turns=10, seed=10)
        m2 = axl.Match((player_clone, coplayer_clone), turns=10, seed=10)
        m1.play()
        m2.play()
        self.assertEqual(m1.result, m2.result)`

I realize now this test is quite similar to the existing test_clone which excludes Darwin and Human, nevertheless perhaps the classifier still makes sense.

@drvinceknight
Copy link
Member

So perhaps it makes sense to have a classifier field for "retains_history".

Sounds good to me 👍

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

No branches or pull requests

2 participants