Skip to content

Commit 1027320

Browse files
committed
Remove noise parameter from making tournament doc
1 parent a75b0a0 commit 1027320

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/tutorials/advanced/making_tournaments.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To do this let us create a new class to generate matches::
2222
>>> class StochasticMatchups(axl.RoundRobinMatches):
2323
... """Inherit from the `axelrod.match_generator.RoundRobinMatches` class"""
2424
...
25-
... def build_match_chunks(self, noise=0):
25+
... def build_match_chunks(self):
2626
... """
2727
... A generator that yields match parameters only with a given probability.
2828
...
@@ -32,7 +32,7 @@ To do this let us create a new class to generate matches::
3232
... for player1_index in range(len(self.players)):
3333
... for player2_index in range(player1_index, len(self.players)):
3434
... if random.random() < 0.5: # This is the modification
35-
... match_params = self.build_single_match_params(noise)
35+
... match_params = self.build_single_match_params()
3636
... index_pair = (player1_index, player2_index)
3737
... yield (index_pair, match_params, self.repetitions)
3838

@@ -75,12 +75,12 @@ builds matches that were either 200 turns or single 1 shot games::
7575
... """Inherit from the `axelrod.match_generator.RoundRobinMatches` class"""
7676
...
7777
...
78-
... def build_single_match_params(self, noise=0):
78+
... def build_single_match_params(self):
7979
... """Create a single set of match parameters"""
8080
... turns = 1
8181
... if random.random() < 0.5:
8282
... turns = 200
83-
... return (turns, self.game, None, noise)
83+
... return (turns, self.game, None, self.noise)
8484

8585
We can take a look at the match lengths when using this generator::
8686

0 commit comments

Comments
 (0)