"something is not yet working..."syzygy wrote:Something is not yet workingbob wrote:Where I am is here:
I have a position that is a cursed win (KNNKP, nalimov says mate in 97). I probe the position and I get the expected "cursed win" return. But then when I make one of the legal moves and probe, I get "tb win" and when I probe another move, I get not found. Most of the moves seem to produce the correct result.
I am looking at this.
Make sure you don't call probe_wdl_table() and probe_dtz_table() directly. The tables store incomplete data which is completed by the probe_wdl() and probe_dtz() functions.
It was in tbprobe.cpp. There were actually two bug fixes (the second "sign" bug was fixed in SF quite a while ago already):But a question. The bug you fixed... was it in tbcore or elsewhere? IE do I need to throw out the tbprobe.c and start again or is the fix easy to insert? I will go back and look up the stockfish discussion here to see if there was a fix given...
https://github.com/syzygy1/tb/commit/68 ... 62d9762142
Instead of calling probe_ab() or probe_wdl() at linest 488-490 depending on the existence of ep rights, you could also simply call probe_wdl().
There is another small bug that Marco pointed out and was not yet fixed in my repository (just applied it):
https://github.com/syzygy1/tb/commit/c6 ... e948192dc8
List of all commits:
https://github.com/syzygy1/tb/commits/master
"no shit sherlock".

I decided to directly use probe_dtz() and probe_wdl() (after getting rid of the static identifiers of course). Now I am getting sensible stuff. Probably an error elsewhere and this is a cleaner deal. I really don't need "probe_root()" since I do my own stuff there anyway. So i am now working on swindle mode and have correct dtz/wdl results to use. In the process I learned that apparently a bool in C++ is a single byte, which never occurred to me (but then I avoid C++ in general, anyway).
I'll look at the fixes when I get the rest of this stuff done. Code in search looks to be perfect, but swindle mode is a bit tricky since one has to watch out for probing before and after a move and remember that things "change"

But I am getting pretty close.