2

I am working on migrating an existing Java Stockfish wrapper to make it independent of Stockfish version it is working with. Initially it was built based on Stockfish version 10. Now it is not working anymore with the latest version, which is 16.1.

The reason being is that, back at version 10, at least in the initial position, a plain "go" request would be executed as having depth=9 i.e.:

Stockfish 10 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
go
info depth 1 seldepth 1 multipv 1 score cp 116 nodes 20 nps 20000 tbhits 0 time 1 pv e2e4
info depth 2 seldepth 2 multipv 1 score cp 112 nodes 54 nps 13500 tbhits 0 time 4 pv e2e4 b7b6
info depth 3 seldepth 3 multipv 1 score cp 148 nodes 136 nps 27200 tbhits 0 time 5 pv d2d4 d7d6 e2e4
info depth 4 seldepth 4 multipv 1 score cp 137 nodes 247 nps 49400 tbhits 0 time 5 pv d2d4 e7e6 e2e4 c7c6
info depth 5 seldepth 5 multipv 1 score cp 77 nodes 1157 nps 192833 tbhits 0 time 6 pv c2c3 d7d5 d2d4 b8c6 c1g5
info depth 6 seldepth 6 multipv 1 score cp 83 nodes 2250 nps 321428 tbhits 0 time 7 pv e2e4 b8c6 d2d4 d7d6 f1c4 g8f6
info depth 7 seldepth 7 multipv 1 score cp 67 nodes 4481 nps 497888 tbhits 0 time 9 pv e2e4 e7e5 d2d4 e5d4 d1d4 b8c6 d4d1
info depth 8 seldepth 8 multipv 1 score cp 60 nodes 7849 nps 713545 tbhits 0 time 11 pv e2e4 e7e5 g1f3 d7d5 d2d4 b8c6 f3e5
info depth 9 seldepth 8 multipv 1 score cp 60 nodes 9285 nps 773750 tbhits 0 time 12 pv e2e4 e7e5 g1f3 d7d5 d2d4 b8c6 f3e5
bestmove e2e4 ponder e7e5

At version 16.1 though, a plain "go" request doesn't seem to have any depth i.e. it doesn't automatically stop until a "stop" command is explicitly issued i.e.:

Stockfish 16.1 by the Stockfish developers (see AUTHORS file)
go
info string NNUE evaluation using nn-baff1ede1f90.nnue
info string NNUE evaluation using nn-b1a57edbea57.nnue
info depth 1 seldepth 2 multipv 1 score cp 0 nodes 20 nps 2857 hashfull 0 tbhits 0 time 7 pv d2d4
info depth 2 seldepth 2 multipv 1 score cp 12 nodes 44 nps 5500 hashfull 0 tbhits 0 time 8 pv a2a3
info depth 3 seldepth 2 multipv 1 score cp 50 nodes 69 nps 8625 hashfull 0 tbhits 0 time 8 pv d2d4
...
info depth 46 seldepth 56 multipv 1 score cp 22 upperbound nodes 320623368 nps 587728 hashfull 1000 tbhits 0 time 545530 pv d2d4 d7d5
info depth 46 currmove d2d4 currmovenumber 1
stop
info depth 46 seldepth 56 multipv 1 score cp 22 upperbound nodes 342435468 nps 584140 hashfull 1000 tbhits 0 time 586221 pv d2d4 d7d5
bestmove d2d4 ponder d7d5

I was wondering at which version exactly this change was made?

Lumachado
  • 25
  • 1
  • IIRC the "go" command actually executes "go depth 243," so there is a limit. – Hank's back rank Mar 14 '24 at 00:31
  • @Hank's back rank - Don't think there's anything in the UCI specs to that effect. I think you're probably right that there is a limit (different for different SF versions), but I doubt it's a fixed depth limit. Here is an example for SF8. Valid XHTML – Martin Rattigan Mar 14 '24 at 10:34
  • That didn't work too well, but it's two gos terminating at depths 5 and 8. – Martin Rattigan Mar 14 '24 at 10:44
  • Couldn't find a direct reference in source, but this comment claims that the max SF depth is 245, which is consistently mentioned throughout other comments https://github.com/official-stockfish/Stockfish/issues/2717#issuecomment-1107406692. – user35472 Mar 23 '24 at 20:44

0 Answers0