From: Fabian Fichter Date: Sun, 1 Mar 2020 19:08:43 +0000 (+0100) Subject: Improve evaluation of checks by piece drops X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8217676d79588bcd028fd38393d15779545ce20c;p=fairystockfish.git Improve evaluation of checks by piece drops shogun LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 426 W: 243 L: 143 D: 40 pocketknight STC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 2526 W: 748 L: 648 D: 1130 http://www.variantfishtest.org:6543/tests/view/5e5b92a66e23db46beba4f20 pocketknight LTC LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 1691 W: 505 L: 415 D: 771 http://www.variantfishtest.org:6543/tests/view/5e5bb85d6e23db46beba4f2a --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index cf696d0..34f8bcb 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -483,7 +483,7 @@ namespace { b2 = attacks_bb(ksq, pos.pieces() ^ pos.pieces(Us, QUEEN)); std::function get_attacks = [this](Color c, PieceType pt) { - return attackedBy[c][pt] | (pos.captures_to_hand() && pos.count_in_hand(c, pt) ? ~pos.pieces() : Bitboard(0)); + return attackedBy[c][pt] | (pos.piece_drops() && pos.count_in_hand(c, pt) ? pos.drop_region(c, pt) & ~pos.pieces() : Bitboard(0)); }; for (PieceType pt : pos.piece_types()) { @@ -514,7 +514,7 @@ namespace { unsafeChecks |= knightChecks; break; case PAWN: - if (pos.captures_to_hand() && pos.count_in_hand(Them, pt)) + if (pos.piece_drops() && pos.count_in_hand(Them, pt)) { pawnChecks = attacks_bb(Us, pt, ksq, pos.pieces()) & ~pos.pieces() & pos.board_bb(); if (pawnChecks & safe)