Author: John Coffey
Date: 21:47:55 09/30/98
Go up one level in this thread
On October 01, 1998 at 00:25:44, James Robertson wrote: >How do programs detect draws by repetition in a search? I can think of many >possible ways, but they all seem really slow. How do most programs quickly >detect draws by repetition? > >Thanks, > >James James, I am not sure how other programs do it. Here is an idea I had to do it on my program: Most programs look try to find the position in a hash table if they can. If they don't find the position (and sometimes if they do find the position) then they are going to search the position deeper. Since we are going to access the hash table anyway, then maybe we could make use of this fact. Let us assume that we do/don't find the position in the hash table, but we are going to search the position deeper. We can store the position and mark that we are doing a search. If later we encounter the same position, then we would have to take some action to prevent us getting caught in a loop. Once the deeper search is complete then we can fill in the result into the hash table and unmark the flag that says we are doing a search on this position. Just an idea. John Coffey
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.