Author: Gerd Isenberg
Date: 09:17:36 07/30/03
Go up one level in this thread
On July 29, 2003 at 14:34:41, Bas Hamstra wrote: >On July 29, 2003 at 00:16:53, macaroni wrote: > >>I have been having great trouble finding an efficient routine for Repetition >>checks, I can get the zobrist keys of the current line being searched, but what >>is the best (if there is a best) method of comparing them to check for 3 the >>same? it seems crazy to loop through all of them for each one, looking for like >>positions. Is there something really simple and nice i'm completely missing? or >>is that the only way, >>Thanks all :) > >How about this: char RepCheck[64000]. Now you in each position you take the last >16 bits of the hashkey. If RepCheck[Last16] is nonzero, it *might* be a >repetition and you do the extensive check of comparing hashkeys all to the root. >For this to work, you increment RepCheck[Last16]++ in your Make(Move) code. >Decrement it at Unmake(). So now you have 1/64000 th of the cost... > >Bas. Hi Bas, The "Ronald de Man" trick works well, except Last16 becomes a bit larger than 64000 in your sample ;-) May be last13 or last14 with smaller tables is even enough. Regards, Gerd
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.