It is going from #26 through +60 to +9. Thats all engines best moves with deep analysis. Schould it not be a forced checkmate if I will follow the engine evaluation?

enter image description here enter image description here

  • Interestingly my stockfish says mate in 23 moves from the first position. – user1583209 Feb 7 '18 at 13:56
  • @user1583209 Mine says #22. But yeah. That "deep analysis" likely just wasn't deep enough. – Annatar Feb 7 '18 at 13:57
  • 2
    For practical purposes all these evaluations are equally winning for white. I'd be worried if it switched to an evaluation of 0 or so. – user1583209 Feb 7 '18 at 13:59
  • maybe the depth between the evaluation is different. Such as it expecting multiple free pieces, but eventually finding a sacrifice the mitigates the damage – TheAutomaton Feb 7 '18 at 15:17
  • Engines aren't perfect, and one move later they can see deeper. Sometimes they think a move wins but in the end it turns out it doesn't, then you get this. – RemcoGerlich Feb 8 '18 at 10:38

Stockfish (at a search depth of 99 moves) evaluates the initial position as actually a mate-in-19.

[FEN "2n5/1p6/1P3k2/R1K1p1p1/2p1PpPp/5P1P/8/8 w - - 4 1"]

1.Ra8 Ne7 Kxc4 Nc6 Kc5 Ke7 Rc8 Nd8 Kd5 Ne6 Kxe5 Kd7 Kd5 Ke7 Re8+ Kxe8 Kxe6 Kf8 e5 Kg7 Kd6 Kg8 e6 Kf8 Kd7 Kg8 e7 Kf7 e8=Q+ Kf6 Kd6 Kg7 Ke7 Kh6 Kf8 Kh7 Qh5#

The next position is a mate in 18 moves.

[FEN "R7/1p2n3/1P3k2/2K1p1p1/2p1PpPp/5P1P/8/8 w - - 6 2"]

1.Kxc4 Nc6 Kc5 Ke7 Rc8 Nd8 Kd5 Ne6 Kxe5 Kd7 Kd5 Ke7 Re8+ Kxe8 Kxe6 Kf8 e5 Kg7 Kd6 Kg8 e6 Kf8 Kd7 Kg8 e7 Kf7 e8=Q+ Kf6 Kd6 Kg7 Ke7 Kh6 Kf8 Kh7 Qh5#

The final position is mate in 17 moves.

[FEN "R7/1p6/1Pn2k2/4p1p1/2K1PpPp/5P1P/8/8 w - - 1 3"]

1.Kc5 Ke7 Rc8 Nd8 Kd5 Ne6 Kxe5 Kd7 Kd5 Ke7 Re8+ Kxe8 Kxe6 Kf8 e5 Kg7 Kd6 Kg8 e6 Kf8 Kd7 Kg8 e7 Kf7 e8=Q+ Kf6 Kd6 Kg7 Ke7 Kh6 Kf8 Kh7 Qh5#

You probably didn't give the engine sufficient time to find the mate.

Another important fact to note is that the Lichess app uses the javascript version of Stockfish. The problem with this version is that it cannot make use of hash tables. So when the engine evaluates a position and then left to evaluate another position resulting from a move in the initial position, it evaluates the position as if it was restarted before evaluation. I am pretty sure if you give the engine some time to evaluate the second and last positions it will come up with the mate.

| improve this answer | |

Engines do not calculate every single variation up until their depth. It would take far too long to do this at a depth of, say, 20 moves. After only the first four moves in chess, there over a billion positions.

Engines choose what variations to calculate based off their evaluation algorithms (how they evaluate positions). For example, assume it gets to a position in its calculations where the opponent has 5 possible moves. If it evaluates that 3 of these moves are +10 for the computer, it could entirely skip these variations and only calculate the remaining 2. This saves large amounts of time and processing power.

Thus, if an engine calls "mate in X", that is really just its best guess. It's possible the engine incorrectly thought some variation was bad for the opponent, and thus chose not to calculate it. However, maybe it turns out this variation actually prolonged the game a few more moves.

An engine's evaluation algorithm is based on a number of factors regarding the current position in its calculations. Black could have had a move that "looked" worse to the engine (based off its evaluation algorithm), causing it not to calculate the resulting variation. Concretely though, this move could have been objectively the best, as it prolonged mate.

The reason an engine often changes its evaluation from "mate in X" to something like +60 is that, after "going down the rabbit hole" as far as it can, it then checks over and refines its previous calculations. It wouldn't make sense to refine/perfect its calculations first, as this is like the cherry on the cake. Analyzing to a high depth is of highest priority - refining its previous calculations is almost always secondary.

| improve this answer | |

Many engines are notoriously bad at "remembering" their own variations from 3 moves ago and try to reinvent the wheel each move, so to say.

For me, the Lichess Stockfish calculates

  • Mate in 22 for 1. Ra8
  • Mate in 21 for 2. Kxc4
  • Mate in 14 for 3. Rc8 (Black screwed up in his last move it seems)
  • Mate in 18 for 3. Kc5
  • Mate in 19 for 3. Rg8
  • +64 for 3. Kd5

With search depth of 35 each time.

Looks like your analysis at move 3 did not go deep enough and recommended the "wrong" move Kd5 (which still wins, of course). Note that until a depth of around 30, I only got +50 to +60 evaluations too. My bet is that on your phone Stockfish could not reach the depth where it flips back to showing the mate. After making the move, it started to realize that it lost the track to the mate and began readjusting the evaluation (to +10).

| improve this answer | |
  • Is this ultimately due to pruning or to something else? – user1583209 Feb 7 '18 at 14:16
  • Ok, i can understand why different machines show different results, because of their power. But why a forced mate was lost if I did the "right" moves? – BitBeats Feb 7 '18 at 14:19
  • @user1583209 I don't know in detail how Stockfish works. But I think it's very likely that the one on OP's phone did cut off the wrong branch at some point. – Annatar Feb 7 '18 at 14:19
  • 1
    @S.G. Did the engine really show 3. Kd5 as the main continuation in the evaluation of the first move (you should be able to see that much of the line)? I doubt that. As I said, it "forgot" the move 1 (and 2) analysis when it did the move 3 one. – Annatar Feb 7 '18 at 14:34

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.