hgm wrote:Eelco de Groot wrote:"Would be null move pruning" is not such a bad term actually
That is actually a difference in code with Stockfish 4, it is an idea from Lucas. Stockfish 4 and all the older Stockfishes already did much the same, but only in the last 4 plies. It was called "static null move pruning" but there was no null move involved and the engine did not even do a search, or a reduced search for it. It just looked at the eval and if static evaluation of the node was sufficiently good above alpha, futility margin above alpha, it just returned the eval minus the futility margin.
Pruning based on the static evaluation (and some margin) is what has been known as 'futility pruning' / 'razoring' (depending on the depth where you did it) for the past few decades, right?
Okay Harm asked for something new, I just had a very little idea related to this piece of code; Static null move pruning is related to null move pruning, not only because of the similar precondition that the static evaluation has to be good. I thought however, we could relax the condition of not doing static null move pruning in late endgames, because we are not really passing the move so, I thought, less danger of Zugzwang... However we
are standing pat when at the same time we do have the move here (as opposed to the related piece of futility pruning code in the parent node). I call this little piece of code 'standing pat' in Serpent instead of static nullmove or futility, because of its relation to standing pat in quiescence search.
By the way for those not familiar with the term standing pat (pat I think is a Dutch chess term for stalemate, but I'm not quite sure that is the origin of its use in chess programming, and it is generally used by computer chess programmers now, not only Dutch so maybe it is known in other languages as well as a a general chess term), there is more about standing pat on HGM's page of MicroMax
http://home.hccnet.nl/h.g.muller/futile.html
I remember reading a little bit on this page about standing pat, it was some years ago though, and I have not studied things like MVV/LVA QS that is also described there by Harm-Geert.
So I'm not so sure about relaxing the condition anymore, if we should require here also that the side to move has to have some piece, not just pawns to allow static null move/standing pat. But if this is related to standing pat in general, should it maybe not be the same in the quiescence search? Currently Stockfish does not do this. I have not actually tried it yet but at least the bench is about the same for the version that limits standing pat for quiescence search in pawn endgames:
Stockfish-master20131219_003
with Scid Serpent changes
===========================
Total time (ms) : 9037
Nodes searched : 6794514
Nodes/second : 751855
Just made this:
Stockfish-master20131219_008
with Scid Serpent changes and 'stand pat'
change
===========================
Total time (ms) : 9063
Nodes searched : 6641453
Nodes/second : 732809
I'm always happy when the bench goes down
Code: Select all
// Stand pat. Return immediately if static value is at least beta
if ( bestValue >= beta
&& pos.non_pawn_material(pos.side_to_move())) // <-new condition here
{
if (!tte)
TT.store(pos.key(), value_to_tt(bestValue, ss->ply), BOUND_LOWER,
DEPTH_NONE, MOVE_NONE, ss->staticEval);
return bestValue;
}
Eelco