Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix makes_use_of on MindReader #1331

Merged
merged 5 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions axelrod/strategies/mindreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MindReader(Player):
classifier = {
"memory_depth": float("inf"),
"stochastic": False,
"makes_use_of": set(),
"makes_use_of": {"game"},
"long_run_time": False,
"inspects_source": True, # Finds out what opponent will do
"manipulates_source": False,
Expand Down Expand Up @@ -61,7 +61,7 @@ class ProtectedMindReader(MindReader):
classifier = {
"memory_depth": float("inf"),
"stochastic": False,
"makes_use_of": set(),
"makes_use_of": {"game"},
"long_run_time": False,
"inspects_source": True, # Finds out what opponent will do
"manipulates_source": True, # Stops opponent's strategy
Expand Down Expand Up @@ -91,7 +91,7 @@ class MirrorMindReader(ProtectedMindReader):
classifier = {
"memory_depth": float("inf"),
"stochastic": False,
"makes_use_of": set(),
"makes_use_of": {"game"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this one uses the opponent strategy, so whatever the opponent does determines the classifier.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:| Okay, I'm going to revert this back to set(), but I guess there's really not a correct value here.

"long_run_time": False,
"inspects_source": True, # Reads and copies the source of the opponent
"manipulates_source": True, # Changes own source dynamically
Expand Down
6 changes: 3 additions & 3 deletions axelrod/tests/strategies/test_mindreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TestMindReader(TestPlayer):
expected_classifier = {
"memory_depth": float("inf"),
"stochastic": False,
"makes_use_of": set(),
"makes_use_of": {"game"},
"long_run_time": False,
"inspects_source": True,
"manipulates_source": False,
Expand Down Expand Up @@ -101,7 +101,7 @@ class TestProtectedMindReader(TestPlayer):
expected_classifier = {
"memory_depth": float("inf"),
"stochastic": False,
"makes_use_of": set(),
"makes_use_of": {"game"},
"long_run_time": False,
"inspects_source": True, # Finds out what opponent will do
"manipulates_source": True, # Stops opponent's strategy
Expand Down Expand Up @@ -145,7 +145,7 @@ class TestMirrorMindReader(TestPlayer):
expected_classifier = {
"memory_depth": float("inf"),
"stochastic": False,
"makes_use_of": set(),
"makes_use_of": {"game"},
"long_run_time": False,
"inspects_source": True, # reading and copying the source of the component
"manipulates_source": True, # changing own source dynamically
Expand Down