The Puzzle That Stockfish Can't Solve

Sort:
SuperJupiter5

In this position, white has a mate in 2.

It is after 1.Qa1 Kd8 (or Kf8) 2.Qh8#. However, Stockfish thinks that after Qa1, Black can castle queenside. However, there is a way we can prove that Black can't castle. If we go to the beginning, notice how the pawns are on their starting squares. This means they could have never moved, meaning that the rook or the king must have moved on the move before this position. And since the chess rules clearly say you can't castle after you've moved your rook or king, this means that Black can't castle. The reason why Stockfish doesn't know about this is because it was made to calculate forward, not backwards.

SuperJupiter5

OOPS! I FORGOT THE KING!

SuperJupiter5

There. I fixed it

 

SuperJupiter5

The rook or the king must have moved.

SuperJupiter5

lol

Arisktotle

Mainstream chess engines are designed to play games and solve game positions. If you give SF the full game preceding the diagram, it will solve your problem correctly.

SuperJupiter5

Good point @Arisktotle.

Arisktotle
CybernetRecover wrote:

You can make the puzzle more tricky by offering the Qa1 and ask whether black can save his king😏

The answer then is YES!

EscherehcsE
Arisktotle wrote:

Mainstream chess engines are designed to play games and solve game positions. If you give SF the full game preceding the diagram, it will solve your problem correctly.

You don't have to give the entire game, but you do have to supply the correct castling rights, e.p. rights, etc. when specifying the starting position. The OP is right about Stockfish not being able to calculate backwards. Stockfish wasn't designed for retrograde analysis.

SuperJupiter5

That's actually a better version @CybernetRecover!

Arisktotle
EscherehcsE wrote:
Arisktotle wrote:

Mainstream chess engines are designed to play games and solve game positions. If you give SF the full game preceding the diagram, it will solve your problem correctly.

You don't have to give the entire game, but you do have to supply the correct castling rights, e.p. rights, etc. when specifying the starting position. The OP is right about Stockfish not being able to calculate backwards. Stockfish wasn't designed for retrograde analysis.

Of course, giving castling rights is sufficient in this instance, but my reply was generalized to include all uncertainties in game histories such as who-is-on-move-issues, e.p. rights and potential for repetitions or 50-move claims. It is also true for chess960 - with funny castlings - and most chess variants with funny rules the engines will conquer in the future.

Arisktotle
CybernetRecover wrote:

 

Arisktotle 写:

 

CybernetRecover wrote:

You can make the puzzle more tricky by offering the Qa1 and ask whether black can save his king😏

The answer then is YES!

 

Nonsense. He can't castle.(¬_¬)

 

Nope, he can castle! Placing the queen on a1 does not imply that white's last move looked anything like Qa6-a1 like you apparently assume!

Unless you actually intend to give the move Qa6-a1 to the solver but how would that be more tricky?

SuperJupiter5

what do you mean? There's clearly 2 rooks.

SuperJupiter5

he has 2 rooks.