Michel wrote:Exactly! Extending the threat avoiding moves is enough, rather than extending all moves (HGM's proposal) or doing a research at full depth (Tord's idea in Glaurung, which is basically the same as what HGM says, bus slightly more economical, due to potential early cutoffs in the re-search).
I am suggesting that extending _no moves at all_ would do just as well.... I have been asking in the last three posts if you have tested that.
Yes, I have tested it, and it was a regression. But I agree with you, it shouldn't be the case. None of these extensions (and many different ideas around it that I tested) worked for my engine DiscoCheck.
Stockfish is a strange animal: somehow this idea works in SF and perhaps nowhere else...!?
The only "null move fail low" stuff that I managed to get a measurable improvement out of, in DiscoCheck is the following "mate threat extension":
Code: Select all
// Null move pruning
if (!is_pv && !in_check && !is_mate_score(beta)
&& current_eval >= beta
&& B.st().piece_psq[B.get_turn()])
{
const int reduction = null_reduction(depth) + (current_eval - vOP >= beta);
B.play(0);
int score = -search(B, -beta, -alpha, depth - reduction, false, ss+1);
B.undo();
if (score >= beta) // null search fails high
return score < mate_in(MAX_PLY)
? score // fail soft
: beta; // *but* do not return an unproven mate
else if (score <= mated_in(MAX_PLY) && (ss-1)->reduction)
++depth; // mate threat extension
}
I know what you're going to say: this code is unsound as it relies on fail soft scores, instead of doing a zero window search to test for a mate score. But the point is that when the null move returns a mate score, you can trust that the mate threat is real. On the other hand, due to beta cut-offs, you can't expect this to detect deep mates. So, I don't detect many deep mate threats in this way, but the ones I detect are gratis.
However doing a zero window search for a mate is very costly, because, in general, you won't find one and wuill just waste time searhcing for it (this was an idea I found in the chess programming wiki, and I think it's rather silly due to the cost of the ZW search for mate threat).
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.