1

Stockfish 10+ at depth 19 evaluated this position as a draw:

[Title "White to play and mate in 10"]
[FEN "r1b2r2/5pk1/pq2p3/1p5Q/3p1P2/P2Rn1NP/1P4P1/7K w - - 0 28"]

However, it is actually checkmate in 10! I understand that Stockfish prunes the search tree heavily, which can (in theory) result in such errors in evaluation. But this is the first time (in practice) that I have seen a non-contrived position (it came from a variant line of an actual game that I was exploring with Stockfish) with a completely wrong evaluation. Can anyone who is very familiar with the Stockfish code provide an explanation of the main factors here? Is it simply that there were too many quiescent moves? I count only 5 moves that are not a check or a forced move (i.e. the only move that does not result in mate-in-3) or a capture, and these 5 are the moves that I as a human player would consider as quiescent (even if I ignore the great king danger). Am I missing some other reason here?

The principal variation is:

[Title "White checkmates in 10"]
[FEN "r1b2r2/5pk1/pq2p3/1p5Q/3p1P2/P2Rn1NP/1P4P1/7K w - - 0 0"]

1. Qg5+ Kh7 2. Nh5 Nf5 3. Nf6+ Kh8 4. Kh2 e5
5. Rg3 Qxf6 6. Qxf6+ Kh7 7. Rg5 d3 8. Rh5+ Nh6
9. Qxh6+ Kg8 10. Qh8#

Stockfish 10+ at depth 19 evaluates it as draw until 29. Nh5. After the next move Nf5, Stockfish thought it was +7.5. After the next move Nf6+ Stockfish knew it was game over.

7
  • At which point in the winning line does stockfish realize that it's winning for white? Also, it may be a good idea to give the actual mating variation.
    – Scounged
    May 25, 2020 at 10:52
  • @Scounged: Added! I realize I miscounted the number of moves to checkmate by 1. =P
    – user21820
    May 25, 2020 at 11:14
  • 2
    stockfish reaches depth 19 in 20k nodes in this position. Don't expect it to mean anything... It finds the actual mate in a fraction of a second. Depth is not a meaningful metric
    – Sopel
    May 25, 2020 at 12:23
  • @Sopel: Are you saying that the Stockfish on Lichess is not full Stockfish? Or did you have to change some setting to get it to search for checkmate?
    – user21820
    May 25, 2020 at 12:30
  • stockfish on lichess by default searches to depth ~20. You need to hit the small "+" button to search further. It's also just a port of stockfish to WASM so it's slower than a desktop version.
    – Sopel
    May 25, 2020 at 14:32

1 Answer 1

9

Depth 19 refers to 19 plies, not 19 moves (which would be 2 plies each). So it's reasonable that Stockfish would only find the mate shortly after depth 19, since 10.Qh8# is the 19th ply from the starting position you posted.

2
  • 1
    Indeed, once Stockfish reaches depth 20 its evaluation jumps.
    – Allure
    May 26, 2020 at 1:41
  • Oh okay thanks for your answer, which confirms that something was off with what I thought was the reason.
    – user21820
    May 26, 2020 at 6:01

Your Answer

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

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