X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=e20eed9fe1f2da39cacebcc70347d520b2bc54e9;hp=fff9144d93152b1a7fd0469bdffa3d63877960c8;hb=aa242d2f84eaf2307f34d5356079125eaf5ff26a;hpb=8d858783e1bcf4266f30614c0f69677835976a22 diff --git a/src/search.cpp b/src/search.cpp index fff9144d..e20eed9f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1095,7 +1095,7 @@ moves_loop: // When in check search starts from here && is_ok((ss - 1)->currentMove) && is_ok((ss - 2)->currentMove)) { - Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY)); + Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + depth / ONE_PLY -1); Square prevPrevSq = to_sq((ss - 2)->currentMove); CounterMovesStats& prevCmh = CounterMovesHistory[pos.piece_on(prevPrevSq)][prevPrevSq]; prevCmh.update(pos.piece_on(prevSq), prevSq, bonus); @@ -1371,7 +1371,7 @@ moves_loop: // When in check search starts from here ss->killers[0] = move; } - Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY)); + Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + depth / ONE_PLY -1); Square prevSq = to_sq((ss-1)->currentMove); CounterMovesStats& cmh = CounterMovesHistory[pos.piece_on(prevSq)][prevSq]; @@ -1401,7 +1401,7 @@ moves_loop: // When in check search starts from here { Square prevPrevSq = to_sq((ss-2)->currentMove); CounterMovesStats& prevCmh = CounterMovesHistory[pos.piece_on(prevPrevSq)][prevPrevSq]; - prevCmh.update(pos.piece_on(prevSq), prevSq, -bonus - 2 * depth / ONE_PLY - 1); + prevCmh.update(pos.piece_on(prevSq), prevSq, -bonus - 2 * ((depth + 1) / ONE_PLY)); } }