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

Noise not working for spatial match tournaments #673

Closed
drvinceknight opened this issue Jul 31, 2016 · 0 comments · Fixed by #679
Closed

Noise not working for spatial match tournaments #673

drvinceknight opened this issue Jul 31, 2016 · 0 comments · Fixed by #679
Labels

Comments

@drvinceknight
Copy link
Member

The Tournament class takes a noise parameter but this is not passed to the corresponding match generator.

Here we see that the last parameter is 0 (it should be .5, the noise):

>>> players = [s() for s in axl.demo_strategies]
>>> edges = [(i, i + 1) for i in range(len(players) - 1)]
>>> tournament = axl.SpatialTournament(players=players, turns=5, edges=edges, noise=.5)
>>> params = tournament.match_generator.build_single_match_params()
>>> params
(5, Axelrod game: (R,P,S,T) = (3, 1, 0, 5), None, 0)

Here is the corresponding code for a Round Robin:

>>> players = [s() for s in axl.demo_strategies]
>>> tournament = axl.Tournament(players=players, turns=5, noise=.5)
>>> params = tournament.match_generator.build_single_match_params()
>>> params
(5, Axelrod game: (R,P,S,T) = (3, 1, 0, 5), None, 0.5)

It should be a straight forward fix (just adding a test and making sure the argument is passed properly to the generator).

@Nikoleta-v3 would you like to fix this (I'm happy to if you're busy)?

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

Successfully merging a pull request may close this issue.

2 participants