Skip to content

Commit 2114177

Browse files
RomeroLauradrvinceknight
authored andcommitted
changed SpitefulCC classifier and added strategy description
1 parent 961ee9e commit 2114177

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
@@ -325,7 +325,6 @@ class SpitefulCC(Player):
325325
classifier = {
326326
"memory_depth": float("inf"), # Long memory
327327
"stochastic": False,
328-
"makes_use_of": set(),
329328
"long_run_time": False,
330329
"inspects_source": False,
331330
"manipulates_source": False,
@@ -334,6 +333,10 @@ class SpitefulCC(Player):
334333

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

0 commit comments

Comments
 (0)