Uri Blass wrote:The problem that I think about is the following:
imagine that your program got the following position in the search
4k3/b7/8/7P/7P/7Q/r6P/5K2 b - - 0 1
imagine that the program searched
Ra1+ Kg2 Ra2+ Kf1
Do you store draw score for the position after Kf1
Draw score is not correct because white is winning by Ke2.
The problem is that not storing draw score may also lead to problems because the program may record draw score after Ra1+ Kg2 Ra2+ (because of the fact that Kf1 cause the program to return draw even without storing it in the hash and there is nothing better)
This score is of course not correct and the program may use this not correct score later in the search to get wrong conclusions.
The alternative is of course after undoing moves from draw by repetition node to store in the hash that the position is not reliable for pruning and not use the hash for pruning but in that case the program may not see a draw because of not trusting correct scores that it got.
I wonder what do you do about it.
Uri
I do nothing. That is normal behaviour and has nothing to do with repetition.
Every engine does false evaluations sometimes and stores them in the
hash table. If it believes it is one pawn ahead it may in fact lose the game
from this position. Typically later in the iterative search the error is
detected and another value is assigned because with the bigger depth
the hash entry is no longer valid and hash pruning is forbidden.
My weak engine does this (reversed because it is a copy from winboard output):
Code: Select all
9 -4.94 86.8M 6:45.95 Ke8-e7 Qh3-g4 Ra2-a1 Kf1-e2 Ra1-a2 Ke2-d1 Ra2-a1 Kd1-d2 Ra1-a2 Kd2-c3 Ba7-f2 Qg4-g7 Ke7-d6 Qg7-f6 Kd6-c7 Qf6-f4 Kc7-b6 Qf4-d6 Kb6-a7
9 -4.97 73.1M 5:38.32 Ra2-a1 Kf1-e2 Ra1-a2 Ke2-d1 Ra2-a1 Kd1-c2 Ra1-e1 h5-h6 Re1-e2 Kc2-d1 Re2-e5 Qh3-c8 Ke8-e7 Qc8-c7 Ke7-f8 Qc7xe5
9 -4.61 26.7M 2:02.17 Ra2-a1 Kf1-e2 Ra1-a2 Ke2-d1 Ke8-f8 Qh3-f5 Kf8-e7 Qf5-e5 Ke7-f7 h5-h6
8 -4.51 14.7M 1:08.98 Ra2-a1 Kf1-e2 Ra1-a2 Ke2-d1 Ke8-f8 Qh3-f5 Kf8-e7 Qf5-e5 Ke7-f7 h5-h6
8 -4.64 14.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why do you think the general problem is worse with repetition draws?
Harald