Author: Roberto Waldteufel
Date: 09:39:04 10/20/98
Go up one level in this thread
On October 20, 1998 at 08:04:42, Robert Hyatt wrote: >On October 20, 1998 at 04:17:35, Steve Maughan wrote: > >>What is the easiest way to detect draw by repetition during a search? >> >>I have thought that setting a flag in the hash entries of the main line would >>work. Does anyone use a similar technique? What happens when there are no hash >>tables. >> >>Thanks in advance. >> >>Steve Maughan > > >There are two easy approaches. > >(1) use the hash table as you suggest. When you create an active position by >making a move, you "open" the position in the hash table by storing the key if >it isn't already there, and setting the "open" bit. When you unmake that move, >you clear the "open flag". Now, if you get a hash hit, and "open" is set, you >can return repetition. > >(2) use a list of hash signatures, one for each ply in the search, plus 1 for >each move since the last non-capture/non-pawn-push in the game history. > >(2) is the most flexible because (1) will give you significantl problems if you >ever want to do a parallel search. (2) done carefully is not expensive. I >don't spend more than 1% of the total time in this code, usually way less... Also, if you use (1) you must be *very* careful about the replacement policy in the hash table. However, there is another, rather memory-hungry method.... 3) Maintain a separate hash table for active positions. This still fails for a parallel implementation, but I have successfully used this method for serial searching and it is very efficient in terms of speed. Best wishes, Roberto
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.