Gerd Isenberg wrote:If you set alpha to [mate in 8] after a fail high, and you find a [mate in 8] again it should not be interpreted as fail low. Or?
I think it should be interpreted as a fail low, because the score could be less than [mate in 8]. Well, maybe in this mate example it can't be, if you have a well behaved search. If you need to know whether the score is exactly X, set alpha to X-1 (or do two zero window searches...).
Sven Schüle wrote:His problem is about exact scores returned by the first search. The old proposal to research with [value .. +INFINITY] does not deal with exact scores. If there is no heavy pruning and maybe also no hashing involved then you still would run into that problem with the lower bound of the new window set to 'value', because the exact score 'value' must remain "inside" the new window bounds. So the new lower bound should always be 'value - 1' to guarantee that.
However, if search instability is possible then it may still be the better choice to open the new aspiration window completely, i.e. [-INF .. + INF]. But at least the 'exact score' issue seems unrelated to search instability for me.
Do you do this in the researches after the NWS fail-highs, too (and at least in my engine it is not so rare that a NWS fails high, but the research with [value, +INF] window does not)?
Yes, an equal score (so also an equal mate dstance) is a fail low. The move is at best equal, and might be worse. You are not interested in figuring out if it is actually worse, as you already have a mate in 8.
Gerd Isenberg wrote:If you set alpha to [mate in 8] after a fail high, and you find a [mate in 8] again it should not be interpreted as fail low. Or?
I think it should be interpreted as a fail low, because the score could be less than [mate in 8]. Well, maybe in this mate example it can't be, if you have a well behaved search. If you need to know whether the score is exactly X, set alpha to X-1 (or do two zero window searches...).
Yes, I explicitly refer to that "trusted" mate example. At depth X you fail high and find a lower bound of a mate in N - it could be even a shorter mate. So setting root alpha to mate in N seems correct to me, and to don't interpret score == alpha of the next iteration as a fail low in that case. I agree that alpha = score - 1 solves that, but it somehow seems counter intuitive to me - more logical (without actually looking to my source) after a "trusted" mate in x is to disable fail-lows at the root
I just found something interesting that Stockfish does in case of a fail-high of a NWS move. It just researches with the [alpha, beta] window, nothing like [value, +INF] or [value - 1, +INF]. If it fails high then, it researches at the next iteration. This is a new approach at least for me and I think I'll try this out in ChessMind.
metax wrote:I just found something interesting that Stockfish does in case of a fail-high of a NWS move. It just researches with the [alpha, beta] window, nothing like [value, +INF] or [value - 1, +INF]. If it fails high then, it researches at the next iteration. This is a new approach at least for me and I think I'll try this out in ChessMind.
Just keep in mind that in this approach these things are closely related:
* time management (allocate _much_ extra time when facing aspiration fail/high-low to fully resolve it at next ply)
* dynamic aspiration window calculation (usually aspiration window should be quite small, but when resolving aspiration fail-high/low, you should enlarge it, but not too much...)
It can be very tricky to get all the pieces right...
Gerd Isenberg wrote:If you set alpha to [mate in 8] after a fail high, and you find a [mate in 8] again it should not be interpreted as fail low. Or?
I think it should be interpreted as a fail low, because the score could be less than [mate in 8]. Well, maybe in this mate example it can't be, if you have a well behaved search. If you need to know whether the score is exactly X, set alpha to X-1 (or do two zero window searches...).
Yes, I explicitly refer to that "trusted" mate example. At depth X you fail high and find a lower bound of a mate in N - it could be even a shorter mate. So setting root alpha to mate in N seems correct to me, and to don't interpret score == alpha of the next iteration as a fail low in that case. I agree that alpha = score - 1 solves that, but it somehow seems counter intuitive to me - more logical (without actually looking to my source) after a "trusted" mate in x is to disable fail-lows at the root
The only gotcha here is that if you set alpha, what do you set it to? The actual mate score? that's wrong, because it is a mate in N from the root, not a mate in N from the current node. If you set it to the "corrected" backed-up mate score, that can also be wrong because of how entries are stored in the hash table. It can be made to work, but it takes some thought to avoid a bad instability around mates.
Gerd Isenberg wrote:If you set alpha to [mate in 8] after a fail high, and you find a [mate in 8] again it should not be interpreted as fail low. Or?
I think it should be interpreted as a fail low, because the score could be less than [mate in 8]. Well, maybe in this mate example it can't be, if you have a well behaved search. If you need to know whether the score is exactly X, set alpha to X-1 (or do two zero window searches...).
Yes, I explicitly refer to that "trusted" mate example. At depth X you fail high and find a lower bound of a mate in N - it could be even a shorter mate. So setting root alpha to mate in N seems correct to me, and to don't interpret score == alpha of the next iteration as a fail low in that case. I agree that alpha = score - 1 solves that, but it somehow seems counter intuitive to me - more logical (without actually looking to my source) after a "trusted" mate in x is to disable fail-lows at the root
The only gotcha here is that if you set alpha, what do you set it to? The actual mate score? that's wrong, because it is a mate in N from the root, not a mate in N from the current node. If you set it to the "corrected" backed-up mate score, that can also be wrong because of how entries are stored in the hash table. It can be made to work, but it takes some thought to avoid a bad instability around mates.
Ok, I was referring the root, where Luca mentioned to fail low at ply 9 after a fail high at ply 8 with mate in 8 score, with the need to re-search.
Ply 08 Move M8++
Ply 09 Move M8--
Ply 09 Move M8
I wrote almost nonsense, since disabling fail low after a "trusted" mate score and setting root alpha to Mate in 8 would miss the PV.