X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=judge%2Fsimulator%2Fsimulate.py;h=72356248527bb7da9142bf5cfc4e1c6117f0d8e6;hp=5daafb7dde7182899d54eb6462fdeb075485930d;hb=9e4bc3c0b49f5e2796a62c8fa91fe0ec78d96af2;hpb=85cfed04e179dad45eefd9fdf747628addbf93fb diff --git a/judge/simulator/simulate.py b/judge/simulator/simulate.py index 5daafb7..7235624 100755 --- a/judge/simulator/simulate.py +++ b/judge/simulator/simulate.py @@ -221,13 +221,16 @@ for roundNumber in range(totalRounds, totalRounds + nRounds): for blue in agents: #against each other agent, playing as blue if red == blue: continue #Exclude battles against self - gameNumber += 1 - gameID = str(roundNumber) + "." + str(gameNumber) + + for i in range(1, nGames/2 + 1): + gameNumber += 1 + gameID = str(roundNumber) + "." + str(gameNumber) #Play a game and read the result. Note the game is logged to a file based on the agent's names if verbose: sys.stdout.write("Agents: \""+red["name"]+"\" and \""+blue["name"]+"\" playing game (ID: " + gameID + ") ... ") 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)] outline = os.popen(managerPath + " -o " + logFile + " -T " + str(timeoutValue) + " " + red["path"] + " " + blue["path"], "r").read() results = outline.split(' ')