Answers.Body: <p>I don't think Stockfish gives you the information as it's not useful to anybody other than programmers for debugging. The best way is just run MultiPV=2, and subtract the best two moves. Is there any reason why you can't do that?</p>
  
  <p>If you insist you'll have to modify the source code yourself. It's not a very hard change. But why would you do that?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-28T09:19:48.817Z
Answers.Text: Running Stockfish with MultiPV=2 is computationally much more expensive, because Stockfish would strive to compute the exact evaluation score of the second best move, too. That's not what I want. Contrary to your opinion, I do think it is valuable information to know a lower bound on the margin. Without running any additional analyses, you would get an idea of whether the best move is much better than the second best move, or just slightly better.
Answers.UserDisplayName: Daniel Gerigk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-27T23:25:55.610Z
Answers.LastActivityDate: 2018-03-27T23:25:55.610Z
Answers.UserDisplayName: SmallChess
Body: <p>On Oct 31, 2014, Tord Romstad <a href="http://support.stockfishchess.org/discussions/questions/1327-alternative-moves" rel="nofollow noreferrer">wrote</a>:</p>
  <blockquote>
  <p>The moves are not searched in descending order from best to worst. Stockfish has no idea which move is the second, third best, etc., and it doesn't have any centipawn scores for any moves other than the current best move. For the rest of the moves, the centipawn scores are unknown, all we have for those moves are upper bounds for the centipawn scores.</p>
  <p>As an example, assume that we have a position with four legal moves A, B, C and D. What Stockfish knows about the centipawn values of the four moves after searching to a given depth would usually be something like this:</p>
  <p>Move A (best move): 100 centipawns.<br />
  Move B: At most 50 centipawns<br />
  Move C: At most 80 centipawns<br />
  Move D: At most 0 centipawns</p>
  <p>Because we only have upper bounds for moves B, C and D, we have no idea which of these three moves is the best.</p>
  </blockquote>
  <p>Is there a way to make Stockfish output the data described by Tord?
  I would argue that it is valuable to not only know the best move, but also to have an idea of whether the best move is &quot;much better&quot; than the other moves or only &quot;slightly better&quot;.</p>
  
Tags: <engines><software><stockfish><programming>
Title: Output whether the best move is "much better" or only "slightly better" than the other moves
ThreadText: # Output whether the best move is "much better" or only "slightly better" than the other moves
  
  (Asked by: username_0 on 2018-03-27)
  
  On Oct 31, 2014, Tord Romstad [wrote](http://support.stockfishchess.org/discussions/questions/1327-alternative-moves):
  
  > The moves are not searched in descending order from best to worst. Stockfish has no idea which move is the second, third best, etc., and it doesn't have any centipawn scores for any moves other than the current best move. For the rest of the moves, the centipawn scores are unknown, all we have for those moves are upper bounds for the centipawn scores.
  >
  > As an example, assume that we have a position with four legal moves A, B, C and D. What Stockfish knows about the centipawn values of the four moves after searching to a given depth would usually be something like this:
  >
  > Move A (best move): 100 centipawns.  
  > Move B: At most 50 centipawns  
  > Move C: At most 80 centipawns  
  > Move D: At most 0 centipawns
  >
  > Because we only have upper bounds for moves B, C and D, we have no idea which of these three moves is the best.
  
  Is there a way to make Stockfish output the data described by Tord?
  I would argue that it is valuable to not only know the best move, but also to have an idea of whether the best move is "much better" than the other moves or only "slightly better".
  
  **Tags:** engines, software, stockfish, programming
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-27. Score: 2
  
  I don't think Stockfish gives you the information as it's not useful to anybody other than programmers for debugging. The best way is just run MultiPV=2, and subtract the best two moves. Is there any reason why you can't do that?
  
  If you insist you'll have to modify the source code yourself. It's not a very hard change. But why would you do that?
  
  > **Comments:**
  > **username_0**: Running Stockfish with MultiPV=2 is computationally much more expensive, because Stockfish would strive to compute the exact evaluation score of the second best move, too. That's not what I want. Contrary to your opinion, I do think it is valuable information to know a lower bound on the margin. Without running any additional analyses, you would get an idea of whether the best move is much better than the second best move, or just slightly better.  
  
  ---
  
  