That depends on what the maximum score is that can be associated with these king-safety or passer terms, and which margin you use. If the margin is large enough (i.e. larger than the maximum value of all non-evaluated terms together) futility pruning is mathematically sound, and doing the full evaluation would just be a waste of time. The problem of course can be that the margin has to be very large, if you have a 'wild' evaluation, so that in practice you don't prune very much.diep wrote: ↑Sun Nov 07, 2021 11:40 pm Yeah well that is all assuming a very simple evaluation function.
Much better is to do the capture, carry it out, and have the next position do a full evaluation and return the value above beta there if that's the case.
There could be a king safety issue in place, or a apassed pawn that you captured, or a piece hung in the corner that suddenly no more is hung.
Better capture those pieces and see what evaluation is after it than to use futility pruning there.
If this simple method (futility pruning) works well for you - no hope to beat the ANN engines of course - you need to show up with a bit more sophisticated evaluation function to beat them.
Most engines therefore use the margin as a tunable parameter, and use the value that results in the highest Elo. Even if that is a value that theoretically is not sound, and prunes nodes that would have failed high on exact evaluation. This makes sense; the fraction of stand-pat nodes is usually larger than 50%, so you can potentially save a lot of work by skipping those evaluations. Especially when you have a complex evaluation that dominates execution time. Spending this time just to catch the rare cases where an unusually large eval swing could cost you one ply of search depth. It usually pays to focus the effort on nodes that have the largest chance of making a difference, and nodes that superficially fall very far short of alpha are very unlikely to make up the deficit.
Besides, if some large terms are reasonably likely to contribute, there often are tricks to account for that. E.g. the case of the passers: you could exclude moves by a Pawn or captures of a Pawn from pruning, so you would not inadvertantly prune moves that create a passer.
Most engines even use a similar kind of pruning at d=2 and d=3, which is completely 'unsound': no matter how large the margin, you could lose a King in the remaining 3 ply. But hey, if it increases Elo...