3

enter image description here

This is the famous Behting study, first published in the magazine Bohemia in 1906, which is often used as a demonstration that computers can’t solve all positions.

White to move and draw with a very elegant move.

Spoiler:

1. Kc6!! g1=Q 2. Nxh4 Qh1+ 3. Nhf3

Question is, is this study still beating engines?

Clarification: Suggesting best move, doesn't mean engine understands(or finds) the solution. Without evaluating it 0.00 or =/=, it doesn't mean it's solved. Actually, best move with -4.** means engine believes that best possible continuation for White is this move, with winning advantage for Black.

Imagine you ask a question to someone about a chess position in which White has a move which is the best and draws. You ask, which move is the best and why, and you get an answer like this: "Best chance is this move, but even if it's White's best chance, it looks losing". And you know that move draws. Would you accept this answer as correct answer? Definitely no.

I recommend to read:

Notes about edits: As the question turned into a discussion about whether the position solved by engines or not, I revised the question accordingly.

This question is totally about facts, and not opinion based. Some of the answers are opinion-based, but it's not the problem of the question. It's terribly wrong to close this question, instead of letting people discuss it.

5
  • I'm having a hard time believing engines can't solve it. To me, it seems much more plausible that the solution is flawed. Does it maybe involve Nh4: Kh4: instead of Nh4: g1=Q?
    – 11684
    Dec 29, 2015 at 1:03
  • For those wanting to know the solution without emailing anyone (note: the following link contains spoilers), this position is a fairly well-known study by Behting.
    – ETD
    Dec 29, 2015 at 5:57
  • Stockfish 6 solved this in just under 2 minutes. It isn't clear to me that Stockfish "knows" this is a draw, but it has reached 45 moves beyond the starting position. It is now exploring a new 2nd move for Black.
    – Tony Ennis
    Dec 29, 2015 at 22:50
  • 1
    Stockfish 6 chose the correct move when I tried it (from depth 43 to depth 56). I'm not using tablebases. I think Stockfish is non-deterministic when run with more than one thread (I'm using four), as the results presumably depend on the thread scheduling, which is unpredictable. In any case, the results certainly depend on how much hash memory you allocate it (I'm using 1024 MB).
    – Stephen
    Dec 31, 2015 at 9:53
  • @ferit do you allow engines to use tablebases? Because top engines do use those.
    – qwr
    Sep 24, 2022 at 6:26

4 Answers 4

7

For the record, the soundness of the Behting study has been under a cloud for some time because it is not easy to refute 1 Ng7+ Kg5 2 Nf3+ Kg4 3 Kf5 h3 4 Ke4 g1Q 5 Nxh6+ Kh5 6 Nxg1 h2 7 Nf3 h1Q 8 Nf5 "etc.", but according to recent analysis by GM John Nunn (2012) the study is sound after all.

It should be feasible for a chess engine to reach a 0.00 evaluation because there are only a few thousand drawing positions that need to be evaluated (depending on wK/bQ position, with or without the c/d pawns), and once the search has exhausted that space they'll all evaluate to a draw.

Here's a similar challenge:

[Title "NDE 1986 (2nd Prize, Israel Ring 1986)"]
[fen "5k2/1n6/1p3K2/P7/1P2N3/p1P2B2/8/2b5 w - - 0 0"]

White to move and draw.

Solution:

1 a6 a2 2 axb7 Bf4 3 Ng5! Bb8! (a1Q 4 Ne6+ Kg8! 5 Nxf4 Qxc3+ 6 Kf5 and Black can't win; 3 . . . Bd6 4 Ne6+ Kg8 5 Nc7! Bxc7 6 Bc4+ draws. So the Bishop crosses the critical square c7, which however White can exploit too:) 4 Nh7+! Ke8 5 Bc6+ Kd8 6 Ng5 Kc7 7 b5! a1Q (Kd6!? 8 Ne4+ Kc7 9 Ng5 repeating) 8 Nf7! positional draw.

1
  • This is just like saying chess can be solved simply be going through all combinations. Furthermore, if the engine doesn't understand the 50-moves draw, there is no way the evaluation can ever drop to zero. The engine wouldn't have enough memory to store all possible searched possibility, thus it'll always give a winning advantage for Black.
    – SmallChess
    Jan 2, 2016 at 11:42
4

I am running SCID on the front and Stockfish 6 on the back. Stockfish is running on 4 cores with a gigabyte of RAM. The computer is an Intel quad-core 3.2GHz i5, 16Gb of RAM, 64-bit OS.

I am not using a tablebase. I am not sure it matters; the first move or two are the hard ones.


[title "Behting study and Stockfish 6"]
[fen "8/8/7p/3KNN1k/2p4p/8/3P2p1/8 w - - 0 1"]

1.Kc6 g1=Q 2.Nxh4 Qa1 3.Nhf3 Qa5 4.Kd6 Qa2 5.Kc5 Qb3 6.Kd4 Qb4 7.Kd5 c3 8.dxc3 Qxc3 9.Ke4 Qc5 10.Kd3 Qd5+ 11.Ke3 Qd1 12.Ke4 Qb1+ 13.Ke3 Qc1+ 14.Kd4 Qf4+ 15.Kd3 Qa4 16.Ke3 Qc2 17.Kd4 Qe2 18.Kd5 Qb5+ 19.Ke4 Qb7+ 20.Kd4 Qc7 21.Ke4 Qb6 22.Kd3 Qa6+ 23.Ke3 Qa3+ 24.Ke4 Qf8 25.Ke3 Qb4 26.Kd3 Qf4 27.Ke2 Qf5 28.Ke3 Qf8 29.Ke4 Qc8 30.Kd5 Qa8+ 31.Kd4 Qb7 32.Ke3 Qd5 33.Kf4 Qb7

I think the "no computer can solve this" comment is very dated... the person who said it mentioned Anatoly Karpov...

And as requested (rudely), here's a screen shot.

Behting study; screencap of Stockfish 6's analysis

2
  • The lines at the top are the first lines it tried. Each line further down reflects a refinement. As you read down, you'll see it find Kc6, then try Ng7, then go back the Kc6. There it will stay.
    – Tony Ennis
    Dec 31, 2015 at 5:23
  • 2
    The engine won't rate the position as 0 for this type of draw. While we know it is a draw, Stockfish is dutifully searching for a solution. Even if it knows the 50 move rule, it will have countless alternatives. Since it has what ought to be a decisive material advantage, I doubt a draw will make it happy. It's going to search a long long time. I don't know what the depth is at the time of the screenshot. The analysis snipped is indicative of what it was doing, however.
    – Tony Ennis
    Dec 31, 2015 at 5:33
4

According to this post by u/dangi12012-1, Behting Study Cracked by Stockfish at depth 70!, Stockfish 12 NNUE evaluated 0.00 after 25 minutes with a powerful 16-core AMD Ryzen 3950X and 58 GB hash.

The post has the full info but here is the final PV:

info depth 72 seldepth 23 multipv 1 score cp 0 nodes 459232159581 nps 102464614 hashfull 426 tbhits 0 time 4481861 pv d5c6 g2g1q f5h4 g1a7 h4f3 a7a6 c6c5 c4c3 d2c3 a6a7 c5d6 a7a3 d6e6 a3c3 e6d5 c3c8 d5e4 c8h3 e4d5 h3g3 d5e4

After 1. Kc6 g1=Q, Stockfish 14 on Lichess analysis board considers it a draw, but then reconsiders and puts it at -2.5. After dxc3 this is a 7-piece tablebase draw but Lichess analysis doesn't have that.

[Title "Stockfish 12 NNUE at depth 72"]
[FEN "8/8/7p/3KNN1k/2p4p/8/3P2p1/8 w - - 0 1"]

1. Kc6 g1=Q 2. Nxh4 Qa7 3. Nhf3 Qa6+ 4. Kc5 c3 5. dxc3 Qa7+ 6. Kd6 Qa3+ 7. Ke6 Qxc3 8. Kd5 Qc8 9. Ke4 Qh3 10. Kd5 Qg3 11. Ke4

For what it's worth, I tried it out on my own relatively modest laptop with i7-7700HQ, 8 cores, 16 GB hash and Stockfish 15 NNUE for about 40 minutes and it still gave -4.65 eval, after 18 billion nodes instead of 459 billion. Probably would've benefited a lot from a 7-piece tablebase, or even just the 6-piece one.

info depth 69 seldepth 130 multipv 1 score cp -456 nodes 18878194760 nps 8098927 hashfull 691 tbhits 0 time 2330950 pv f5g7 h5g5 e5f3 g5g4 d5e4 h4h3 g7f5 g2g1q f3g1 h3h2 f5h6 g4h5 g1f3 h2h1q h6f5 h5g4 f5e3 g4g3 e3f5 g3f2 f5d4 h1h7 e4d5 h7c7 f3e5 c7a5 d5e4 a5a2 e5g4 f2e1 d4f3 e1e2 g4e5 a2a6 e4d5 a6b5 d5d4 e2f2 d4e4 b5b7 e4d4 f2g3 d4c4 g3f4 c4c5 b7a6 c5d5 a6a5 d5d6 a5d8 d6c5 f4e4 d2d3 e4f4 c5c6 d8f6 c6d5 f6b6 d3d4 b6b3 d5d6 b3a3 d6e6 a3a6 e6d5 a6b6 f3h4 b6d8 d5e6 d8d4 e5g6 f4e4 e6e7 d4a7 e7f6 a7f2 f6e6 f2e3 e6e7 e3e2 e7f7 e2f1 f7e7 e4d5 h4g2 f1a1 g2f4 d5e4 f4e6 a1a7 e7f6 a7f2 f6e7 e4f5 g6f8 f2e3 e7d6 e3d3 d6c6 d3d2 e6c5 d2h6 c5e6 f5e5 c6c7 h6e3 c7c6 e3f3 c6d7 f3f7 d7c6 f7e8 c6c7

The current PGN viewer at move 11 doesn't recognize in a valid PGN that Nd4 can only refer to one knight, so move 11 has to be written out.

[title "Stockfish 15 NNUE at depth 69"]
[fen "8/8/7p/3KNN1k/2p4p/8/3P2p1/8 w - - 0 1"]


1. Ng7+ Kg5 2. Nf3+ Kg4 3. Ke4 h3 4. Nf5 g1=Q 5. Nxg1 h2 6. Nxh6+ Kh5 7. Nf3 h1=Q 8. Nf5 Kg4 9. Ne3+ Kg3 10. Nf5+ Kf2 11. Nf5d4 Qh7+ 12. Kd5 Qc7 13. Ne5 Qa5+ 14. Ke4 Qa2 15. Ng4+ Ke1 16. Nf3+ Ke2 17. Nge5 Qa6 18. Kd5 Qb5+ 19. Kd4 Kf2 20. Ke4 Qb7+ 21. Kd4 Kg3 22. Kxc4 Kf4 23. Kc5 Qa6 24. Kd5 Qa5+ 25. Kd6 Qd8+ 26. Kc5 Ke4 27. d3+ Kf4 28. Kc6 Qf6+ 29. Kd5 Qb6 30. d4 Qb3+ 31. Kd6 Qa3+ 32. Ke6 Qa6+ 33. Kd5 Qb6 34. Nh4 Qd8+ 35. Ke6 Qxd4

Now, do you count engines using tablebases as solving the study? Stockfish with just the 5-man tablebase (a couple hundred megabytes of relevant files) is able to compute a draw in a few minutes. The eval quickly neutralizes from -4 to 0.0 around depth 45 and stays there for increased depth (tested up to 72).

info depth 45 seldepth 54 multipv 1 score cp 0 nodes 2418702985 nps 8967492 hashfull 60 tbhits 3503813 time 269719 pv d5c6 g2g1q f5h4 g1a1 h4f3 a1a8 c6c5 a8a3 c5c4 a3d6 d2d4 d6a6 c4c5 a6e6 d4d5 e6c8 c5d4 c8c7 d5d6 c7d6 d4e4 d6c5 e4d3 c5f2 d3e4 f2e2 e4f4 e2c2 f4g3 c2a4 g3h2 a4f4 h2g2 f4e3 g2g3 e3b3

I also left Crystal, a Stockfish derivative designed to solve chess problems, on overnight, but it computes depth much slower than stockfish and didn't solve the study.

info depth 57 seldepth 118 multipv 1 score cp -245 nodes 9016985399 nps 9322203 hashfull 519 tbhits 0 time 967259 pv f5g7 h5g5 e5f3 g5g4 g7f5 h4h3 d5e4 g2g1q f3g1 h3h2 f5h6 g4h5 g1f3 h2h1q h6f5 h5g4 f5e3 g4g3 e3f5 g3g2 e4e3 h1c1 f5d4 c1a3 e3f4 a3b4 f4e3 b4b8 f3h4 g2g3 h4f5 g3h3 d4f3 h3g2 f5d4 b8e8 e3f4 e8h5 f4e3 h5d5 f3e1 g2g3 e1f3 d5c5 e3e4 c5h5 d4f5 g3f2 f5d4 h5h1 e4d5 f2g3 d5c4 h1f1 c4d5 g3f4 f3e5 f1g2 d4f3 g2g8 d5d4 g8b3 d4c5 b3a3 c5d5 a3a2 d5d4 a2b2 d4d5 b2b6 d2d3 b6d8 d5e6 d8a5 e6d6 a5b4 d6e6 b4c5 d3d4 c5b6 e6d5 b6b3 d5d6 b3b8 d6c5 b8a7 c5d6 a7a6 d6d5 a6b6 f3h4 b6a5 d5e6 f4e4 e6e7 a5c7 e7e6 c7d8 e5g6 d8b6 e6f7 b6d4 f7e7 d4f2 e7e6 f2f1 e6e7 e4d5 h4g2 f1f2 g2f4 d5e4 f4e6 f2a7 e7f6
0
2

This has turned into a hot discussion... I take it positively because we need more traffic.

I'm confident all the well written engines will give Kc6 with sufficient thinking time. That's because all other alternatives are even worse. The line starting with Kc6 is the only line that the computer finds with 2 knights vs queen. Everything else results in further material loss and therefore discarded.

Since the engine is able to see Kc6 would be the only move not losing instantly, the puzzle should be considered solved.

It's insane for the Stockfish engine to give a 0.00 score in this kind of position because it is simply not designed for something like this.

0

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.