From e9e6e47a93c5512204a55aa7416bf133b8ef6671 Mon Sep 17 00:00:00 2001 From: Tomasz Sobczyk Date: Sun, 6 Sep 2020 12:47:37 +0200 Subject: [PATCH] Fix write_out_draw_game_in_training_data_generation flag not being respected. --- src/learn/gensfen.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/learn/gensfen.cpp b/src/learn/gensfen.cpp index 23d7e2c6..39edc699 100644 --- a/src/learn/gensfen.cpp +++ b/src/learn/gensfen.cpp @@ -502,6 +502,12 @@ namespace Learner // sfens has already been reached and the process ends. bool MultiThinkGenSfen::commit_psv(PSVector& sfens, size_t thread_id, int8_t lastTurnIsWin) { + if (!write_out_draw_game_in_training_data_generation && lastTurnIsWin == 0) + { + // We didn't write anything so why quit. + return false; + } + int8_t is_win = lastTurnIsWin; // From the final stage (one step before) to the first stage, give information on the outcome of the game for each stage.