From: Joost VandeVondele Date: Tue, 5 Oct 2021 20:14:13 +0000 (+0200) Subject: Improve the Chess960 correction for cornered bishops X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=329bdbd9cfa270dd7141e5184180fbde1b5898b4 Improve the Chess960 correction for cornered bishops As Chess960 patches can not be tested on fishtest, this was locally tuned and tested: Elo: 2.36 +- 1.07 LOS: 0.999992 closes https://github.com/official-stockfish/Stockfish/pull/3730 Bench: 5714575 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 62d4be84..58dd0026 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1053,26 +1053,22 @@ make_v: if ( pos.piece_on(SQ_A1) == W_BISHOP && pos.piece_on(SQ_B2) == W_PAWN) - correction += !pos.empty(SQ_B3) ? -CorneredBishop * 4 - : -CorneredBishop * 3; + correction -= CorneredBishop; if ( pos.piece_on(SQ_H1) == W_BISHOP && pos.piece_on(SQ_G2) == W_PAWN) - correction += !pos.empty(SQ_G3) ? -CorneredBishop * 4 - : -CorneredBishop * 3; + correction -= CorneredBishop; if ( pos.piece_on(SQ_A8) == B_BISHOP && pos.piece_on(SQ_B7) == B_PAWN) - correction += !pos.empty(SQ_B6) ? CorneredBishop * 4 - : CorneredBishop * 3; + correction += CorneredBishop; if ( pos.piece_on(SQ_H8) == B_BISHOP && pos.piece_on(SQ_G7) == B_PAWN) - correction += !pos.empty(SQ_G6) ? CorneredBishop * 4 - : CorneredBishop * 3; + correction += CorneredBishop; - return pos.side_to_move() == WHITE ? Value(correction) - : -Value(correction); + return pos.side_to_move() == WHITE ? Value(5 * correction) + : -Value(5 * correction); } } // namespace Eval