X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2FSampleAgents.py;h=b7fd49ddbec232c9eab8c46f323987de45605f66;hb=096c5a1586137638164557da4d2f18679d7236a4;hp=6da30bad46771565276ccb0986ac7e70684ce1fd;hpb=e9a8105a8f22404f4ac550d79954eaa6b7f5d8ff;p=progcomp10.git diff --git a/src/SampleAgents.py b/src/SampleAgents.py index 6da30ba..b7fd49d 100644 --- a/src/SampleAgents.py +++ b/src/SampleAgents.py @@ -56,8 +56,9 @@ class Streetfighter (BaseAgent): # This is our first bot with any sort of learning capability, based on the LearningAgent base. # Experienced programmers might opt to write their own learning code based on BaseAgent, but it's up to you. -# Frenchie is a simple bot that is by default nice but will permanently turn against any agent that betrays it. -class Frenchie (LearningAgent): +# Wash is a simple bot that is by default nice but will permanently turn against any agent that betrays it. +# "Curse your suddent but inevitable betrayal" - Wash (Firefly) +class Wash (LearningAgent): def Attack (self, foe): attack = RandomAttack () if Loss in LearningAgent.GetWinHistory (self, foe): @@ -69,7 +70,7 @@ class Frenchie (LearningAgent): return attack, bluff def Defend (self, foe, bluff): if Loss in LearningAgent.GetWinHistory (self, foe): - if bluff == Rock: attack = Scissors # They've fucked us in the past, + if bluff == Rock: attack = Scissors # They've screwed us in the past, elif bluff == Paper: attack = Rock # so we assume they're lying and else: attack = Paper # hoping we go for a kill. else: