From 2cdfdcfb184fbfe851257f92447dac46b7bd5ea0 Mon Sep 17 00:00:00 2001 From: Michael Chaly Date: Wed, 13 Nov 2024 20:43:04 +0300 Subject: [PATCH] Adjust statscore for captures Instead of using quiet histories use capture history with a different offset. --- src/search.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 58b42b93..f20dffd8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1089,9 +1089,14 @@ Value Search::Worker::search( else if (move == ttData.move) r -= 2; - ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()] - + (*contHist[0])[movedPiece][move.to_sq()] - + (*contHist[1])[movedPiece][move.to_sq()] - 4241; + if (capture) + ss->statScore = + thisThread->captureHistory[movedPiece][move.to_sq()][type_of(pos.captured_piece())] + - 13000; + else + ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()] + + (*contHist[0])[movedPiece][move.to_sq()] + + (*contHist[1])[movedPiece][move.to_sq()] - 4241; // Decrease/increase reduction for moves with a good/bad history (~8 Elo) r -= ss->statScore / 7600;