X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2FuccProgComp.py;h=9f256fd9752fae6f8d1a4554dfedc3d791fd2908;hb=d99d5ef6586365e040c3ee76b8a9a85cc1086b56;hp=0eee563848df3e4d2213591caf577fffc5c8a37f;hpb=e9a8105a8f22404f4ac550d79954eaa6b7f5d8ff;p=progcomp10.git diff --git a/src/uccProgComp.py b/src/uccProgComp.py index 0eee563..9f256fd 100644 --- a/src/uccProgComp.py +++ b/src/uccProgComp.py @@ -10,26 +10,11 @@ import random, uuid random.seed () from rpsconst import * - -DEFAULT_HEALTH = 50 -REPRODUCE_HEALTH = 100 -DIE_HEALTH = 0 -MAX_AGE = 100 - -DEBUG_MODE = False - -# Game dynamics - these are not final: -# WINNER TRUTH ATTPoints, DEFPoints -pointsTable [Attacker] [False] = (2, -2) -pointsTable [Attacker] [True] = (2, -2) -pointsTable [Defender] [False] = (-2, 2) -pointsTable [Defender] [True] = (-2, 2) -pointsTable [Tie] [False] = (0, 0) -pointsTable [Tie] [True] = (1, 1) +from conf import * 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 +109,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 ()