current = [(4.,1.),(5.,1.),(7.,3.),(None,1.), (4.,1.),(5.,1.),(7.,3.),(None,1.),(4.,1.),(7.,1.),(12.,2.),(11.,2.),(9.,2.),(9.,2.),(7.,1.),(None,1.),(2.,1.),(4.,1.),(5.,3.),(None,1.),(2.,1.),(4.,1.),(5.,3.),(None,1.),(2.,1.),(5.,1.),(11.,1.),(9.,1.),(7.,2.),(11.,2.),(12.,4.)]
timeshift = 1;
while 1:
timeshift = timeshift + timeshift * random.uniform(1 - timebias, 1 + timebias)
if timeshift > 1.0 + 2.0 * timebias or timeshift < 1.0 - 2.0 * timebias:
timeshift = random.uniform(1.0 - timebias / 2.0, 1.0 + timebias / 2.0)
key = random.randrange(0, len(current) - 1)
if random.random() > changebias:
if current[key][0] is not None:
Here's a tweak I made that I think keeps to the spirit.
current = [(4.,1.),(5.,1.),(7.,3.),(None,1.), (4.,1.),(5.,1.),(7.,3.),(None,1.),(4.,1.),(7.,1.),(12.,2.),(11.,2.),(9.,2.),(9.,2.),(7.,1.),(None,1.),(2.,1.),(4.,1.),(5.,3.),(None,1.),(2.,1.),(4.,1.),(5.,3.),(None,1.),(2.,1.),(5.,1.),(11.,1.),(9.,1.),(7.,2.),(11.,2.),(12.,4.)]
... (read 395 more words →)