From 5f5b131b6df7453e8592a8e83ddfceaaf73762fd Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sun, 21 Jun 2020 14:04:28 +0200 Subject: [PATCH] Penalty for mandatory demotions kyotoshogi LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 776 W: 434 L: 323 D: 19 --- src/evaluate.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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; -- 1.7.0.4