I am looking for a way to analyse the moves I play. I'm NOT looking for a suggestion of a GUI that does this, or using Chessbase to do this. I want to know how to do this by communicating directly with the UCI engine.

For example, when I tell the engine:

position startpos moves e2e4 e7e5 d2d4 g7g6

go depth 30

it returns the best move in this position:

info nodes 11295495 score cp -40

bestmove f7f5 ponder g8f6

But what I want is the evaluation of my latest move g7g6. How do i get that?

3 Answers 3


Enable multipv on the engine. When you are at "e2e4 e7e5 d2d4" it will list all possible best moves that the engine considers in order of their evaluation. If you find "g7g6" in this list, then what you have considered is one of the best moves also considered by the engine and you'll obviously have the score associated with "g7g6". So, you will find this information before you make the move "g7g6".


From a read-through of the UCI protocol (http://wbec-ridderkerk.nl/html/UCIProtocol.html) I didn't find a single command to do exactly what you want.

What it looks like you could do is start with the position before g7g6, get the cp score (-40 is, I think, a .4 advantage for black), play g7g6 and get the cp score in the subsequent position. You could then take the difference of the two and you have an evaluation of the move.

Please let me know if this works/is what you are looking for. I haven't gotten into UCI implementation before but you've sparked my interest.

  • Sorry, his command is correct. startpos tells the engine to play all moves from the beginning of the position all the way and include the g7g6 move. The asker had an invalid engine or something went wrong in the analysis.
    – SmallChess
    Aug 22, 2014 at 16:30
  • @student-t: The UCI communication is just an example, not what my engine actually gave me. sorry for the confusion. Aug 22, 2014 at 16:39
  • @cleveland: So I'm not sure I understand your reasoning. Say I start with the position before g7g6, which is d2d4 and run the search, I'll get e5d4 as the best move which has a score of cp -10 (hypothetical). I then add the move g7g6 and then search on that and get d4e5 with a score +100. What you're suggesting is that the score for the move g7g6 is the difference 100 - -10 = +110. I don't really understand why that is? Please elaborate? Aug 22, 2014 at 16:48
  • The +110 is from an absolute perspective, so it was a bad move for black. The move he made worsened his position by 1.1 pawns.
    – Cleveland
    Aug 22, 2014 at 17:50

I think you've confused somewhat in the UCI. Your reported results is invalid. Either the engine has a bug or you've done something wrong. The command you give is correct but the bestmove it reports is invalid because it's white to move in the final position.

When I did the same thing on Stockfish, I have the following. Please note that the first move in all PVs are white's move.

info depth 16 seldepth 24 score cp 103 upperbound nodes 2601011 nps 207169 time 12555 multipv 1 pv d4e5 f7f6 e5f6 g8f6 b1c3 f8b4 f1d3 d7d5 e4e5 d8e7 d1e2

info depth 16 currmove d4e5 currmovenumber 1

info depth 16 seldepth 26 score cp 131 lowerbound nodes 3046457 nps 207807 time 14660 multipv 1 pv d4e5 f7f6 e5f6 g8f6 g1f3 f6e4 f1c4 b8c6 e1g1 f8e7 b1c3 e4d6

info depth 16 currmove d4e5 currmovenumber 1

info depth 16 seldepth 26 score cp 131 nodes 3094910 nps 208061 time 14875 multipv 1 pv d4e5 f7f6 e5f6 g8f6 g1f3 f6e4 f1c4 b8c6 e1g1 f8e7 b1c3 e4d6
info nodes 3094910 time 14875

bestmove d4e5 ponder f7f6


Your question is a bit unclear because you ask for the evaluation for the move g7-g6. But this evaluation term is extremely unclear. From your comments, you're actually referring to the how well the move g7-g6 is relative to other moves that you can make in the same position.

If my interpretation is correct, your closest is multi-pv. Multi-pv lists the moves from best to worst. If g7-g6 is the second best move, you'll see the score and you can compare it with the score for the best move. I said it's closest because if your move is not one of the best moves, you'll find it hard to see in a multi-pv output.

UCI protocol is designed for computer vs computer playing, not really designed for human analysis like you described in your scenario. If you really want to know about your move. You have to play the move, get the score of it. Take the move back and find the best move in the position.

  • Oops sorry about that, that was just an example (and a poor one at that), didn't really try it in the engine Aug 22, 2014 at 16:50
  • Oh, so you're really talking about how well your g6-g7 move is relative to other alternatives!
    – SmallChess
    Aug 22, 2014 at 17:07
  • See my edited answer.
    – SmallChess
    Aug 22, 2014 at 17:14
  • Yes, how would i see how the engine scores my g6g7 move? Aug 22, 2014 at 17:22
  • You say "You have to play the move, get the score of it. Take the move back and find the best move in the position." How exactly do i get the score of it? Aug 22, 2014 at 17:25

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.