Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-25T12:14:23.587Z
Answers.Text: sorry how do you get -4.82 from cp -529 ?
Answers.UserDisplayName: Black
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-19T19:15:40.813Z
Answers.Text: @Black seems to be a different example (from the original post vs. the answer)
Answers.UserDisplayName: Sebastian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-30T08:03:37.870Z
Answers.LastActivityDate: 2014-07-30T12:14:57.853Z
Answers.LastEditDate: 2014-07-30T12:14:57.853Z
Answers.UserDisplayName: user2371
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-16T04:07:27.803Z
Answers.Text: I'm pretty sure a positive score indicates an advantage to white, and a negative score indicates an advantage to black.
Answers.UserDisplayName: Zaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-03T18:02:00.680Z
Answers.Text: stockfish gives the cp score in terms of whose turn it is
Answers.UserDisplayName: john k
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-31T09:09:44.877Z
Answers.LastActivityDate: 2014-07-31T09:09:44.877Z
Answers.UserDisplayName: user3557
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-30T09:34:34.257Z
Comments.Text: Are you using a program to invoke the uci engine and read its values? If you are just using it to analyze positions or games, I suggest using a GUI like Arena or SCID or Tarrash-UI. It makes analysis much easier with nicely laid out UI.
Comments.UserDisplayName: Keshav
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-30T09:53:48.580Z
Comments.Text: @Keshav I am looking for a way to make online service to analyse chess positions through a web interface. So I am looking for a way to analyse position through some python or node. For this reason I can not use GUI and need to interact with engine through UCI.
Comments.UserDisplayName: Salvador Dali
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-30T13:25:41.710Z
Comments.Text: I don't understand this question. You have the score, it's cp -482. What else do you want?
Comments.UserDisplayName: Alan
Tags: <engines><uci>
Title: How to get position evaluation with UCI?
ThreadText: # How to get position evaluation with UCI?
  
  (Asked by: username_0 on 2014-07-29)
  
  I am trying to get score about current position directly with UCI (I am using latest stockfish). After reading the [protocol](http://wbec-ridderkerk.nl/html/UCIProtocol.html) 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 username_4 is better almost by 5. But how can I get this information explicitly?
  
  **Tags:** engines, uci
  
  > **Comments:**
  > **username_1**: Are you using a program to invoke the uci engine and read its values? If you are just using it to analyze positions or games, I suggest using a GUI like Arena or SCID or Tarrash-UI. It makes analysis much easier with nicely laid out UI.  
  > **username_0**: @username_1 I am looking for a way to make online service to analyse chess positions through a web interface. So I am looking for a way to analyse position through some python or node. For this reason I can not use GUI and need to interact with engine through UCI.  
  > **username_2**: I don't understand this question. You have the score, it's cp -482. What else do you want?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2014-07-30. Score: 4
  
  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>
  
  > **Comments:**
  > **username_4**: sorry how do you get -4.82 from cp -529 ?  
  > **username_5**: @username_4 seems to be a different example (from the original post vs. the answer)  
  
  ---
  
  ### Answer by username_6 on 2014-07-31. Score: 1
  
  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.
  
  > **Comments:**
  > **username_7**: I'm pretty sure a positive score indicates an advantage to white, and a negative score indicates an advantage to username_4.  
  > **username_8**: stockfish gives the cp score in terms of whose turn it is  
  
  ---
  
  