-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not change cursed wins to draws #5805
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1952,6 +1952,7 @@ void syzygy_extend_pv(const OptionsMap& options, | |
|
||
auto t_start = std::chrono::steady_clock::now(); | ||
int moveOverhead = int(options["Move Overhead"]); | ||
bool rule50 = bool(options["Syzygy50MoveRule"]); | ||
|
||
// Do not use more than moveOverhead / 2 time, if time management is active | ||
auto time_abort = [&t_start, &moveOverhead, &limits]() -> bool { | ||
|
@@ -1989,7 +1990,7 @@ void syzygy_extend_pv(const OptionsMap& options, | |
pos.do_move(pvMove, st); | ||
|
||
// Do not allow for repetitions or drawing moves along the PV in TB regime | ||
if (config.rootInTB && pos.is_draw(ply)) | ||
if (config.rootInTB && ((rule50 && pos.is_draw(ply)) || pos.has_repeated())) | ||
{ | ||
pos.undo_move(pvMove); | ||
ply--; | ||
|
@@ -2008,7 +2009,7 @@ void syzygy_extend_pv(const OptionsMap& options, | |
// Step 2, now extend the PV to mate, as if the user explored syzygy-tables.info | ||
// using top ranked moves (minimal DTZ), which gives optimal mates only for simple | ||
// endgames e.g. KRvK. | ||
while (!pos.is_draw(0)) | ||
while (!((rule50 && pos.is_draw(0)) || pos.has_repeated())) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could be similar. |
||
{ | ||
if (time_abort()) | ||
break; | ||
|
@@ -2061,7 +2062,7 @@ void syzygy_extend_pv(const OptionsMap& options, | |
// We adjust the score to match the found PV. Note that a TB loss score can be | ||
// displayed if the engine did not find a drawing move yet, but eventually search | ||
// will figure it out (e.g. 1kq5/q2r4/5K2/8/8/8/8/7Q w - - 96 1 ) | ||
if (pos.is_draw(0)) | ||
if (rule50 && pos.is_draw(0)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also here not necessarily equivalent with 3-folds, not sure we can have that case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since |
||
v = VALUE_DRAW; | ||
|
||
// Undo the PV moves | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pos.is_draw(ply)
andpos.has_repeated()
are different in how they flag 2 and 3 fold repetitions. However, it might be thatpos.has_repeated()
but that needs some motivation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I tried minimal changes at first, and did not want to add a new function to the code base at this stage. We may eventually have to, but I do not know.