Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Overlapping comparison in syzygy #394
Correct, it should be "v1 >= 0 || v1 < -100".
This is part of en passant handling. v1 is the DTZ score after the en passant capture, v is the DTZ score of the position assuming no ep is possible (the tables don't store en passant positions). The code then takes the "best" of v and v1 (unless the position without ep is stalemate!).
The probing code of my private engine has the same typo / bug.
added a commit
Aug 25, 2015
pushed a commit
Sep 2, 2015
added a commit
Sep 3, 2015
I already gave an explanation on github.
To: official-stockfish/Stockfish Stockfish@noreply.github.com
Thank you! But does Joonas explanation of the logic here
Below is the RdM's explanation for "cursed win" and "cursed loss" in syzygy which are indeed connected with the 50-move rule.
"Anyway, this is all not a problem for my tablebases. If the engine wants to ignore the 50-move rule for tablebase positions, it can ignore the 50-move rule when using my tablebases. This is because my tablebases do not store a draw by the 50-move rule as a draw, but as a "cursed win" or "cursed loss". The engine can simply treat "cursed wins" as real wins and "cursed losses" as real losses. Or it can honor the 50-move rule and treat both of them as draws. Or it can bluff and treat cursed wins by the engine as wins and cursed losses as draws."
So, RdM's explanation for what this patch does:
"This is part of en passant handling. v1 is the DTZ score after the en passant capture, v is the DTZ score of the position assuming no ep is possible (the tables don't store en passant positions). The code then takes the "best" of v and v1 (unless the position without ep is stalemate!).
is indeed correctly understood by Joona who describes it more clearly.
I wanted to test this patch on the framework but it does not test syzygy at present. Another option is to find positions close to endgame that include en passant moves and test with or w/o syzygy.