[computer-go] C++ random numbers

David G Doshay ddoshay at mac.com
Tue Aug 8 18:01:53 PDT 2006


If you really want a decent generator, look in Knuth.
I do MC in physics, where the quality of the generator
is paramount, and you can get bad results with bad
generators. I have had good results with the "shuffle"
technique, which requires 2 random generations to
get one random number.

There is also a good discussion in the Numerical
Recipes books, with code for several generators,
including a very good one that requires 3 steps:
high order, low order, and shuffle.

Cheers,
David



On 8, Aug 2006, at 5:36 PM, steve uurtamo wrote:

>> Be careful with rand().
>
> look for random(), which has a much longer period
> and is more useful if you wish to avoid statistical
> correlations in long sequences of generated values.
>
> s.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> computer-go mailing list
> computer-go at computer-go.org
> http://www.computer-go.org/mailman/listinfo/computer-go/



More information about the computer-go mailing list