Page 1 of 1

3fold reps and Hashtables.

PostPosted: 09 Dec 2004, 16:01
by Laurens Winkelhagen
Hi All,

My troubles with repetition detection seem to continue. I think it might have something to do with hashtable lookup. The hashtable might return a positive score for a 2fold rep position, and this may enable the opponent to move and make a 3fold rep.

To counter that I have added a small check at the beginning of a node, before hashtable lookup, to check if a 2fold rep occurs. ifso, a draw score is returned immediately, and no information is stored in the hashtable.

Everything seems to work now, but I'm curious if there are principal objections against this course, or if there are better methods to cure this problem.

All feedback appreciated, Laurens.

(who hopes he won't need to bugfix janwillem for this again :-) )

Re: 3fold reps and Hashtables.

PostPosted: 09 Dec 2004, 16:17
by Reinhard Scharnagl
Hi Laurens,

a) if you increment at the beginning you have to decrement at the end.

b) I myself distinguish between a node evaluation and an evaluation at a special point of the search tree. A position can occur at different places of the search tree, thus a repetition could be detected and evaluated appropriately. But it is an error to store such a repetition draw evaluation within the position data.

Reinhard.

Re: 3fold reps and Hashtables.

PostPosted: 09 Dec 2004, 20:58
by Stan Arts
Hi Laurens

I guess not storing a drawscore at the current node is ok, but there will still be drawscores comming from deeper in the tree, so that probably doesn't solve the problem.

When I started to experiment with using hashtablescores/transportations and comming across the draw-problem, there were a few things that seemed to help. (a bit)
I don't use a hashtablescore when it's 0. (or another drawscore, but I don't have contempt so always 0.) This is the case for repetitiondraws and 50-move rule draws. (Drawscores that I return in the searchtree, instead of evaluation) 0 scores returned by evaluation I make -1, so these do get used next time.

Further I take a look if the current position is a 2x repetition already, (with Neurosis I only give draw-scores for 3x (not 2x) repetitions.) in that case I won't use a hashtablescore (no matter what it is) as well in this position.
This was a big help and fixed most of the problems for me. It doesn't fix all, because there is still the problem possibly having different paths when you use transpositionscores (of which you don't know the path) , for instance for positions you would of had deeper in the searchtree, etc. But there's not really any way to fix that. Well so this way Neurosis didn't make draw-blunders anymore, besides seeing them too late..but that doesn't have much to do with the hashtables. :|

Groeten
Stan