Author: Dan Newman
Date: 11:02:35 01/18/02
Go up one level in this thread
On January 18, 2002 at 10:44:43, David Rasmussen wrote: >My hashtable implementation has separate tables for white and black, and a part >of each of these tables is depth prioritized. This works ok in general I think. >But I notice that Crafty for one, uses one table, and then inverses the hashkey >in case of probes and stores, when it's black to move. There may be other >implementations as well. I use separate black and white tables too. This is more-or-less equivalent to adding an extra bit of hashcode, not that that makes much difference... A disadvantage is that each side "sees" a table that is half sized. It's also possible that one table might be much more heavily used than the other. In that case, having a single table would be better. > >What are the pros and cons of these approaches, and specifically, why does >Crafty invert the hashkeys in the case of black to move, instead of just hashing >the color into the hashkey? I think this may amount to the same thing. The inversion has the same effect as XORing 0xffffffffffffffff into the hashcode. You could think of 0xffffffffffffffff as being the color bit pattern. I've always wondered if this is quite the right thing to do though, but I can't see any fault in it... -Dan. > >/David (who is deparately trying to find a possible hashing bug in Chezzz...)
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.