[computer-go] C++ random numbers
Chris Fant
chrisfant at gmail.com
Tue Aug 8 19:06:06 PDT 2006
> The checks I do for repeated numbers are actually stricter than if using
> a 64 bit integer, as it requires both high and low halves to
> be unique. I suspect this is good (less chance of two different
> positions having the same hash code), but otherwise it makes no difference.
> If it was good then it'd be worth generating 16 bit numbers and check
> their uniqueness, then combining them to make the 32 bit numbers.
Be careful with this sort of thing. The "smarter" you are, the less
random you are.
I also use a Mersenne Twister RNG.
More information about the computer-go
mailing list