Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: zobrist key table questions

Author: Peter Fendrich

Date: 14:51:13 05/30/04

Go up one level in this thread


If zobrist is signed you will encounter problems when shifting it.
/Peter


On May 30, 2004 at 17:33:54, Uri Blass wrote:

>On May 30, 2004 at 14:14:30, Zach Wegner wrote:
>
>>>>r1=(unsigned)zobrist[fil][i][j]&4294967295;
>>>>r2=(unsigned)zobrist[fil][i][j]>>32;
>>
>>should be:
>>r2=(unsigned)(zobrist[fil][i][j]>>32);
>>
>>Shifting an unsigned right by 32 is 0(on a 32-bit machine, of course).
>
>It does not help
>
>r1=(unsigned)zobrist[fil][i][j]&4294967295;
>r2=(unsigned)(zobrist[fil][i][j]>>32);
>r=r1 | (BitBoard) r2<<32;
>
>for some reason I get
>r!=zobrist[fil][i][j]&4294967295
>
>The main problem is that I can get 2^32-1 when I do
>printf(" %u ",(r>>32));
>
>I do not get it when I do
>printf(" %u ",(zobrist[fil][i][j]>>32));
>
>Uri



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