Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Random keys and hamming distance

Author: Daniel Clausen

Date: 00:38:04 08/17/02

Go up one level in this thread


On August 17, 2002 at 00:51:59, Will Singleton wrote:

>>Bitmap RandomBitmap(void)
>>{
>>   Bitmap r1,r2;
>>
>>   r1=Random32();
>>   r2=Random32();
>>
>>   return ((r1<<32)|r2);
>>}
>>
>>
>
>I don't have my source code with me now, but I remember that OR'ing the two
>32-bit values will give very bad results.

?

It's not like he's ORing two 32 bit words, which would really be a bad idea,
since you'd end up having 75% of 1 bits. But ((r1<<32)|r2) _concatenates_ them.
I fail to see why this is bad. (I don't know how well the function "Random32" is
though)


> There must be lots of examples of
> 64-bit rand generation in various sources out there.

The Crafty-sources contain a reference to a very good random generator.

Sargon



This page took 0 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.