Author: Carlos del Cacho
Date: 09:31:07 09/14/00
Go up one level in this thread
On September 14, 2000 at 09:58:35, Andreas Herrmann wrote: >On September 14, 2000 at 08:38:31, Andrew Williams wrote: > >>On September 14, 2000 at 05:25:32, Andreas Herrmann wrote: >> >>>On September 13, 2000 at 17:12:07, Andreas Herrmann wrote: >>> >>>>Hello, >>>> >>>>i want to include pawn hash tables in my chess program holmes, but i don't know >>>>how i have to calculate the hash index and the hash key. >>>>I think the hash index of the position will only calculated with the pawns on >>>>the board like the following, >>>> >>>>for (pos=A1;pos<=h8;pos=pos+1) { >>>> if (figure[pos]=pawn) { >>>> PawnHashIndex = PawnHashIndex ^ RandomIndex[pos].index; >>>> } >>>>} >>>> >>>>is this right?? >>>> >>>>How can i get a good hash key? What have i calculate with xor? >>>> >>>>Thanks for each information. >>>> >>>>Andreas >>>> >>>> >>>>www.wbholmes.de >>> >>>Hello again, >>> >>>the links from Ricardo are a good information source, but i found nothing about >>>pawn hash tables, only normal hash table and that's not new for me. >>> >>>My question is how can i get a good hash key for collision check in the pawn >>>hash table. >>>Is a XOR combination with a random figure enough? Or is it not so difficult than >>>i am thinking? >>> >>>Andreas >> >>Yes. I've always used a 64-bit integer derived in just the way you describe. >>I don't know if 32-bits would be sufficient, as I've never tried it. >> >>Andrew > >Ok a 64-bit integer is of course much better against hash collision than a >32-bit. I will try to implement it with a 64-bit interger. > >thanks >Andreas I've been using 32 bit nums since I first implemented it in pepito a few months ago, and I haven't had any problem with collisions yet. I guess the pawn structure changes so slowly in search that the chances of getting a collision are really small unless you get to incredibly deep lines (with lots of pawn moves... I don't think that's possible). Carlos
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.