From: Fabian Fichter Date: Sun, 21 Jun 2020 10:50:08 +0000 (+0200) Subject: Evaluate promoted drops for hand pieces X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1a8078fbc9f4caa8ca7daa8876e29ef19a28a9b0;p=fairystockfish.git Evaluate promoted drops for hand pieces kyotoshogi LLR: 2.98 (-2.94,2.94) [0.00,10.00] Total: 512 W: 306 L: 197 D: 9 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index eab948a..78ba6ab 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -446,6 +446,9 @@ namespace { } Bitboard theirHalf = pos.board_bb() & ~forward_ranks_bb(Them, relative_rank(Them, Rank((pos.max_rank() - 1) / 2), pos.max_rank())); mobility[Us] += DropMobility * popcount(b & theirHalf & ~attackedBy[Them][ALL_PIECES]); + if (pos.promoted_piece_type(pt) != NO_PIECE_TYPE && pos.drop_promoted()) + score += make_score(std::max(PieceValue[MG][pos.promoted_piece_type(pt)] - PieceValue[MG][pt], VALUE_ZERO), + std::max(PieceValue[EG][pos.promoted_piece_type(pt)] - PieceValue[EG][pt], VALUE_ZERO)) / 4 * pos.count_in_hand(Us, pt); } return score;