diff --git a/src/search.cpp b/src/search.cpp index a080daf3..5b441546 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -119,7 +119,8 @@ void update_all_stats(const Position& pos, Square prevSq, ValueList& quietsSearched, ValueList& capturesSearched, - Depth depth); + Depth depth, + bool isTTMove); } // namespace @@ -1380,7 +1381,8 @@ moves_loop: // When in check, search starts here // If there is a move that produces search value greater than alpha, // we update the stats of searched moves. else if (bestMove) - update_all_stats(pos, ss, *this, bestMove, prevSq, quietsSearched, capturesSearched, depth); + update_all_stats(pos, ss, *this, bestMove, prevSq, quietsSearched, capturesSearched, depth, + bestMove == ttData.move); // Bonus for prior countermove that caused the fail low else if (!priorCapture && prevSq != SQ_NONE) @@ -1799,13 +1801,14 @@ void update_all_stats(const Position& pos, Square prevSq, ValueList& quietsSearched, ValueList& capturesSearched, - Depth depth) { + Depth depth, + bool isTTMove) { CapturePieceToHistory& captureHistory = workerThread.captureHistory; Piece moved_piece = pos.moved_piece(bestMove); PieceType captured; - int bonus = stat_bonus(depth); + int bonus = stat_bonus(depth) + 300 * isTTMove; int malus = stat_malus(depth); if (!pos.capture_stage(bestMove))