Handling UCI protocol and Stockfish / Glaurung behavior
Posted: Sun Jan 10, 2010 11:05 am
Hi,
I think some UCI engine does not handle correctly UCI protocol in some special circumstances, among them Stockfish (and of course some Glaurung versions, I did not check all).
For example with Stockfish 1.6, enter the following commands :
It is a mate in 2 but instead of stopping the output at depth 2, SF will output 200 lines of this pattern :
where D = [1..100]. This output could be avoided IMHO, making life easier for user interfaces, because parsing and translating this output takes time (the engine bombs the UI very quicly of course because life is pretty easy for it in that case, with a mate in 2 ). Note that if you set SF to use all your CPUs and cores, the UI does not get a lot of CPU power for itself, so it is always good to spare it.
Then just after this, if you enter
SF replies
where it should reply, if conforming to the UCI protocol with a "bestmove". See this extract :
Having said that, I have to say those engines are among the best in the world . Congratulations to the authors !
Pascal Georges
I think some UCI engine does not handle correctly UCI protocol in some special circumstances, among them Stockfish (and of course some Glaurung versions, I did not check all).
For example with Stockfish 1.6, enter the following commands :
Code: Select all
uci
position fen 7R/p5p1/1p4p1/n1pq2k1/6Q1/P2r3P/6P1/4R2K b - - 6 39
go infinite
Code: Select all
info depth D
info depth D score mate -2 time 129 nodes 10154 nps 78713 pv g5f6 h8f8 d5f7 g4f4
Then just after this, if you enter
Code: Select all
stop
Code: Select all
Unknown command: stop
And in the UCI protocol it is said that after a "go infinite" :* stop
stop calculating as soon as possible,
don't forget the "bestmove" and possibly the "ponder" token when finishing the search
This is what makes Stockfish feel frozen under Scid (it may affect other interfaces, I guess).search until the "stop" command. Do not exit the search without being told so in this mode!
Having said that, I have to say those engines are among the best in the world . Congratulations to the authors !
Pascal Georges