Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: 64-Bit random numbers

Author: Vincent Diepeveen

Date: 07:09:04 10/30/03

Go up one level in this thread


On October 30, 2003 at 09:44:48, Robert Hyatt wrote:

>On October 29, 2003 at 13:39:03, Vincent Diepeveen wrote:
>
>>On October 28, 2003 at 23:03:31, Robert Hyatt wrote:
>>
>>In general combining 2x32 goes wrong, so you shouldn't give this tip to him Bob!
>
>In general, it works _perfectly_.  This is not hard to prove mathematically.
>
>Particularly when we need less than 1000 random numbers for Zobrist hashing.


If you simply combine 2 numbers of 32 bits by the microsoft RNG then you will
find multilineair problems.

You admitted this yourself years ago.

Then it was: "but you shouldn't use 32 bits microsoft stuff but 48 bits or 64
bits *nix stuff"

I see therefore massive handwaving again here.

It is the difference between neat and bad programming again.

With bad programming you can get a working program too, you realize that?

>
>>
>>If generalized over the average 32 bits PRNG and generate 64 bits hash numbers
>>with it like this, then you end up with multilineair connection and many
>>collissions.
>
>Not for 1000 numbers, again.  Do the test.  _then_ report the results.  I

I already did this test years ago and posted it here.

There was a collission every 200000 nodes then.

When i used 64 bits numbers that dropped to once each 200 million nodes.

Later i started using more bits out of that 64 and it is safe now.

>have done this.  Several of us tested our random numbers a few years ago.  The

Yes it was me testing it. You did *not*.

You never posted onto this subject.

Like most programmers i did an experiment here and the average combination of 2
* 32 bits is just plain *incorrect*.

>RNG from Numerical Recipes that I use is _very_ good.  Particularly when I need
>less than 2000 32-bit values to make less than 1000 64 bit numbers.

>I've run _real_ tests using my random numbers.  You can find my results,
>Bruce's results, and John Stanback's results posted on r.g.c.c several years
>ago.  I saw less than one collision per 3 hours of searching.  That can
>be ignored easily.

*you saw*, you *remember*.

But you never used the 'average' RNG here. In fact you *did* use the average RNG
in the past but it didn't work very well combining 2 x 32 bits.

Yet you did not draw that conclusion. Someone else did for you. That's why
Gijsbert Wiesenekker has created the RNG for Crafty.

For the supercomputer i of course had to retest things again as things work
differently there. So my last test is from around 8 hours ago.

>>
>>Now i'm sure you will show up with something that doesn't have multilineair
>>connection, but that's not what i call the 'average' 32 bits RNG :)
>
>I have _always_ cited my RNG as an adequate solution to the problem.  It

*your* RNG?

May i beg your pardon?

You didn't even WRITE all that code in crafty.

Gijsbert Wiesenekker did.

>is an "average RNG" that was published in the book "Numerical Recipes" 20+
>years ago.

>>It's like saying using 'goto' is ok in a programming environment. Where this is
>>certainly true, it should not be a policy to do so :)
>
>
>Eh?  _every_ program you write has goto's.  (aka jumps).  They are not
>bad.  In fact, they are _unavoidable_.

goto is faster in some cases, because of the imperfection of compilers.

It doesn't change neat programming concepts.

Yet knowing your program uses inline assembly everywhere, it's no surprise that
you fall that low.


>>>On October 28, 2003 at 21:29:18, Vincent Diepeveen wrote:
[snip]



This page took 0.02 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.