2

For a given position, I'd like to compute an evaluation of the 3 best moves. I send this to Stockfish:

setoption name MultiPV value 3
position startpos
go movetime 500.0 // search for 0.5 seconds

I get the following result:

info depth 1 seldepth 1 score cp 84 nodes 71 nps 35500 time 2 multipv 1 pv e2e4
info depth 1 seldepth 1 score cp 80 nodes 71 nps 35500 time 2 multipv 2 pv d2d4
info depth 1 seldepth 1 score cp 72 nodes 71 nps 35500 time 2 multipv 3 pv e2e3
[...]
info depth 13 seldepth 17 score cp 20 nodes 521614 nps 1575873 time 331 multipv 1 pv d2d4 d7d5 b1c3 g8f6 g1f3 e7e6 e2e3 b8c6 f1d3 f8d6 e1g1 e8g8 c1d2 c8d7 c3b5 e6e5
info depth 13 seldepth 17 score cp 20 nodes 521614 nps 1575873 time 331 multipv 2 pv g1f3 d7d5 d2d4 g8f6 b1c3 e7e6 e2e3 b8c6 f1d3 f8d6 e1g1 e8g8 c1d2 c8d7 c3b5 e6e5
info depth 13 seldepth 17 score cp 13 nodes 521614 nps 1575873 time 331 multipv 3 pv e2e4 e7e5 g1e2 b8c6 d2d4 e5d4 e2d4 g8f6 b1c3 f8b4 d4c6 b7c6 e4e5 f6d5
info depth 14 seldepth 18 score cp 15 nodes 771138 nps 1536131 time 502 multipv 1 pv d2d4 d7d5 g1f3 g8f6 e2e3 e7e6 f1d3 b8c6
info depth 14 seldepth 18 score cp 15 nodes 771138 nps 1536131 time 502 multipv 2 pv g1f3 d7d5 d2d4 g8f6 e2e3 e7e6 f1d3 b8c6
info depth 14 seldepth 18 score mate 0 upperbound nodes 771138 nps 1536131 time 502 multipv 3 pv e2e4 e7e5 g1e2 b8c6 d2d4 e5d4 e2d4 g8f6 b1c3 f8b4 d4c6 b7c6 e4e5 f6d5
info nodes 771138 time 502
bestmove d2d4 ponder d7d5

The line info depth 14 seldepth 18 score mate 0 upperbound ... multipv 3 pv e2e4 ... is not useful to me. It indicates that "1.e4" was pruned from the evaluation -- Since it's worse than "1.d4" or "1.Nf3", it was assigned the trivial upper bound of mate 0.

How can I prevent this from happening? I want an evaluation for each of the top 3 moves, not simply an upper/lower bound. One solution is to run another analysis from position startpos e2e4. Is there a simpler way?

2
  • 2
    Because you have limited search time, there's no way to get any more information at depth 14. What does the output at depth 13 say?
    – JiK
    Oct 23 '14 at 11:27
  • The output at depth 13 looks OK in this case. Does this always hold? Can we guarantee that "upperbound"/"lowerbound" is only returned at the largest depth?
    – tba
    Oct 24 '14 at 20:21
2

You'll need to give the engine more time to think.

Edited

The poster was concern about "upperbound"/"lowerbound" is only returned at the largest depth".

The question makes absolutely no sense. I don't want to get into too much technical details because you need to understand the alpha-beta algorithm. upperbound/lowerbound is NOT something that an end-user ever needs to worry about. It's meant for engine debugging, the information is only and only useful for engine developers. No chess software with a Stockfish engine would tell you anything related to the bounds. Stockfish reports the upperbound/lowerbound information whenever it encounters one for every 3 seconds.

I can't directly answer your question because it is not a valid question. upper and lower bounds are really not something that you should worry.

5
  • Can we guarantee that "upperbound"/"lowerbound" is only returned at the largest depth?
    – tba
    Oct 24 '14 at 20:21
  • Thanks for your help so far. To rephrase my question: How can I extract the final evaluation of "1.e4" from the above output? It is incorrect to use cat engine_output.txt | grep "multipv 3" | tail -1 | grep -o "score [^ ]* [^ ]*" . Is it correct to use cat engine_output.txt | grep "multipv 3" | grep -v "bound" | tail -1 | grep -o "score [^ ]* [^ ]*" ? Or should I be using a different UCI command altogether?
    – tba
    Oct 25 '14 at 6:09
  • This is a chess site. Your question is more about unix scripting. You'd need to ask on stackoverflow.
    – SmallChess
    Oct 25 '14 at 12:36
  • In the output I provided, is the final evaluation of "1.e4" equal to +0.13?
    – tba
    Oct 25 '14 at 17:37
  • @tba Yes, the search of 1.e4 at depth 13 was completed and gave evaluation +0.13; the search of 1.e4 at depth 14 was not completed because of time limit. So, the final evaluation (at depth 13) is +0.13.
    – JiK
    Oct 26 '14 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.