Ferdy wrote:Sven Schüle wrote:Ferdy wrote:Sven Schüle wrote: Case 1 is interesting but as far as I know we almost always think of case 2 if we talk about "futility pruning" in chess engine programming. I also think that case 1 is a very risky kind of pruning, and I guess it is not what the OP intended to do.
The advantage of case 1 is that you can have the full evaluation of the position which can be useful in other areas too, unlike case 2 where it could be expensive to call the full eval after every move to determine if move is futile or not although there are other means to achieve effective pruning. The risks in case 1 can be minimized by adding other conditions and better tuned margins.
Have you ever seen "case 1" (you call it "position futility pruning") being used in any serious engine so far? Even SF does not use it as far as I know (and SF uses almost all search techniques that are considered valid today).
It does not matter if the engine using it is serious or not the point is the method of pruning exists. You seemed to imply that techniques not in Stockfish is invalid

. What happened to you?
Fortunately Stockfish seemed to have it and they call it razoring with some refinements that is using qsearch value.
Nothing happened to me. Of course I did not want to imply that techniques that are not in Stockfish are invalid. But despite your opinion as well as that of Tony (see his recent reply in this thread), I strongly disagree that the pruning method described in this thread has any serious value. I'm pretty sure it neither was nor is present in Stockfish, Komodo, or any other strong engine, and it is not "reverse futility pruning", "static null move pruning" or anything similar. Both look very different, they do not prune with a condition like "eval + margin <= alpha" at the top of a node (but with "eval - margin >= beta" which is quite the opposite).
It is also not "razoring", even though it may look "close" to it. The big difference to "razoring" is that the latter is not applied at PV nodes or nodes which have a TT move (both conditions are not present in the OP code snippet) and - most important - that "razoring" only prunes if qsearch() confirms the fail-low somehow. I would not call the addition of the two missing conditions and the qsearch() confirmation step a "refinement", it turns the whole thing into something completely different in my view. Not using a confirmation like qsearch() to avoid missing an own "strong" move that would avoid to fail low is obviously hilarious, so why should someone consider it serious?
But we don't need to continue this battle, maybe in fact we are not too far away from each other

It seems obvious to me that the OP wanted to implement futility pruning but failed to do it right. Now there are various ways for him to improve his code, and in the end he might get both futility pruning *and* razoring to work
