user703: I am trying to get score about current position directly with UCI (I am using latest stockfish). After reading the protocol I see that these commands ask engine to analyse the position:
uci
ucinewgame
position fen r1k4r/p2nb1p1/2b4p/1p1n1p2/2PP4/3Q1NB1/1P3PPP/R5K1 b - c3 0 19
go infinite

I see some information from engine, like:
info depth 30 seldepth 55 score cp -482 nodes 380021712 nps 2059916 time 184484

Then I stop it with stop and get bestmove b5c4 ponder d3c4
So it tells me the best move, but what is the score of this position.
Based on my understanding cp - 482 means that black is better almost by 5. But how can I get this information explicitly?

user3557: Before the engine gives a bestmove, the uci protocol specifies it must print a last info line. In that info line the score parameter is the one you want. It's either:

cp: score in centipawns
mate: moves until mate

I think that a minus score means that there's a disadvantage to the side which has to move.

user2371: lines info depth with score have something begining with  pv, whereis the move. cp is centipawn, so evaluation is -4.82
info depth 16 seldepth 3 score cp -529 nodes 3409 nps 10299 time 331 multipv 1 pv b5c4 d3c4 d5b4 a1e1 h8e8 g3d6 d7b6 c4b4 e7d6 b4d6 e8e1 f3e1 c8b7 d6e 7 b6d7 e1d3 a8c8 e7g7 c8c7 g7h6 c6b5 d3e1 c7c8 h6e6 c8c1 e6d5 b7b6 d5d6
uci protocol
http://download.shredderchess.com/div/uci.zip 

703: <p>I am trying to get score about current position directly with UCI (I am using latest stockfish). After reading the <a href="http://wbec-ridderkerk.nl/html/UCIProtocol.html" rel="noreferrer">protocol</a> I see that these commands ask engine to analyse the position:</p>

<pre><code>uci
ucinewgame
position fen r1k4r/p2nb1p1/2b4p/1p1n1p2/2PP4/3Q1NB1/1P3PPP/R5K1 b - c3 0 19
go infinite
</code></pre>

<p>I see some information from engine, like:</p>

<pre><code>info depth 30 seldepth 55 score cp -482 nodes 380021712 nps 2059916 time 184484
</code></pre>

<p>Then I stop it with <code>stop</code> and get <code>bestmove b5c4 ponder d3c4</code></p>

<p>So it tells me the best move, but what is the score of this position.</p>

<p>Based on my understanding <code>cp - 482</code> means that black is better almost by 5. But how can I get this information explicitly?</p>
 3557: <p>Before the engine gives a bestmove, the uci protocol specifies it must print a last info line. In that info line the score parameter is the one you want. It's either:</p>

<ul>
<li>cp: score in centipawns</li>
<li>mate: moves until mate</li>
</ul>

<p>I think that a minus score means that there's a disadvantage to the side which has to move.</p>
 2371: <p>lines info depth with score have something begining with  pv, whereis the move. cp is centipawn, so evaluation is -4.82</p>

<p>info depth 16 seldepth 3 score cp -529 nodes 3409 nps 10299 time 331 multipv 1 pv b5c4 d3c4 d5b4 a1e1 h8e8 g3d6 d7b6 c4b4 e7d6 b4d6 e8e1 f3e1 c8b7 d6e 7 b6d7 e1d3 a8c8 e7g7 c8c7 g7h6 c6b5 d3e1 c7c8 h6e6 c8c1 e6d5 b7b6 d5d6</p>

<p>uci protocol
<a href="http://download.shredderchess.com/div/uci.zip" rel="nofollow">http://download.shredderchess.com/div/uci.zip</a> </p>
