X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2FuccProgComp.py;fp=src%2FuccProgComp.py;h=c5f22e0df7784ec14d2ea97772d04b15b47bf8db;hb=47363bd0ed17d01c273471c2eb3bebbdc3aeae67;hp=0eee563848df3e4d2213591caf577fffc5c8a37f;hpb=edf8e5b569e75692d61a44f2c3241fb6410e4fbd;p=progcomp10.git diff --git a/src/uccProgComp.py b/src/uccProgComp.py index 0eee563..c5f22e0 100644 --- a/src/uccProgComp.py +++ b/src/uccProgComp.py @@ -16,7 +16,7 @@ REPRODUCE_HEALTH = 100 DIE_HEALTH = 0 MAX_AGE = 100 -DEBUG_MODE = False +DEBUG = True # Game dynamics - these are not final: # WINNER TRUTH ATTPoints, DEFPoints @@ -29,7 +29,7 @@ pointsTable [Tie] [True] = (1, 1) def Debug (f): def g (*args): - if DEBUG_MODE: + if DEBUG: print f.__name__, args[1].__class__.__name__, args[1].GetID () return f (*args) return g @@ -124,6 +124,7 @@ class Supervisor: for Agent in self.agentTypes: for i in range (0,nAgentsPerClass): self.population.append (Agent ()) self.agentStats [str(Agent)] = [nAgentsPerClass,0,0] + if DEBUG: print "Created " + str(nAgentsPerClass) + " instances of " + Agent.__name__ def Iterate (self): self.ClearStats ()