Closed robertnurnberg closed 8 months ago
This appears to be a bug in Stockfish, including the latest 16.1.
UCI input:
setoption name Threads value 6
position fen 8/3p4/2pP4/4P3/1k6/3RN2p/2PP3K/3R4 w - - 0 1
go mate 2
Occasionally observing output like:
Stockfish 16.1 by the Stockfish developers (see AUTHORS file)
info string NNUE evaluation using nn-baff1ede1f90.nnue
info string NNUE evaluation using nn-b1a57edbea57.nnue
info depth 1 seldepth 4 multipv 1 score cp 769 nodes 996 nps 996000 hashfull 0 tbhits 0 time 1 pv d3b3 b4a4
info depth 2 seldepth 4 multipv 1 score cp 814 nodes 1667 nps 1667000 hashfull 0 tbhits 0 time 1 pv d3b3 b4a5 h2h3
info depth 4 seldepth 4 multipv 1 score cp 960 nodes 1667 nps 1667000 hashfull 0 tbhits 0 time 1 pv d3b3
bestmove d3b3 ponder b4a5
Ouch, thanks for spotting this.
Ok, so it seems in some cases stockfish does not send the last uci info with the mate score. Closing this issue.
Running the attached script several times will eventually yield an output of the form below.
Notice the line score +980 (d6, nodes 1912) PV: d3b3 which should really be a score #+2.
The output also highlights an issue with mated-in positions, where python-chess will regularly stop the search before the requested mate is reached.
The script I used is as follows.