Re-enable endgame code for large-board version
authorFabian Fichter <ianfab@users.noreply.github.com>
Thu, 1 Aug 2019 22:35:19 +0000 (00:35 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Mon, 5 Aug 2019 18:44:36 +0000 (20:44 +0200)
chess STC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 1221 W: 291 L: 253 D: 677
http://35.161.250.236:6543/tests/view/5d43fddc6e23db34f4206d2f

chess LTC
LLR: 3.00 (-2.94,2.94) [-10.00,5.00]
Total: 924 W: 174 L: 136 D: 614
http://35.161.250.236:6543/tests/view/5d44270a6e23db34f4206d36

capablanca STC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 3460 W: 1367 L: 1334 D: 759
http://35.161.250.236:6543/tests/view/5d43fdfc6e23db34f4206d32

capablanca LTC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 2306 W: 879 L: 840 D: 587
http://35.161.250.236:6543/tests/view/5d4426ff6e23db34f4206d34

src/endgame.cpp
src/material.cpp

index 4da5e0d..861ea77 100644 (file)
@@ -209,6 +209,7 @@ Value Endgame<KPK>::operator()(const Position& pos) const {
 
   Value result;
   if (   pos.promotion_rank() == RANK_8
+      && RANK_MAX == RANK_8
       && pos.promotion_piece_types().find(QUEEN) != pos.promotion_piece_types().end())
   {
       if (!Bitbases::probe(wksq, psq, bksq, us))
@@ -963,6 +964,7 @@ ScaleFactor Endgame<KPKP>::operator()(const Position& pos) const {
   // Probe the KPK bitbase with the weakest side's pawn removed. If it's a draw,
   // it's probably at least a draw even with the pawn.
   if (   pos.promotion_rank() == RANK_8
+      && RANK_MAX == RANK_8
       && pos.promotion_piece_types().find(QUEEN) != pos.promotion_piece_types().end())
       return Bitbases::probe(wksq, psq, bksq, us) ? SCALE_FACTOR_NONE : SCALE_FACTOR_DRAW;
   else
index 2d08a26..158b98d 100644 (file)
@@ -151,12 +151,7 @@ Entry* probe(const Position& pos) {
   else
       e->gamePhase = Phase(((npm - EndgameLimit) * PHASE_MIDGAME) / (MidgameLimit - EndgameLimit));
 
-#ifdef LARGEBOARDS
-  // Disable endgame evaluation until it works independent of board size
-  if (false)
-#else
   if (pos.endgame_eval())
-#endif
   {
   // Let's look if we have a specialized evaluation function for this particular
   // material configuration. Firstly we look for a fixed configuration one, then