Skip to content

Commit 21bb19e

Browse files
kjurgielajtismarcharper
authored andcommitted
Fixed indentation and classifier
1 parent ed5cc2e commit 21bb19e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

axelrod/strategies/axelrod_first.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class Graaskamp(Player):
228228

229229
name = "Graaskamp"
230230
classifier = {
231-
"memory_depth": 1,
231+
"memory_depth": float("inf"),
232232
"stochastic": True,
233233
"makes_use_of": set(),
234234
"long_run_time": False,
@@ -269,7 +269,7 @@ def strategy(self, opponent: Player) -> Action:
269269

270270
if self.opponent_is_random:
271271
return D
272-
elif all(opponent.history[i] == self.history[i - 1] for i in range(1, len(self.history + 1))):
272+
elif all(opponent.history[i] == self.history[i - 1] for i in range(1, len(self.history))):
273273
# Check if opponent plays Tit for Tat
274274
if opponent.history[-1] == D:
275275
return D
@@ -278,7 +278,7 @@ def strategy(self, opponent: Player) -> Action:
278278
if len(self.history) == self.next_random_defection_turn:
279279
self.next_random_defection_turn = random.randint(5, 15) + len(self.history) # resample the next defection turn
280280
return D
281-
return C
281+
return C
282282

283283

284284
class Grofman(Player):

0 commit comments

Comments
 (0)