X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=agents%2Fvixen%2Fvixen.py;h=975f6a79420033bec910c8c02eecd2d4f5f9e8bc;hp=3aa47cb8d14c0882b7d426706a059595068b56ca;hb=168375bf0ab8b7745886c39ca9cbe5f11219714f;hpb=1a03b2543b67f0551e62babec4cd119f1e0e4640 diff --git a/agents/vixen/vixen.py b/agents/vixen/vixen.py index 3aa47cb..975f6a7 100755 --- a/agents/vixen/vixen.py +++ b/agents/vixen/vixen.py @@ -28,9 +28,9 @@ class Vixen(BasicAI): #self.bombScores = {'1' : -0.9 , '2' : -0.8 , '3' : -0.5 , '4' : 0.1, '5' : 0.1, '6' : 0.3, '7' : 0.7, '8' : 1 , '9' : 0.6, 's' : 0} #self.bombScores = {'1' : -0.9 , '2' : -0.8 , '3' : -0.5 , '4' : -0.5, '5' : -0.4, '6' : -0.5, '7' : -0.2, '8' : 1.0 , '9' : -0.1, 's' : -0.2} - self.suicideScores = {'1' : -0.5 , '2' : -0.4 , '3' : -0.35, '4' : -0.25, '5' : -0.2, '6' : 0.0, '7' : 0.1, '8' : -1.0 , '9' : 0.0, 's' : -0.4} + self.suicideScores = {'1' : -0.8 , '2' : -0.6 , '3' : -0.5, '4' : -0.25, '5' : -0.2, '6' : 0.0, '7' : 0.1, '8' : -1.0 , '9' : 0.0, 's' : -0.4} self.killScores = {'1' : 1.0 , '2' : 0.9 , '3' : 0.9 , '4' : 0.8, '5' : 0.8, '6' : 0.8, '7' : 0.8, '8' : 0.9 , '9' : 0.7, 's' : 1.0} - self.riskScores = {'1' : 0.0, '2' : 0.1, '3' : 0.2, '4': 0.4, '5': 0.6, '6': 0.7, '7':0.8, '8': 0.0, '9' : 1.0, 's' : 0.1} + self.riskScores = {'1' : -0.3, '2' : -0.3, '3' : 0.0, '4': 0.4, '5': 0.6, '6': 0.7, '7':0.8, '8': 0.0, '9' : 1.0, 's' : 0.1} @@ -67,9 +67,9 @@ class Vixen(BasicAI): moveList.sort(key = lambda e : e["score"], reverse=True) #sys.stderr.write("vixen - best move: " + str(moveList[0]["unit"].x) + " " + str(moveList[0]["unit"].y) + " " + moveList[0]["direction"] + " [ score = " + str(moveList[0]["score"]) + " ]\n") - if moveList[0]["score"] == 0: - print "NO_MOVE" - return True + #if moveList[0]["score"] == 0: + # print "NO_MOVE" + # return True print str(moveList[0]["unit"].x) + " " + str(moveList[0]["unit"].y) + " " + moveList[0]["direction"] @@ -132,7 +132,7 @@ class Vixen(BasicAI): if attackerRank == '8': return 1.0 else: - return 0.0 + return self.suicideScore(attackerRank) def suicideScore(self, attackerRank): return self.suicideScores[attackerRank]