X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=40808c6adfc77797484fb196cb8c14310d16837e;hp=44bd9530d3e6a5f362de24fcb1ce438b5e86d24c;hb=d4575941974ade5135971b87ff663ef4ff000de9;hpb=e817a55bc6cc60b831f74ce5c180ec8b07c41d8a diff --git a/src/search.cpp b/src/search.cpp index 44bd9530..40808c6a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -652,6 +652,7 @@ void SearchStack::init(int ply) { pv[ply] = pv[ply + 1] = MOVE_NONE; currentMove = threatMove = MOVE_NONE; reduction = Depth(0); + eval = VALUE_NONE; } void SearchStack::initKillers() { @@ -1391,6 +1392,7 @@ namespace { const int FutilityValueMargin = 112 * bitScanReverse32(int(depth) * int(depth) / 2); // Enhance score accuracy with TT value if possible + ss[ply].eval = staticValue; futilityValue = staticValue + FutilityValueMargin; staticValue = refine_eval(tte, staticValue, ply); @@ -1445,8 +1447,9 @@ namespace { } // Null move search not allowed, try razoring else if ( !value_is_mate(beta) + && !isCheck && depth < RazorDepth - && staticValue < beta - (depth > OnePly ? NullMoveMargin + 16 * depth : 2*NullMoveMargin) + && staticValue < beta - (NullMoveMargin + 16 * depth) && ss[ply - 1].currentMove != MOVE_NULL && ttMove == MOVE_NONE && !pos.has_pawn_on_7th(pos.side_to_move()))