[CM] 'drunk' behavior
Drew Krause
drkrause@mindspring.com
Fri, 01 Sep 2006 17:21:51 -0400
I've noticed that CM's 'drunk' function has a strong tendency to descend
(see test below). Is it working properly, or should a random seed be
re-set or something? Thanks!
The following function returns a list of length 'len' starting drunk
from 'startpit':
(defun drunkvec (startpit len &optional (stepsize 1))
(loop repeat len
for r = startpit then (drunk r stepsize)
collect r))
All 30 runs of length 20 descended from 50 to the following final numbers:
(loop repeat 30 append (last (drunkvec 50 20)))
=>(44 42 44 39 42 40 38 43 41 41 39 40 44 39 40 42 42 40 39 39 41 41 39
42 38
46 45 38 45 40)
Drew Krause