################################################################## # Basic model parameters fitfile="fitness.data" decfile="decision.data" montefile="montedata.txt" xmax = 30 xrep = 4 tmax = 20 m = [.01, .05, .02] # predation probabilities p = [.2, .5, 0] # discovery probabilities y = [2, 4, 0] # food sizes cost = 1 # per period metabolic cost c3 = 4 acap = 60.0 x0 = 0.25*xmax xint = 2 # do this stuff here since we need it in several places anyway... def chop(x, min, max): """ Return x, pushed into the range [min...max] """ if min<=x and x<=max: return x elif x