Author: Robert Hyatt
Date: 07:04:01 08/09/01
Go up one level in this thread
On August 09, 2001 at 00:28:54, Scott Smedley wrote: >Hi All, > >I've just implemented a transposition table in my chess program >(affectionately known as DaRK KNiGHT) & the first thing I realised >is that I have no way of detecting perpetual check, repetitive >position draws & the like. > >So my question is: > >How can a program recognise/handle the 3rd occurance of a position if >it's using a transposition table? This is doable. When you enter a node, enter a dummy position in the hash table (we call these a group of "open node" hash entries. When you leave a node, remove the dummy position. If, when you enter a position, you find the dummy position is already there, then you know this is a second repetition. If you _really_ want to only count 3-fold repetitions as draws, insert a counter and only remove the dummy entry when the counter is zero. if the dummy position doesn't exist, add it with a counter of 1. If it is already in the table, inc the counter and if it gets to 3 you know this is the third repetition. Note that this is a bad idea as you will have a difficult time finding 3-fold repetitions in reasonable searches. > >The score for a position in the transposition table may or may not >be based on draw-by-repetition terminal nodes in its search path. >Actually, now that I think about it a litte more, this begs a more >quintessential question: > >How do I avoid using an inaccurate score in a transposition table >due to potential draw-by-repetition terminal nodes in the search path? don't use hashing. :) It is fraught with errors because it only stores info about a position, not about the history of moves that lead to that position. Since chess has history-specific rules (repetitions and 50-move draws) this makes them inaccurate by definition if they don't include that information. > >SCoTT! :)
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.