Sven Schüle wrote:But it's possible that my thoughts are non-standard here. Perhaps I should even take this thread as a request to check my own null move implementation, which currently skips null move searches completely if (depth - 1 - R) is too small. Maybe I'm wrong in doing this?
I think this is indeed wrong. The most important threats are the opponent's captures. If he has good ones you lose material immediately, and QS will see it.
Your thoughts are standard, but unfortunately standard thinking on Null-Move Pruning is rather hand-waving. NMP works because there almost always is a move available that can buy you time. It might be trading a piece, which he has to recapture, or it might be attacking a high or hanging piece, which he has to rescue, before he can get to executing his original threat.
That the number of threats you can recognize is limited in some way in QS, or because of low search depth in general, is of absolutely no importance,
as long as they are the same threats you would recognize after two normal plies. If depth=3, after null move you are in QS (R=2), so you won't recognize if his Knight can fork your R+R, costing you the exchange. But if you would do the normal search, amongst all those moves you search you would most likely be able to come up with a move that attacks his Q, or Bx(defended)N, even if they do nothing against the fork threat. And he has to recapture your B or save his Q. Trying the fork on ply 2 would cost him the Q, or you would simply move the B back to where it came from, and the exchange he then takes is not enough compensation.
So his ply 2 is spoken for, and after you play ply 3 you are in QS anyway. And there you will see and ignore exactly the same threats as in the QS after null move, for they are both QS. The null move is merely a probe for what you can expect the search to come up with after your most-delaying move. If you find that that is not very bad (i.e. not bad enough to push you under alpha) a deeper search on the real moves would not find it either. That it can still be arbitrary bad (you might be checkmated in 3...) is irrelevant; since the deeper search won't find it anyway, that search will still be a waste of time.
This whole line of reasoning critically depends on a delaying tactic being available. When this is not the case, NMP immediately leads to tactical mistakes. This you can easily conclude from a few test positions. Typical cases are where you either have no tactical moves at all, or where the main threat is so severe that your tactical attempts for delaying them are simply ignored. (If mate in one threatens, attacking his Queen with a Pawn will make no impression even if the Q is not the piece executing the checkmate...)
That NMP 'works' in general, is simply because these kind of mistakes are much less common in the tree than the cases where the underlying assumptions were fulfilled. (And there is of course always the chance that you have a move available that really counters the threat, tipping the odds even more in your favor. Also keep in mind that when you are above beta, your opponent will play like an idiot, trying everything, which is quickly breaking down his own position offering you zillions of possibilities for nasty threats.) So you save a lot of time with only a moderate bit of extra inaccuracy. By re-applying the time saved to deepen the search, you gain more accuracy than you lost, and so you benefit. This is a statistical thing. If the statistics for delaying moves being available was less favorable, you would over all be hurt by it. This can happen in tactically-poor environments (Pawn endings, Bishops that cannot get to undefended Pawns of the opponents), but theese are easy to recognize, and usually we do switch off NMP in such positions.