Skip to content

Commit 491f3fc

Browse files
committed
Fix noise in spatial tournaments.
1 parent f9aeafd commit 491f3fc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

axelrod/match_generator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,13 @@ class SpatialMatches(RoundRobinMatches):
216216
A list of tuples containing the existing edges
217217
"""
218218

219-
def __init__(self, players, turns, game, repetitions, edges):
219+
def __init__(self, players, turns, game, repetitions, edges, noise=0):
220220

221221
if not graph_is_connected(edges, players):
222222
raise ValueError("The graph edges do not include all players.")
223223
self.edges = edges
224-
super(SpatialMatches, self).__init__(players, turns, game, repetitions)
224+
super(SpatialMatches, self).__init__(players, turns, game, repetitions,
225+
noise)
225226

226227
def build_match_chunks(self):
227228
for edge in self.edges:

axelrod/tournament.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def __init__(self, players, edges, match_generator=SpatialMatches,
380380

381381
self.edges = edges
382382
self.match_generator = SpatialMatches(
383-
players, turns, self.game, repetitions, edges)
383+
players, turns, self.game, repetitions, edges, noise)
384384

385385

386386
class ProbEndSpatialTournament(ProbEndTournament):

0 commit comments

Comments
 (0)