Skip to content

Commit

Permalink
Fix noise in spatial tournaments.
Browse files Browse the repository at this point in the history
  • Loading branch information
drvinceknight committed Aug 4, 2016
1 parent f9aeafd commit 491f3fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions axelrod/match_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@ class SpatialMatches(RoundRobinMatches):
A list of tuples containing the existing edges
"""

def __init__(self, players, turns, game, repetitions, edges):
def __init__(self, players, turns, game, repetitions, edges, noise=0):

if not graph_is_connected(edges, players):
raise ValueError("The graph edges do not include all players.")
self.edges = edges
super(SpatialMatches, self).__init__(players, turns, game, repetitions)
super(SpatialMatches, self).__init__(players, turns, game, repetitions,
noise)

def build_match_chunks(self):
for edge in self.edges:
Expand Down
2 changes: 1 addition & 1 deletion axelrod/tournament.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def __init__(self, players, edges, match_generator=SpatialMatches,

self.edges = edges
self.match_generator = SpatialMatches(
players, turns, self.game, repetitions, edges)
players, turns, self.game, repetitions, edges, noise)


class ProbEndSpatialTournament(ProbEndTournament):
Expand Down

0 comments on commit 491f3fc

Please sign in to comment.