Kling combination: a self-stalemate theme that perplexes Stockfish
15 Jul. 2023 | by Peter Wong
As the strongest chess engine of today, Stockfish is unsurprisingly capable of solving most forced-mate problems of reasonable length. Indeed, it generally cracks even complex composed problems that are under 10 moves in mere seconds. That’s why it’s interesting to consider the rare exceptions of short problems that the engine has trouble unravelling, and a few years ago I discussed two compositions that were unsolved by the then current SF version 10 when given a whole hour. With each iteration of the engine advancing in strength, however, Siers’ M9 (see earlier blog) is now solved by SF version 15 in about 20 minutes, and Nikitin’s M7 in 3 minutes. Hence I began to suspect that short problems which baffle SF are a thing of the past – that is, until a Chess.com forum user named drdos7 posted a M5 composition that couldn’t be handled by SF15!
I was delighted by the discovery of this five-mover composed by Friedrich Kohnlein; it shows a curious idea rarely encountered in the practical game. Known as the Kling combination, the theme involves Black concocting their own stalemate as a subtle defence, which White must circumvent to force the quickest mate. This prompted me to test SF with other examples of the theme, and while the engine solved most with ease, I found a M7 by Wilfried Neef that apparently confounded SF15. Software progress never ceases, though, and a few weeks ago saw the release of SF16. The latter managed to crack Kohnlein’s M5 but not Neef’s M7, or so I thought initially… When as a further test I turned off its NNUE feature (the neural networks component that makes SF slightly stronger), the new engine solved the M7 as well! Still, it took SF16 a remarkably long time to unravel these short problems – about half-an-hour each. Regardless of SF’s performance, these are high-quality compositions that present an attractive idea, and we’ll examine both below.
It may be useful to provide a few technical notes on using SF to analyse forced-mate problems. (There are more specialised programs like Popeye and non-pruning SF variants that solve such problems faster than the standard SF, but they are not the subject of this blog.) I run a locally installed SF on a desktop PC with average specifications, which is stronger than the browser-based versions found on Chess.com. If you use the Chess.com SF, make sure to change the Analysis depth setting to Unlimited, otherwise the default depth is so low that the engine often fails to solve even M2 compositions. My choice of GUI for SF is Lucas Chess, which allows you to switch quickly between not only, say, SF15 and SF16, but also between various settings like NNUE turned on or off. The Kitbitzers utility of Lucas Chess displays the changing evaluations of the top moves during analysis (similar to the Chess.com Analysis format) – this facilitates the measure of SF’s solving time.
Camillo Gamnitzer
Thèmes-64 1976, 3rd Prize
Mate in 4
We start with a clear demonstration of the theme, a four-mover that SF solves in a split second. The black king is trapped, and White’s best plan is to arrange a bishop mate on d5 with the piece supported by the white king. Restricted to dark squares, the black bishop cannot attack any important white units, though it can prevent the king from reaching d6. So the king heads for e6 after an initial clearance move by the white bishop. If White starts with 1.Bc4?, however, Black proceeds with a self-immobilising manoeuvre that spoils White’s intention: 1…Bh4! 2.Kf7 g5 3.Ke6 stalemate. The solution must take this defence into account and it begins with 1.Ba2! The threat of Kf7-e6 still applies, so Black has no choice but to go for stalemate: 1…Bh4 2.Kf7 g5. But now White takes advantage of Black’s immobility with 3.b3, which cuts off the key-bishop and leaves Black in zugzwang, forcing 3…Kd5 4.Sc3.
Note that not all composed problems in which Black attempts stalemate constitute the Kling combination (named after the 19th-century problemist Josef Kling). The theme specifically refers to a manoeuvre where Black moves a line-piece across a critical square (g5 in this case) which is then occupied by another black unit (typically a pawn), and this incarcerates the first piece to help bring about stalemate. In general White deals with such a Kling manoeuvre either by permitting the self-entrapment only to exploit it, or by preventing its completion. The above example shows the former in a particularly appealing way; the key 1.Ba2! is likewise a critical move that goes over b3 to enable the self-interference 3.b3, complementing Black’s thematic play, 1…Bh4 and 2…g5.
Friedrich Kohnlein
Deutsches Wochenschach 1904
Mate in 5
In the five-mover, Black’s rook and bishop are impeding any attempt by the c7-knight to threaten mate on f6. White has one alternative way to create a threat: bring the king to f2 in four moves for 5.Rg3 mate. After 1.Kc1!, Black’s best defence is 1…Ra5 which serves two purposes. (1) One aim is to give a disruptive check on the first rank, since if White captures the rook at any point, that wastes a move and the mate on g3 will arrive too late; e.g. 2.bxa5? Bc6! 3.Kd1 is too slow, while the c7-knight remains shackled. Instead, White plays 2.Kd1 and if 2…Rxa3 then 3.Sd5 (not 3.Ke1? Ra1+! 4.Kf2 Rf1+); now Black can delay the knight mate by one move only, 3…Ra1+ 4.Bxa1 B~ 5.Sf6. (2) The other motive for 1…Ra5 yields the thematic variation, 2.Kd1 Ba4 and here if White continues with 3.Ke1? then 3…b5 4.Kf2 results in stalemate. Thus Black executes two critical moves with the rook and bishop, before confining both pieces with the pawn on b5, to neutralise White’s mating threat. The correct way to handle this defence is the Novotny move 3.b5, which shuts off both black pieces to generate a double-threat by the c7-knight. Black can answer only one of the threats, not both, with 3…Rxb5 4.Se8 R~ 5.Sf6, or 3…Bxb5 4.Sd5 B~ 5.Sf6. The strategy rendered here is brilliant. Black plans to complete the Kling manoeuvre with the self-obstructing …b5, only to be foiled by White’s own b5-move, which ironically turns Black’s critical play from a strength (potential stalemate) into a weakness (double-interference).
Wilfried Neef
Andrey Selivanov-50 Jubilee Tourney 2017, Special Commendation
Mate in 7
Here Black’s units are mostly locked up but the three white pieces on the lower ranks also can’t move without releasing them. The rook on d4 turns out to be a hindrance; once it’s shifted the white king can march to e3 to enable Bd2 mate. The black bishop is stuck on light squares but it has two options for counterplay, both starting with …Bxf3. This move would threaten both …Bxg2 to free the g3-pawn for promotion, and …Bd1 to set up a stalemate with …e2. The former plan is what defeats a random rook move like 1.Rb4? or 1.Kb6?, e.g. 1.Rb4? Bxf3! 2.Kb6 (2.gxf3? allows Black to promote even sooner) Bxg2 3.Kc5 Bf3 4.Kd4 g2 5.Kxe3 g1=Q+ – Black checks just in time to thwart the bishop mate. The key 1.Re4! cleverly gains a tempo by delaying …Bxf3; this rook move also entails a quicker threat (2.Rxe3 Bxf3 3.gxf3 g2 4.Re2 g1=Q 5.Bd2) that must be stopped by 1…Bxe4. Now White proceeds with the king march (not 2.dxe4? e2 3.Kb6 stalemate), against which the promotion idea no longer works: 2.Kb6 Bxf3 3.Kc5 Bxg2 4.Kd4 Bf3 5.Kxe3 g2 6.Bd2. Therefore after 3.Kc5 Black has to switch to the Kling defence, which leads to the main variation, 3…Bd1 4.Kd4 e2 – and now 5.Ke3? brings stalemate. Black’s new play carries two drawbacks that White can exploit, namely immobilisation and a self-block on d1 that frees up the white knight. Hence 5.Sd5 releases stalemate while vacating the c3-square, to force 5…exd5 6.Bc3 e1=Q 7.Qxb2. Although not as strategically rich as the previous problem, this is a fine composition in which White sacrifices two pieces to combat Black’s resourceful defences.
Here’s a summary of how Stockfish fares with the two longer problems on my PC. “Unsolved” means the solution is not found within the arbitrary one-hour limit. Kohnlein’s M5: unsolved by SF15 NNUE/non-NNUE; solved by SF16 NNUE/non-NNUE in about 30 minutes. Neef’s M7: unsolved by SF15 NNUE/SF16 NNUE; solved by SF15 non-NNUE/SF16 non-NNUE in about 30 minutes. Are there any forced-mate problems under 10 moves that SF16 (NNUE and non-NNUE) cannot solve in an hour?
You can find two more examples of the Kling combination on this site: (1) the classic mate-in-5 by Johannes Kohtz and Carl Kockelkorn, in the Problem World article on More-movers, and (2) mate-in-4 by Ado Kraemer, Weekly Problem No.583.