From: Ada Joule Date: Sat, 21 Mar 2020 19:28:14 +0000 (+0700) Subject: Increase king danger for makpong X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e88a8f26c8f4bfdc0388cbf71bc3448171cbd4a4;p=fairystockfish.git Increase king danger for makpong makpong STC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 437 W: 191 L: 108 D: 138 http://35.161.250.236:6543/tests/view/5e7dfc766e23db4f73614ab1 makpong LTC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 385 W: 169 L: 88 D: 128 http://35.161.250.236:6543/tests/view/5e7e15c56e23db4f73614abe --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 1b3f1df..3e5a885 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -572,7 +572,7 @@ namespace { + 69 * kingAttacksCount[Them] * (2 + 8 * pos.check_counting() + pos.captures_to_hand()) / 2 + 3 * kingFlankAttack * kingFlankAttack / 8 + mg_value(mobility[Them] - mobility[Us]) - - 873 * !(pos.major_pieces(Them) || pos.captures_to_hand() || pos.king_type() == WAZIR) / (1 + pos.check_counting() + pos.two_boards()) + - 873 * !(pos.major_pieces(Them) || pos.captures_to_hand() || pos.king_type() == WAZIR) / (1 + pos.check_counting() + pos.two_boards() + pos.makpong()) - 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING]) - 6 * mg_value(score) / 8 - 4 * kingFlankDefense diff --git a/src/position.h b/src/position.h index 6d9c59f..31a9a63 100644 --- a/src/position.h +++ b/src/position.h @@ -141,6 +141,7 @@ public: bool seirawan_gating() const; bool cambodian_moves() const; bool unpromoted_soldier(Color c, Square s) const; + bool makpong() const; // winning conditions int n_move_rule() const; int n_fold_rule() const; @@ -573,6 +574,11 @@ inline bool Position::unpromoted_soldier(Color c, Square s) const { return var->xiangqiSoldier && relative_rank(c, s, var->maxRank) <= RANK_5; } +inline bool Position::makpong() const { + assert(var != nullptr); + return var->makpongRule; +} + inline int Position::n_move_rule() const { assert(var != nullptr); return var->nMoveRule;