jj wrote:
TAILLE wrote:
Theoritically it is wasteful but only when kings are present in each side because with no kings on the board it is of course possible but very improbable to reach a position with two paths with different depths.
Yes, but there is also the issue of the present TT content. Clearing the TT takes time and is also considered wasteful. A previous (ponder) search can fill the TT with useful information. If you don't clear the TT, however, the problem becomes more likely to happen.
TAILLE wrote:
Taking aside loop problem do you agree that inconsistencies are related to pruning and (hidden) extension?
Yes. (Not clearing the TT also means hidden extensions, in your terminology.)
Let me try to explain how I excluded any inconsistency for this problem.
First of all I consider pruning, extension and TT are essential in order to have a powerful MTD(f) algorithm. In addition clearing TT is a non-sense because you lost very valuable information. The solution I found is the following:
In your paper you use the fonction rootMT(root, moves, gamma, d) which return a value g. Here you assume that if g < gamma then g is the new upp value otherwise g is the new low. In my implementation I do not consider that the returned g value could always become the new low or the new upp. if g < gamma I only conclude that the new upp is gamma - 1 otherwise I only conclude that gamma is the new low.
Let's take an example:
The initial value for low and upp are -INF and +INF.
If I consider the initial position a little advantageous I may decide to begin by testing the value +20 and run the function rootMT(root, moves, +20, d). If the return value is g = +50 then low is set to +20 and I will run a new test "based" on the g value (and some other criterias): I will try to obtain for g a value greater than +50 and I will run (as you do?) the function rootMT(root, moves, +51, d). Let's now suppose that the return is g = -10. For you it is obviously an inconsistency but not for me. I set simply the upp to +50 and now I have obtained low = +20 ans upp = +50. I will continue by testing the middle value and I will run rootMT(root, moves, +35, d) etc.
That way I cannot have an inconsistency and I can use pruning, extension and TT without major problems.