Skip to content

Commit

Permalink
Fix memory depth bug revealed by test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcharper committed Feb 6, 2019
1 parent f027f93 commit 49eda27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion axelrod/strategies/shortmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ShortMem(Player):

name = "ShortMem"
classifier = {
"memory_depth": 10,
"memory_depth": float('inf'),
"stochastic": False,
"makes_use_of": set(),
"long_run_time": False,
Expand Down
1 change: 1 addition & 0 deletions axelrod/tests/strategies/test_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ def test_memory_depth_upper_bound(self, strategies, seed, turns):
memory = player.classifier["memory_depth"]
if memory < float("inf"):
for strategy in strategies:
player.reset()
opponent = strategy()
self.assertTrue(
test_memory(
Expand Down
2 changes: 1 addition & 1 deletion axelrod/tests/strategies/test_shortmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
C, D = axelrod.Action.C, axelrod.Action.D


class TestCooperator(TestPlayer):
class TestShortMem(TestPlayer):

name = "ShortMem"
player = axelrod.ShortMem
Expand Down

0 comments on commit 49eda27

Please sign in to comment.