Skip to content

Commit

Permalink
Merge pull request #784 from theref/docfix
Browse files Browse the repository at this point in the history
Fix docstrings to remove any mention of Dual of Strategy
  • Loading branch information
drvinceknight committed Dec 4, 2016
2 parents d620960 + f93e5df commit 1f4f2d7
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions axelrod/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ def create_edges(points):
edges : list of tuples
A list containing tuples of length 2. All tuples will have 0 as the
first element. The second element is the index of the
corresponding probe (+1 to allow for including the Strategy and its
Dual).
corresponding probe (+1 to allow for including the Strategy).
"""
edges = [(0, index + 1) for index, point in enumerate(points)]
return edges
Expand Down Expand Up @@ -134,12 +133,11 @@ def construct_tournament_elements(self, step):
edges : list of tuples
A list containing tuples of length 2. All tuples will have either 0
or 1 as the first element. The second element is the index of the
corresponding probe (+2 to allow for including the Strategy and its
Dual).
corresponding probe (+1 to allow for including the Strategy).
tournament_players : list
A list containing instances of axelrod.Player. The first item is the
original player, the second is the dual, the rest are the probes.
original player, the rest are the probes.
"""
probe_points = create_points(step)
Expand Down Expand Up @@ -168,8 +166,7 @@ def generate_data(interactions, points, edges):
edges : list of tuples
A list containing tuples of length 2. All tuples will have either 0
or 1 as the first element. The second element is the index of the
corresponding probe (+2 to allow for including the Strategy and its
Dual).
corresponding probe (+1 to allow for including the Strategy).
Returns
----------
Expand All @@ -186,10 +183,11 @@ def fingerprint(self, turns=50, repetitions=10, step=0.01, processes=None,
filename=None, in_memory=False, progress_bar=True):
"""Build and play the spatial tournament.
Creates the probes and their edges then builds a spatial tournament
where the original strategy only plays probes whose coordinates sum to
less than 1 (or equal). Probes whose coordinates sum to more than 1 play
the Dual Strategy.
Creates the probes and their edges then builds a spatial tournament.
When the coordinates of the probe sum to more than 1, the dual of the
probe is taken instead and then the Joss-Ann Transformer is applied. If
the coordinates sum to less than 1 (or equal), then only the Joss-Ann is
applied, a dual is not required.
Parameters
----------
Expand Down

0 comments on commit 1f4f2d7

Please sign in to comment.