X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=a9e76c452d9ae958603d7bc3efa7ca7dac8ce05c;hp=7029ae032ef8ba2703a7fa5080f4f319628fcf46;hb=72a501c6fe5e4e7b61291e9603d0c6cc0902e618;hpb=30c583204f97da2c67b5042c30327013e70ae209 diff --git a/src/search.cpp b/src/search.cpp index 7029ae03..a9e76c45 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -97,8 +97,8 @@ namespace { Move best = MOVE_NONE; }; - // EasyMoveManager structure is used to detect an 'easy move'. When the PV is - // stable across multiple search iterations, we can quickly return the best move. + // EasyMoveManager structure is used to detect an 'easy move'. When the PV is stable + // across multiple search iterations, we can quickly return the best move. struct EasyMoveManager { void clear() { @@ -635,7 +635,7 @@ namespace { // Penalty for a quiet ttMove that fails low else if (!pos.capture_or_promotion(ttMove)) { - Value penalty = -stat_bonus(depth + ONE_PLY); + Value penalty = -stat_bonus(depth); thisThread->history.update(pos.side_to_move(), ttMove, penalty); update_cm_stats(ss, pos.moved_piece(ttMove), to_sq(ttMove), penalty); } @@ -898,6 +898,7 @@ moves_loop: // When in check search starts from here // Step 13. Pruning at shallow depth if ( !rootNode + && pos.non_pawn_material(pos.side_to_move()) && bestValue > VALUE_MATED_IN_MAX_PLY) { if ( !captureOrPromotion @@ -1125,10 +1126,11 @@ moves_loop: // When in check search starts from here && cm_ok) update_cm_stats(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth)); - tte->save(posKey, value_to_tt(bestValue, ss->ply), - bestValue >= beta ? BOUND_LOWER : - PvNode && bestMove ? BOUND_EXACT : BOUND_UPPER, - depth, bestMove, ss->staticEval, TT.generation()); + if(!excludedMove) + tte->save(posKey, value_to_tt(bestValue, ss->ply), + bestValue >= beta ? BOUND_LOWER : + PvNode && bestMove ? BOUND_EXACT : BOUND_UPPER, + depth, bestMove, ss->staticEval, TT.generation()); assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);