Skip to content

Commit 913c5ad

Browse files
committed
Merge branch 'add-custom-matches' of github.com:Axelrod-Python/Axelrod into add-custom-matches
2 parents 132ec54 + cb3e5c7 commit 913c5ad

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

axelrod/tests/unit/test_moran.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ def test_different_game(self):
193193
self.assertEqual(mp.winning_strategy_name, str(p1))
194194

195195
def test_different_match(self):
196-
# Using a different game where the scores are all the same
197-
# This is a test to mainly show that the results are different to the
198-
# results of `test_different_game` where the same seed is used.
196+
"""Test alternative Match class, mainly to show that the results are different
197+
than the results of `test_different_game` where the same seed is used."""
198+
# Using a different game where the scores are all constant
199199
class StandInMatch(axl.Match):
200200
"""A Match were all players get a score of 3"""
201201

docs/how-to/use_custom_matches.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Use custom matches
44
==================
55

6-
At present it is possible to use a custom match class in a Moran process. Below
6+
The Moran process supports custom match classes. Below
77
creates a new class of a match where both players end with a score of 2::
88

99

@@ -13,8 +13,8 @@ creates a new class of a match where both players end with a score of 2::
1313
... def final_score_per_turn(self):
1414
... return 2, 2
1515

16-
We can now create a Moran process like we normally would and pass our custom
17-
:code:`MassBaseMatch` to the moran process with the :code:`match_class` keyword
16+
We then create a Moran process with the custom match class by passing our custom
17+
:code:`MassBaseMatch` to the Moran process with the :code:`match_class` keyword
1818
argument::
1919

2020
>>> players = [axl.Cooperator(), axl.Defector(), axl.TitForTat(), axl.Grudger()]

docs/tutorials/creating_heterogenous_player_moran_process/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _create-heterogeneous-moran-processes:
22

3-
Create heterogeneous Moran Processes
3+
Create Heterogeneous Moran Processes
44
====================================
55

66
Axelrod Matches are homogeneous by nature but can be extended to utilize
@@ -16,7 +16,7 @@ This is equivalent in principle to the country masses discussed in
1616

1717
>>> import axelrod as axl
1818
>>> players = [player() for player in axl.demo_strategies]
19-
>>> masses = [1 * i for i in range(len(players))]
19+
>>> masses = [i for i in range(len(players))]
2020
>>> players
2121
[Cooperator, Defector, Tit For Tat, Grudger, Random: 0.5]
2222

@@ -60,6 +60,6 @@ process that keeps the mass of the individuals constant::
6060
Random: 0.5
6161

6262
Note that the snippets here only influence the final score of matches. The
63-
behavior of matches, and moran processes can be more heavily influenced by
63+
behavior of matches, and Moran processes can be more heavily influenced by
6464
partially overwriting other :code:`match` functions or :code:`birth` and
6565
:code:`death` functions within :code:`MoranProcess`.

0 commit comments

Comments
 (0)