small bugfix
authorDaniel Axtens <[email protected]>
Tue, 24 Aug 2010 08:34:58 +0000 (16:34 +0800)
committerDaniel Axtens <[email protected]>
Tue, 24 Aug 2010 08:34:58 +0000 (16:34 +0800)
src/progcomp.xcodeproj/project.pbxproj
src/simulate.py

index ca03935..7d4f271 100644 (file)
@@ -20,6 +20,7 @@
                22CAFEF011D84076001ECDEF /* uccProgComp.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = uccProgComp.py; sourceTree = "<group>"; };
                22CAFF7B11D840E3001ECDEF /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = __init__.py; path = link/__init__.py; sourceTree = "<group>"; };
                22CAFF7C11D840E3001ECDEF /* externAgent.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = externAgent.py; path = link/externAgent.py; sourceTree = "<group>"; };
+               22DB7DF31223BAF700E04CAB /* conf.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = conf.py; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXGroup section */
@@ -31,6 +32,7 @@
                                22CAFEEB11D84076001ECDEF /* README */,
                                22CAFEEC11D84076001ECDEF /* rpsconst.py */,
                                22CAFEED11D84076001ECDEF /* SampleAgents.py */,
+                               22DB7DF31223BAF700E04CAB /* conf.py */,
                                22CAFEEE11D84076001ECDEF /* selectAlgorithms.py */,
                                22CAFEEF11D84076001ECDEF /* simulate.py */,
                                22CAFEF011D84076001ECDEF /* uccProgComp.py */,
index cdf6d86..438a49e 100755 (executable)
@@ -21,7 +21,7 @@ usage = "Usage: rps [-v] [-i iterations=150] [-n starting_populations=10] [-t tr
 for i in range (1,len(sys.argv)):
        if sys.argv[i] == "-i":
                try:
-                       maxIterations = int(sys.argv[i+1])
+                       MAX_ITERATIONS = int(sys.argv[i+1])
                        i += 1
                        continue
                except:
@@ -37,7 +37,7 @@ for i in range (1,len(sys.argv)):
                        sys.exit(1)
        elif sys.argv[i] == "-t":
                try:
-                       trials = int(sys.argv[i+1])
+                       TRIALS = int(sys.argv[i+1])
                        i += 1
                        continue
                except:
@@ -81,7 +81,7 @@ while trial < TRIALS:
        else: winners[winner[0]] = 1
        #print "Winner: %s" % winner[0]
 
-print "SCOREBOARD OVER %d TRIALS OF %d ROUNDS EACH" % (trials, maxIterations)
+print "SCOREBOARD OVER %d TRIALS OF %d ROUNDS EACH" % (TRIALS, MAX_ITERATIONS)
 rawscoreboard = sorted ( [(score,player) for (player,score) in winners.items ()] , reverse=True )
 scoreboard = []
 for score, player in rawscoreboard:

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