PRNGs (was [Q] Project: Better performance for LargeIntegers)

Jeff Szuhay jeff.szuhay at pstnet.com
Tue Nov 2 18:25:47 UTC 1999


>At 22:44 +0100 11/1/99, Stephan Rudlof wrote:
>>
>>Random generator are very important for such interesting areas like
>>evolutionary algorithms (GA, ES, GP, etc.) and Artificial Life. I think
>>Squeak could be a good platform for such research and _games_ (I like
>>games...)! I was surprised by a random generator with a quiet short period
>>(is this the right word in English? It means repeating seq) in VW which I
>>used for my Diploma thesis...
>
>The last time I looked (several years ago) it still had a horrid 
>generator with a period of 64K. It's easy to fix; there are 
>Park-Miller generators available for most any Smalltalk system.
>
>I fully agree that evolutionary algorithms is another very 
>interesting place that makes heavy use of randoms. Unfortunately, 
>very high performance is needed for serious work; John Kosa (the GP 
>guy) has abandoned LISP and gone to a system based in C and even 
>used multiprocessing to try to get the performance needed for 
>real-world problems. Maybe plugins can help?
>
We recently chose tt800 which is a "twisted Generalized Feedback 
Shift Register"
algorithm with a simple C implementation and a periodicity of 2^800. It has
bas passed all the DIEHARD tests quite admirably and is useful for most Monte
Carlo type simulations.

Here are some of the better PRNG URLs I found in my quest:

G. Marsaglia, DIEHARD Testing Suite: <http://stat.fsu.edu/~geo/dihard.html>

P. Hellekalek, "Good Random Number Generators Are (Not So) Easy to Find"
published in Mathematics and Computers in Simulation 46(5-6) 1998 pp 485-505.
<http://www.elsevier.nl/cas/tree/store/matcom/sub/1998/46/5-6/1527.pdf>

News on Random Number Generators <http://random.mat.sbg.ac.at/news/>

and finally,

tt800 source code: <http://random.mat.sbg.ac.at/ftp/pub/daa/tt800.c>


As I am just coming up to speed on Squeak, perhaps someone else would
find this to an interesting exercise: porting the C code to Squeak (or making
it a part of the VM).

8-)

--
    *************************************************
    Jeff Szuhay                <mailto:jeff.szuhay at pstnet.com>
    Lead Macintosh Engineer    voice: 412/271-5040 x 227
    Psychology Software Tools  <http://www.pstnet.com/>





More information about the Squeak-dev mailing list