zero-evaluator / scripts /rescorer-optional-syzygy.patch
Pawitt's picture
Add lc0 self-play and Lichess Elite position collections
0040de1 verified
Raw History Blame Contribute Delete
1.24 kB
diff --git a/src/selfplay/loop.cc b/src/selfplay/loop.cc
index a0a03d7..6bc4736 100644
--- a/src/selfplay/loop.cc
+++ b/src/selfplay/loop.cc
@@ -905,7 +905,7 @@ void ProcessFile(const std::string& file, SyzygyTablebase* tablebase,
const auto& board = history.Last().GetBoard();
if (board.castlings().no_legal_castle() &&
(board.ours() | board.theirs()).count() <= 3 &&
- board.pawns().empty()) {
+ tablebase->max_cardinality() >= 3 && board.pawns().empty()) {
ProbeState state;
WDLScore wdl = tablebase->probe_wdl(history.Last(), &state);
// Only fail state means the WDL is wrong, probe_wdl may produce
@@ -1239,8 +1239,9 @@ void RescoreLoop::RunLoop() {
if (!tablebase.init(
options_.GetOptionsDict().Get<std::string>(kSyzygyTablebaseId)) ||
tablebase.max_cardinality() < 3) {
- std::cerr << "FAILED TO LOAD SYZYGY" << std::endl;
- return;
+ std::cerr << "No Syzygy tablebases loaded; continuing without tablebase "
+ "rescoring. Positions and moves are unaffected."
+ << std::endl;
}
auto dtmPaths =
options_.GetOptionsDict().Get<std::string>(kGaviotaTablebaseId);