4

Playing around with the Stockfish 8 UCI from the terminal, I've managed to make it compute moves, and set the position and load Syzygy tables.

But how I can know if an endgame, one that corresponds to the kind of endgame I've loaded, is winnable or drawable?

I've looked at the Stockfish UCI protocol, but I have not found the relevant information.

8
  • 3
    The score would tell you that.
    – SmallChess
    Commented May 18, 2017 at 0:08
  • Thank you. It seems that I must investigate more about how to interpret the score. Also do I really need to provide SYZYGY tables or can StockFish give good scores without them ?
    – loloof64
    Commented May 18, 2017 at 0:14
  • 1
    If I'm right, Stockfish shows +123.53 for win in 7+ pieces position that uses tablebase win and +250.00 for 6- pieces win. Not sure how it scores blessed wins. If I'm wrong just write me and I will delete the comment, I know Komodo values but saw also those of Stockfish some time ago.
    – hoacin
    Commented May 18, 2017 at 6:27
  • Thank you. I'll try to check that for 6- pieces win (that's my main use case) and also investigate more into Stockfish official resources.
    – loloof64
    Commented May 18, 2017 at 9:25
  • I've checked with Stockfish in command line. With the position "8/8/8/5k2/8/1R6/R7/4K3 w - - 0 1" (mat with two rooks) I got "info depth 7 seldepth 10 multipv 1 score cp 5133 nodes 10566 nps 1056600 tbhits 0 time 10 pv a2a6 f5e5 b3b5 e5d4 a6a4 d4c3 a4f4 c3d3 b5b3 d3c2 " which, is score +51.33 (cp 5133). So I guess a score of absolute value of 50.00 should be enough.
    – loloof64
    Commented May 18, 2017 at 9:37

1 Answer 1

1

If the root position you set up on the board is covered by the syzygy tablebases you loaded, you can just directly query the tablebases using the Stockfish-specific (non-UCI) command d, see the example below.

Since syzygy tablebases are depth-to-zero (DTZ) and not depth-to-mate (DTM) (see https://www.chessprogramming.org/Endgame_Tablebases#Metrics for the definitions), what you get is the result with perfect play for the side to move as well as the number of half moves until the 50 move rule counter will be reset due to a capture or pawn move.

input:

setoption name SyzygyPath value {path to your tablebases}
position fen 8/8/8/5k2/8/1R6/R7/4K3 w - - 0 1
d

output:

info string Found 35 tablebases

 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   | k |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   | R |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 | R |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   | K |   |   |   |
 +---+---+---+---+---+---+---+---+

Fen: 8/8/8/5k2/8/1R6/R7/4K3 w - - 0 1
Key: 48F90DF481A6F1D6
Checkers: 
Tablebases WDL:  Win (Success)
Tablebases DTZ:    7 (Success)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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