#include "thread.h"
#include "tt.h"
#include "uci.h"
-
-#ifdef SYZYGY
#include "syzygy/tbprobe.h"
-#endif
namespace Search {
}
else
{
-#ifdef SYZYGY
// Check Tablebases at root
int piecesCnt = RootPos.total_piece_count();
TBCardinality = Options["SyzygyProbeLimit"];
: TBScore;
}
}
-#endif
for (size_t i = 0; i < Threads.size(); ++i)
Threads[i]->maxPly = 0;
return ttValue;
}
-#ifdef SYZYGY
// Step 4a. Tablebase probe
if ( !RootNode
&& pos.total_piece_count() <= TBCardinality
return value;
}
}
-#endif
// Step 5. Evaluate the position statically and update parent's gain statistics
if (inCheck)
Depth d = updated ? depth : depth - ONE_PLY;
Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore;
- bool tb = RootInTB;
- if (tb)
- {
- if (abs(v) >= VALUE_MATE - MAX_PLY)
- tb = false;
- else
- v = TBScore;
- }
+ bool tb = RootInTB && abs(v) < VALUE_MATE - MAX_PLY;
+ v = tb ? TBScore : v;
if (ss.rdbuf()->in_avail()) // Not at first line
ss << "\n";