X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=a26a7bc41c6dbf717231afcd9da6d06fd0656e2a;hp=b24e8c4ea1e6d87f2e0b55b9452990e632e7f2b0;hb=7d2a79f0372d67f3d66bd07bf637eae02038831c;hpb=7c5d724724e826ff1fd9a97c8812d5a4bffaaa84 diff --git a/src/search.cpp b/src/search.cpp index b24e8c4e..a26a7bc4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1159,7 +1159,7 @@ moves_loop: // When in check search starts from here && !pos.captured_piece_type() && is_ok((ss-1)->currentMove)) { - Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + depth / ONE_PLY - 1); + Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + 2 * depth / ONE_PLY - 2); if ((ss-2)->counterMoves) (ss-2)->counterMoves->update(pos.piece_on(prevSq), prevSq, bonus); @@ -1439,7 +1439,7 @@ moves_loop: // When in check search starts from here ss->killers[0] = move; } - Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + depth / ONE_PLY - 1); + Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + 2 * depth / ONE_PLY - 2); Square prevSq = to_sq((ss-1)->currentMove); CounterMoveStats* cmh = (ss-1)->counterMoves; @@ -1480,13 +1480,13 @@ moves_loop: // When in check search starts from here if ((ss-1)->moveCount == 1 && !pos.captured_piece_type()) { if ((ss-2)->counterMoves) - (ss-2)->counterMoves->update(pos.piece_on(prevSq), prevSq, -bonus - 2 * (depth + 1) / ONE_PLY); + (ss-2)->counterMoves->update(pos.piece_on(prevSq), prevSq, -bonus - 2 * (depth + 1) / ONE_PLY - 1); if ((ss-3)->counterMoves) - (ss-3)->counterMoves->update(pos.piece_on(prevSq), prevSq, -bonus - 2 * (depth + 1) / ONE_PLY); + (ss-3)->counterMoves->update(pos.piece_on(prevSq), prevSq, -bonus - 2 * (depth + 1) / ONE_PLY - 1); if ((ss-5)->counterMoves) - (ss-5)->counterMoves->update(pos.piece_on(prevSq), prevSq, -bonus - 2 * (depth + 1) / ONE_PLY); + (ss-5)->counterMoves->update(pos.piece_on(prevSq), prevSq, -bonus - 2 * (depth + 1) / ONE_PLY - 1); } }