mcostalba/Stockfish — pull request #163 by lucasart (2014-02-04 02:41:10+00:00)
Title: better document null search window

Hopefully this patch makes the code more:
* Self-documenting: Null search is always a zero window search, because it is testing for a fail high. It should never be done on a full window! The current code only works because we don't do it at PV nodes, and therefore (alpha, beta) = (beta-1, beta): that's the kind of "clever" trick we should avoid.
* Idiot-proof: If we want to enable null search at PV nodes, all we need to do now is comment out the !PvNode condition. It's that simple!

In theory, null search should not be done at PV nodes, because PV nodes should never fail high. But in practice, they DO fail high, because of aspiration windows, and search inconsistencies, for example. So it makes sense to keep that flexibility in the code.

No functional change.