X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=55d11003354b8da3e50c6c19648bc20bb86d721b;hb=b4b704e6866bde21c69cd53457a6a91a15182b36;hp=aaf545d26580c0d42f852242677bb34483d13cc9;hpb=1cb9afbdc04fbb864ee48babe56c1e88867d11e9;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index aaf545d2..55d11003 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -745,6 +745,8 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo { int bonus = std::clamp(-18 * int((ss - 1)->staticEval + ss->staticEval), -1812, 1812); thisThread->mainHistory[~us][from_to((ss - 1)->currentMove)] << bonus; + if (type_of(pos.piece_on(prevSq)) != PAWN && type_of((ss - 1)->currentMove) != PROMOTION) + thisThread->pawnHistory[pawn_structure(pos)][pos.piece_on(prevSq)][prevSq] << bonus / 4; } // Set up the improving flag, which is true if current static evaluation is