3

In my last question, I asked why engines sometimes force a draw when they can still win. Now, I'm asking about the opposite situation:

[FEN "5K2/5n2/8/3n2k1/8/8/8/8 w - - 0 1"]

1. Ke8? (1. Kxf7) 1... Nd6+ 2. Kf8 Kh6 3. Kg8 Ne7+ 4. Kh8?? Nf7#

It's completely impossible for White to win here, but Black winning is still possible, if White blunders into the corner or runs out of time. Isn't the obvious move then for White to play Kxf7, to secure the draw immediately? Why does Stockfish instead suggest Ke8, which keeps the game going and leaves open the possibility of a loss?

4
  • 4
    You are trying to project human qualities onto a computer; so far as Stockfish's evaluation is concerned, especially if it has an endgame tablebase, both Ke8 and Kxf7 are draws, so why choose one over the other? My Stockfish (without a tablebase) correctly evaluates any legal move by white as equivalently strong - because strictly they are.
    – Ian Bush
    Commented Jul 2, 2021 at 7:38
  • For Stockfish, there is no possibility of a loss which it is leaving open. The question mark doesn't belong on the first move in the sequence that you give, but rather on a subsequent move which Stockfish simply wouldn't do. Commented Jul 2, 2021 at 12:07
  • Longer a game lasts the more time the opponent have to make an error..... Commented Jul 29 at 14:34
  • @IanRingrose This question is specifically about the case where there's no possibility of doing better than a draw no matter what errors your opponent makes. Commented Jul 29 at 17:03

2 Answers 2

6

Chess engines just don't work that way. They don't have a "risk" or a "just in case" module. They just try to maximize their eval function. (They value stuff like king safety, but that's something different).

Typical case: on a given position white has an easy to calculate simplification that takes to a trivially winning K+P vs K endgame. Say this is a mate in 30. On the other hand, in the same position, white has a very hard to find (for humans) mate in 15. No human would risk to miscalculate the brilliant mate in 15 when you can get into a prosaic won endgame, but to the engine mate in 15 is just better than mate in 30, so there it'll go.

Another reason for engines not to behave these ways; it just doesn't add Elo points to their strength.

2

There is actually an explanation to this, but it might not be the one you're looking for.

As the comments and the other answer have pointed out, 1. Kxf7 has exactly the same evaluation as 1. Ke8. Both of them are drawn (0.00). Therefore there is no evaluation-based reason to prefer one over the other.

Is there any non-evaluation based reason to prefer one over the other? Turns out there is. In engine chess it's called contempt. The idea is that if your engine thinks it is better than the opponent, then it should favor keeping more pieces on the board, because more pieces = more complex, and complex positions are good for you (since inferior opposition is more likely to blunder). Stockfish, being the strongest engine on the planet, is set by default to have a positive contempt factor. Accordingly, it makes the move that leaves more material on the board.

This answer might not make sense to you - there is no way for White to checkmate in that position after all - but it explains why Stockfish does not take the knight.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.