Oh god, I was assuming scores were integers
[progcomp2012.git] / judge / simulator / simulate.py
index d8db775..7664a2c 100755 (executable)
@@ -206,7 +206,7 @@ for agent in agents:
                                agentFile.write(line)
                                line = oldFile.readline()
                                values = line.split(' ')
                                agentFile.write(line)
                                line = oldFile.readline()
                                values = line.split(' ')
-                               agent["totalScore"] += int(values[2].strip())
+                               agent["totalScore"] += float(values[2].strip())
                                agent["Wins"] += int(values[5].strip())
                                agent["Losses"] += int(values[8].strip())
                                agent["Draws"] += int(values[11].strip())
                                agent["Wins"] += int(values[5].strip())
                                agent["Losses"] += int(values[8].strip())
                                agent["Draws"] += int(values[11].strip())
@@ -258,7 +258,8 @@ for roundNumber in range(totalRounds, totalRounds + nRounds):
                                logFile = logDirectory + "round"+str(roundNumber) + "/"+red["name"]+".vs."+blue["name"]+"."+str(gameID)
                                errorLog = [logDirectory + "error/" + red["name"] + "."+str(gameID), logDirectory + "error/" + blue["name"] + "."+str(gameID)]
                                #Run the game, outputting to logFile; stderr of (both) AI programs is directed to logFile.stderr
                                logFile = logDirectory + "round"+str(roundNumber) + "/"+red["name"]+".vs."+blue["name"]+"."+str(gameID)
                                errorLog = [logDirectory + "error/" + red["name"] + "."+str(gameID), logDirectory + "error/" + blue["name"] + "."+str(gameID)]
                                #Run the game, outputting to logFile; stderr of (both) AI programs is directed to logFile.stderr
-                               outline = os.popen(managerPath + " -o " + logFile + " -T " + str(timeoutValue) + " \"" + red["path"] + "\" \"" + blue["path"] + "\" 2>> " + logFile+".stderr", "r").read()
+                               outline = os.popen(managerPath + " -m 1000 -o " + logFile + " -T " + str(timeoutValue) + " \"" + red["path"] + "\" \"" + blue["path"] + "\" 2>> " + logFile+".stderr", "r").read()
+                               
                                #os.system("mv tmp.mp4 " + logFile + ".mp4")
                                
                                #If there were no errors, get rid of the stderr file
                                #os.system("mv tmp.mp4 " + logFile + ".mp4")
                                
                                #If there were no errors, get rid of the stderr file

UCC git Repository :: git.ucc.asn.au