From: Fabian Fichter Date: Thu, 3 Jan 2019 21:33:10 +0000 (+0100) Subject: Bonus for promoted pieces in drop variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=9957ca2f998472de19d5616c7fb86786cecf88b6;p=fairystockfish.git Bonus for promoted pieces in drop variants Since they demote when being captured, promoted pieces are more valuable than the promotion piece type itself. minishogi LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 666 W: 375 L: 266 D: 25 shogi LLR: 2.97 (-2.94,2.94) [-10.00,5.00] Total: 1020 W: 529 L: 469 D: 22 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 345b1e1..e544705 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -355,6 +355,9 @@ namespace { score += make_score(PieceValue[MG][pos.promoted_piece_type(Pt)] - PieceValue[MG][Pt], PieceValue[EG][pos.promoted_piece_type(Pt)] - PieceValue[EG][Pt]) / 10; } + else if (pos.captures_to_hand() && pos.unpromoted_piece_on(s)) + score += make_score(PieceValue[MG][Pt] - PieceValue[MG][pos.unpromoted_piece_on(s)], + PieceValue[EG][Pt] - PieceValue[EG][pos.unpromoted_piece_on(s)]) / 8; // Penalty if the piece is far from the king if (pos.count(Us))