From 47363bd0ed17d01c273471c2eb3bebbdc3aeae67 Mon Sep 17 00:00:00 2001 From: Luke Williams Date: Mon, 28 Jun 2010 17:11:27 +0800 Subject: [PATCH] More debugging output. --- src/uccProgComp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 () -- 2.20.1