mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 06:17:49 +00:00
Update gensfen.cpp
* Terminate game by 3-fold repetition. * Fix segmentation fault by properly initializing the random_multi_pv_depth.
This commit is contained in:
@@ -110,6 +110,8 @@ namespace Learner
|
|||||||
save_every = std::max(save_every, REPORT_STATS_EVERY);
|
save_every = std::max(save_every, REPORT_STATS_EVERY);
|
||||||
|
|
||||||
num_threads = Options["Threads"];
|
num_threads = Options["Threads"];
|
||||||
|
|
||||||
|
random_multi_pv_depth = std::max(search_depth_max, random_multi_pv_depth);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -489,8 +491,11 @@ namespace Learner
|
|||||||
// draw at the maximum number of steps to write.
|
// draw at the maximum number of steps to write.
|
||||||
const int ply = move_hist_scores.size();
|
const int ply = move_hist_scores.size();
|
||||||
|
|
||||||
// has it reached the max length or is a draw
|
// has it reached the max length or is a draw by fifty-move rule
|
||||||
if (ply >= params.write_maxply || pos.is_draw(ply))
|
// or by 3-fold repetition
|
||||||
|
if (ply >= params.write_maxply
|
||||||
|
|| pos.is_fifty_move_draw()
|
||||||
|
|| pos.is_three_fold_repetition())
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user