'''
# Import and add your agents here:
-from link.C.c_agents import c_angel, c_lucifer, c_streetfighter, c_frenchie
+#from link.C.c_agents import c_angel, c_lucifer, c_streetfighter, c_frenchie
from SampleAgents import Angel, Lucifer, Dummy, Frenchie, Streetfighter
-Agents = [c_angel,c_lucifer,c_streetfighter,c_frenchie]
+Agents = [Angel,Lucifer,Streetfighter,Frenchie]
####################################
# Developers only past this point! #
####################################
import sys
+from conf import *
from uccProgComp import Supervisor
-maxIterations = 150
-startingPopulations = 10
-verbose = False
-trials = 1
usage = "Usage: rps [-v] [-i iterations=150] [-n starting_populations=10] [-t trials=1]"
for i in range (1,len(sys.argv)):
if sys.argv[i] == "-i":
sys.exit(1)
elif sys.argv[i] == "-v":
- verbose = True
+ VERBOSE = True
iteration = 0
trial = 0
winners = {}
-while trial < trials:
+while trial < TRIALS:
sup = Supervisor ()
for Agent in Agents: sup.RegisterAgent (Agent)
- sup.GeneratePopulation (startingPopulations)
+ sup.GeneratePopulation (STARTING_POPULATION)
trial += 1
iteration = 0
- while iteration < maxIterations and not sup.IsGameOver ():
+ while iteration < MAX_ITERATIONS and not sup.IsGameOver ():
iteration += 1
sup.Iterate ()
- if not verbose: continue
+ if not VERBOSE: continue
print "Iteration %d:" % iteration
for key, value in sup.GetStats ().iteritems():
print "%s: Population=%d, Newborns=%d, Deaths=%d" % (key, value[0], value[1], value[2])