2009-02-07, 03:52 AM
Here, in python.
Appears to be it.
Quote:def ScrollProb(start, maxcount, minnum):
per = scrollProbLoop(start, 1, 1.0, maxcount, minnum)
print (per)
def scrollProbLoop(total, count, prob, maxCount, minnum):
per = 0
for i in range(-6, 6):
tempTot = total
tempProb = prob
if(i == -6):
tempProb *= 0.4
else:
tempProb *= (0.6 * (1.0/11.0))
tempTot += i
if(tempTot < 0):
tempTot = 0
if(count < maxCount and tempTot != 0):
per += scrollProbLoop(tempTot, count + 1, tempProb, maxCount, minnum)
elif(count == maxCount and tempTot >= minnum):
per += tempProb
return per
Appears to be it.

