I am using Stockfish 15.1 via UCI to analyse chess positions.

Unfortunately, the UCI documentation is a bit silent on how stalemates should be handled. As shown in the example below, it seems that stalemate results in the response "info depth 0 score cp 0".

Can I safely assume that this output only occurs in case the position is in stalemate? (E.g., my understanding is that positions that are mate will be answered by "mate 0").

Could a stalemate position provoke any other response from the engine than "info depth 0 score cp 0"?

Starting Stockfish analysis on fen 8/4R3/PB5k/6R1/7P/5B2/5PP1/7K b - - 0 45
Stockfish output: info string NNUE evaluation using nn-ad9b42354671.nnue enabled
Stockfish output: info depth 0 score cp 0
Stockfish output: bestmove (none)

Bonus question: Is there any other case where the engine responds with "bestmove (none)"? When would this be the case?

1 Answer 1


The uci protocol does not maintain the stalemate state of the position. However the engine can send this information via the info string command.

info string This position is stalemate.

If this engine is run in the gui, the gui may display This position is stalemate. to the user.

It is not safe to consider "info depth 0 score cp 0" as stalemate. It can be from 3-fold repetition, fifty-move draw rule or insufficient mating material.

The "bestmove (none)" is not according to uci protocol. The correct message should be sent as:

bestmove 0000

I tried to maintain the uci protocol in github repository, to improve and clarify it.

  • Thank you, Ferdy. The bestmove (none) is what I am getting from Stockfish, so it is up to them to possibly change it. Just for my understanding: 1) Can I request the info string command somehow or will the engine automatically provide it (as I understand it only in debug mode)? 2) If I see stalemate, 3-fold repetition, fifty-move draw rule, it seems that these are all draws, correct? 3) Getting an equal position assessment at depth 0 strikes me as rather odd. When would a chess engine assess a none-draw position like this? Jan 9 at 9:11
  • 1
    On "bestmove (none)", it is up to them to change it. 1) The info string command depends on the engine authors. It has to be implemented in the engine. 2) Yes
    – ferdy
    Jan 10 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.