Increase king danger for makpong
authorAda Joule <ada.fulmina@gmail.com>
Sat, 21 Mar 2020 19:28:14 +0000 (02:28 +0700)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 27 Mar 2020 17:57:10 +0000 (18:57 +0100)
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

src/evaluate.cpp
src/position.h

index 1b3f1df..3e5a885 100644 (file)
@@ -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
index 6d9c59f..31a9a63 100644 (file)
@@ -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;