X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=7cc51c60cb4f23e474f687e8e9c601a0b8d4c116;hp=ed7d6a3499e1838b025fb43b0328ee561bb93edc;hb=b95b1a970510b74dc567824ff428362e17e39066;hpb=b14846b6d74373762280420ffc97759113cf0c0c diff --git a/src/search.cpp b/src/search.cpp index ed7d6a34..7cc51c60 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1654,7 +1654,7 @@ namespace { if (bestValue >= beta) { // Store the score to avoid a future costly evaluation() call - if (!isCheck && !tte && ei.futilityMargin[pos.side_to_move()] == 0) + if (!isCheck && !tte && ei.kingDanger[pos.side_to_move()] == 0) TT.store(pos.get_key(), value_to_tt(bestValue, ply), VALUE_TYPE_EV_LO, Depth(-127*OnePly), MOVE_NONE); return bestValue; @@ -1673,7 +1673,7 @@ namespace { MovePicker mp = MovePicker(pos, ttMove, deepChecks ? Depth(0) : depth, H); CheckInfo ci(pos); enoughMaterial = pos.non_pawn_material(pos.side_to_move()) > RookValueMidgame; - futilityBase = staticValue + FutilityMarginQS + ei.futilityMargin[pos.side_to_move()]; + futilityBase = staticValue + FutilityMarginQS + ei.kingDanger[pos.side_to_move()]; // Loop through the moves until no moves remain or a beta cutoff occurs while ( alpha < beta @@ -1753,7 +1753,7 @@ namespace { { // If bestValue isn't changed it means it is still the static evaluation // of the node, so keep this info to avoid a future evaluation() call. - ValueType type = (bestValue == staticValue && !ei.futilityMargin[pos.side_to_move()] ? VALUE_TYPE_EV_UP : VALUE_TYPE_UPPER); + ValueType type = (bestValue == staticValue && !ei.kingDanger[pos.side_to_move()] ? VALUE_TYPE_EV_UP : VALUE_TYPE_UPPER); TT.store(pos.get_key(), value_to_tt(bestValue, ply), type, d, MOVE_NONE); } else if (bestValue >= beta)