]> git.sesse.net Git - stockfish/commit - src/syzygy/tbprobe.h
Fix tablebase probe for dtz >1000 w/o 50 move rule
authorRodrigo Roim <roim.rodrigo@gmail.com>
Fri, 7 Oct 2022 23:55:07 +0000 (16:55 -0700)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sun, 16 Oct 2022 10:58:48 +0000 (12:58 +0200)
commit79c5f3a69247b44ee6362a3d9236cd9bc048c5f5
tree0ac02276815f02947eefff36b62644887b8c76cc
parent9be2977da7921aedfd3215f1f4b5f522359effa0
Fix tablebase probe for dtz >1000 w/o 50 move rule

For qn4N1/6R1/3K4/8/B2k4/8/8/8 w - - 0 1, white loses with DTZ 1034.
See https://syzygy-tables.info/?fen=qn4N1/6R1/3K4/8/B2k4/8/8/8_w_-_-_0_1

Prior to this fix, due to a too small hard-coded value, Stockfish interpreted this as winning.
The new value picked (1<<18) is large enough to deal with the largest DTZ values that can be stored in the current syzygy format.

closes https://github.com/official-stockfish/Stockfish/pull/4187

No functional change.
AUTHORS
src/syzygy/tbprobe.cpp
src/syzygy/tbprobe.h