Skip to content

Commit 5eb51ab

Browse files
committed
changed SpitefulCC classifier and added strategy description
1 parent 7313236 commit 5eb51ab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

axelrod/strategies/grudger.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ class SpitefulCC(Player):
324324
classifier = {
325325
"memory_depth": float("inf"), # Long memory
326326
"stochastic": False,
327-
"makes_use_of": set(),
328327
"long_run_time": False,
329328
"inspects_source": False,
330329
"manipulates_source": False,
@@ -333,6 +332,10 @@ class SpitefulCC(Player):
333332

334333
@staticmethod
335334
def strategy(opponent: Player) -> Action:
335+
"""
336+
Cooperates until the oponent defects. Then defects forever.
337+
Always cooperates twice at the start.
338+
"""
336339
if len(opponent.history) < 2:
337340
return C
338341
elif opponent.defections:

0 commit comments

Comments
 (0)