user16041: I am trying to interact with stockfish via UCI to get a current evaluation of the board. When you do a simple
position startpos
go depth 10

The board will helpfully return
...[previous depths]

info depth 10 seldepth 11 multipv 1 score cp 29 nodes 1463 nps 731500 tbhits 0 time 2 pv e2e4 e7e5 g1f3 b8c6 f1b5 a7a6 b5c6 d7c6 e1g1 c8g4 d2d3
bestmove e2e4 ponder e7e5


From this I can see that the evaluation for the next move is cp29 and this is corroborated by a previous question. However, looking at another question, it seems like the initial question is technically wrong since the evaluation is for the position that will be resulted from the next best move, rather than the score for a current position. The second question also explains a way to get the technically correct evaluation for the current position.
My questions are

What score is commonly outputted by UIs that interact with stockfish? Do other UIs also go back in history to get a score when given a position?
Is it correct that the score I get is the score for the next move when I use the standard go whatever notation?
Is there anyway to get the current score without going back in game history and force stockfish to calculate scores for all those other positions as explained in the second SE question? This forces me to fake a move backwards in time if I am using a FEN and don't know the game history for instance which doesn't seem like the right thing to do, nor it should be necessary.


user15415: Game theoretically the evaluation of the current position is equal to the evaluation of the position after the optimal move is played, since the evaluation of a position is defined as the result with optimal play from both sides. So although the engine technically speaking prints the score of the position after the (supposedly) best move, it at the same time gives the score for the current position, since they are identical.
If you want to get the static evaluation of a position without any search, you can use the eval command in stockfish, which returns something like:
     Term    |    White    |    Black    |    Total   
             |   MG    EG  |   MG    EG  |   MG    EG 
 ------------+-------------+-------------+------------
    Material |  ----  ---- |  ----  ---- |  0.00  0.00
   Imbalance |  ----  ---- |  ----  ---- |  0.00  0.00
       Pawns |  0.34 -0.08 |  0.34 -0.08 |  0.00  0.00
     Knights |  0.00 -0.16 |  0.00 -0.16 |  0.00  0.00
     Bishops | -0.04 -0.35 | -0.04 -0.35 |  0.00  0.00
       Rooks | -0.22 -0.02 | -0.22 -0.02 |  0.00  0.00
      Queens |  0.00  0.00 |  0.00  0.00 |  0.00  0.00
    Mobility | -0.92 -1.08 | -0.92 -1.08 |  0.00  0.00
 King safety |  0.70 -0.08 |  0.70 -0.08 |  0.00  0.00
     Threats |  0.00  0.00 |  0.00  0.00 |  0.00  0.00
      Passed |  0.00  0.00 |  0.00  0.00 |  0.00  0.00
       Space |  0.60  0.00 |  0.60  0.00 |  0.00  0.00
  Initiative |  ----  ---- |  ----  ---- |  0.00  0.00
 ------------+-------------+-------------+------------
       Total |  ----  ---- |  ----  ---- |  0.00  0.00

Total evaluation: 0.13 (white side)


16041: <p>I am trying to interact with stockfish via UCI to get a current evaluation of the board. When you do a simple</p>

<pre><code>position startpos
go depth 10
</code></pre>

<p>The board will helpfully return</p>

<pre><code>...[previous depths]

info depth 10 seldepth 11 multipv 1 score cp 29 nodes 1463 nps 731500 tbhits 0 time 2 pv e2e4 e7e5 g1f3 b8c6 f1b5 a7a6 b5c6 d7c6 e1g1 c8g4 d2d3
bestmove e2e4 ponder e7e5

</code></pre>

<p>From this I can see that the evaluation for the next move is cp29 and this is corroborated by a <a href="https://chess.stackexchange.com/questions/5945/how-to-get-position-evaluation-with-uci">previous question</a>. However, looking at <a href="https://chess.stackexchange.com/questions/6155/how-to-evaluate-my-move-with-uci-engine">another question</a>, it seems like the initial question is technically wrong since the evaluation is for the position that will be resulted from the next best move, rather than the score for a current position. The second question also explains a way to get the technically correct evaluation for the current position.</p>

<p>My questions are</p>

<ul>
<li>What score is commonly outputted by UIs that interact with stockfish? Do other UIs also go back in history to get a score when given a position?</li>
<li>Is it correct that the score I get is the score for the next move when I use the standard <code>go whatever</code> notation?</li>
<li>Is there anyway to get the current score without going back in game history and force stockfish to calculate scores for all those other positions as explained in the second SE question? This forces me to fake a move backwards in time if I am using a FEN and don't know the game history for instance which doesn't seem like the right thing to do, nor it should be necessary.</li>
</ul>
 15415: <p>Game theoretically the evaluation of the current position is equal to the evaluation of the position after the optimal move is played, since the evaluation of a position is defined as the result with optimal play from both sides. So although the engine technically speaking prints the score of the position after the (supposedly) best move, it at the same time gives the score for the current position, since they are identical.</p>

<p>If you want to get the static evaluation of a position without any search, you can use the <code>eval</code> command in stockfish, which returns something like:</p>

<pre><code>     Term    |    White    |    Black    |    Total   
             |   MG    EG  |   MG    EG  |   MG    EG 
 ------------+-------------+-------------+------------
    Material |  ----  ---- |  ----  ---- |  0.00  0.00
   Imbalance |  ----  ---- |  ----  ---- |  0.00  0.00
       Pawns |  0.34 -0.08 |  0.34 -0.08 |  0.00  0.00
     Knights |  0.00 -0.16 |  0.00 -0.16 |  0.00  0.00
     Bishops | -0.04 -0.35 | -0.04 -0.35 |  0.00  0.00
       Rooks | -0.22 -0.02 | -0.22 -0.02 |  0.00  0.00
      Queens |  0.00  0.00 |  0.00  0.00 |  0.00  0.00
    Mobility | -0.92 -1.08 | -0.92 -1.08 |  0.00  0.00
 King safety |  0.70 -0.08 |  0.70 -0.08 |  0.00  0.00
     Threats |  0.00  0.00 |  0.00  0.00 |  0.00  0.00
      Passed |  0.00  0.00 |  0.00  0.00 |  0.00  0.00
       Space |  0.60  0.00 |  0.60  0.00 |  0.00  0.00
  Initiative |  ----  ---- |  ----  ---- |  0.00  0.00
 ------------+-------------+-------------+------------
       Total |  ----  ---- |  ----  ---- |  0.00  0.00

Total evaluation: 0.13 (white side)
</code></pre>
