Author: Uri Blass
Date: 15:09:49 05/30/04
Go up one level in this thread
On May 30, 2004 at 17:51:13, Peter Fendrich wrote: >If zobrist is signed you will encounter problems when shifting it. >/Peter I think that my zobrist is unsigned. My function to generate "random" 64 bit numbers generate signed number but return it as unsigned number I have typedef unsigned __int64 BitBoard; static BitBoard rand64() { __int64 r = rand(); r ^= (__int64)rand() << 15; r ^= (__int64)rand() << 30; r ^= (__int64)rand() << 45; r ^= (__int64)rand() << 60; return r; } BitBoard zobrist[6][2][64]; zobrist[fil][i][j]=rand64(); The problem is that when I do r1=(unsigned)zobrist[fil][i][j]&4294967295; r2=(unsigned)(zobrist[fil][i][j]>>32); r=r1 | (BitBoard) r2<<32; I get r!=zobrist[fil][i][j] Uri
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.