From: Fabian Fichter Date: Sun, 21 Jun 2020 12:04:28 +0000 (+0200) Subject: Penalty for mandatory demotions X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5f5b131b6df7453e8592a8e83ddfceaaf73762fd;p=fairystockfish.git Penalty for mandatory demotions kyotoshogi LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 776 W: 434 L: 323 D: 19 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 78ba6ab..af5b918 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -337,6 +337,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.piece_demotion() && 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)]) / 4; 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;