From: VoyagerOne Date: Fri, 30 Oct 2015 20:39:21 +0000 (-0400) Subject: New History Bonus Formula X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=aa242d2f84eaf2307f34d5356079125eaf5ff26a New History Bonus Formula bonus = d^2 + d - 1 Bench: 8639247 Resolves #484 --- 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)); } }