Stockfish and another modern classic more-mover

23 Mar. 2019 | by Peter Wong

Like all top chess engines, Stockfish is a super-tactician and as such it’s normally able to uncover any forced-mate sequences that aren’t excessively long. Yet there are certain directmate problems that are relatively short but which confound the engine. A year ago in a Walkabout (12 Mar. 2018) I wrote about such an exceptional composition, a 9-mover that was unsolved even when its solution was truncated. Given that Stockfish has had two new releases since that column appeared, it seems appropriate to provide an update on its progression as a problem solver. Furthermore, I will present another superb directmate that stumped the engine. Not only is this problem even shorter than the 9-mover, but it possesses an unusual feature that might explain why the program has trouble unravelling either of these works.

As a recap, here is Theodor Siers’ 9-move problem that was fully analysed in the earlier column. At the time, the Stockfish version 8 on Chess.com could not find its solution after running for an hour. Even if we simplify the problem by removing the first few moves of its main variation, the engine failed to solve it until the play is reduced to 5 moves. That means Siers’ problem at the mate-in-6 stage could be the shortest forced-mate sequence that “defeats” Stockfish.

Theodor Siers
Die Schwalbe 1935

Mate in 9

1.Kb1! Sd5, [M8 unsolved by SF10: 2.Kc1!] Sb4, [M7 solved by SF10: 3.Kd1!] Sd5, [M6 unsolved by SF8: 4.Ke1!] Sb4, [M5 solved by SF8: 5.Kf1!] Sd5 6.Kg1! Sb4 7.Kh1! Sd5 8.Bc5 S-any 9.Bxe7.

Cut to the present, we find that version 10 of Stockfish has improved significantly at this 9-move task. It should be mentioned here that I'm now using a PC installation of Stockfish, which gives greater control of its functions compared with the Chess.com Analysis feature. By using Lucas Chess as the interface, it’s also easy to swap between different versions of Stockfish and compare their performances. Now Stockfish 10 manages to solve not only the 6-move position but the 7-move one as well. The mate-in-7 sequence was found in under an hour (the time limit used in all of these tests), with the settings of maximum depth and three lines of evaluation. The problem at the mate-in-8 stage – let alone the original mate-in-9 – remains too difficult for the engine (various numbers of evaluation lines were tested).

Soon after writing about Siers’ masterful work in the first instalment, I came across another more-mover that Stockfish 8 could not handle. This 7-mover by Vladimir Nikitin, diagrammed below, renders a brilliant theme and it became an instant favourite of mine. The task here looks impossible and I gave up on it rather quickly, but the solving program Popeye confirms that the solution is correct in about 50 minutes. Stockfish 8, on the other hand, wasn’t able to crack it until the main line is reduced to 5 moves; therefore a year ago this directmate shared the unsolved mate-in-6 record with Siers’ problem.

Vladimir Nikitin
Shakhmaty v SSSR 1984, Special Prize

Mate in 7

Let us analyse this curious position. Black’s pieces are completely locked up in the corner, but they form a strong fortress against which White cannot break through, at least not in time. Here’s a try sequence that Stockfish finds almost instantaneously, where White launches a successful assault on h3 – 1.Qe6 f5 2.Bxf5 e4 3.Rh8 e3 4.Bxh3 Qxh3 5.Rxh3+ Bxh3 6.Rh8 Rxe1 7.Qxh3+ Kg1 8.Qxh1, but the mate is one move too slow! As one might expect, the actual solution requires a more subtle approach. White’s plan is to deploy the knight to execute a smothered mate on g4, but the piece cannot begin its three-move trip immediately because 1…e1=Q would unleash the black force against the white king. Rather, White must start with four preparatory moves designed to protect the king, so that the knight trip becomes safe to play. If White shifts the bishop as part of this fore-plan, Black’s e5- and f6-pawns will be forced by zugzwang to march forward two steps each, conveniently unguarding the three squares that the knight wants to access (Sd3-e5-g4).

How does White use the first four moves to secure the king against disruptive black checks that could follow …e1=Q, a move that not only adds a queen but also activates the f2-rook and f1-bishop? The difficulty here seems but compounded by the powerful white force available, which offers numerous options for shielding the king, and the king itself has many potential hiding squares to choose from. Let’s try placing the piece on a1, for example: 1.Ka1 f5 2.Bb1 e4 3.Rc1 f4 4.Rb2 e3 5.Sd3, and after 5…e1=Q the white pieces have blocked all queen checks and also …Ra2+, hence 6.Se5 and 7.Sg4 seem unstoppable. But in fact Black can refute with 5…e1=S!, since 6.Se5 Sc2+! checks after all and there’s no mate next move.

The correct fore-plan sees all four white line-pieces making attractive long-range moves to cover the king, which stays on its initial square. Notice how White’s move order is neatly forced, as these line-pieces must avoid interfering with each other. 1.Rc1! f5 2.Bc2! e4 3.Rb2! f4 4.Qb3! e3 5.Sd3 e1=Q; now that the coordinated white army has forestalled checks by Black’s promoted queen, f2-rook, and f1-bishop, 6.Se5 is viable and Black cannot prevent 7.Sg4.

What makes this composition so strikingly original is that the greater part of White’s play is motivated purely by defence. Siers’ problem also has this rare feature, in that the white king’s trek is aimed at evading the black knight’s checks. With hindsight, it’s obvious what caused Stockfish difficulties are these paradoxical defensive moves that are integral to the most efficient mating line. I guess nobody told it that in some special circumstances, defence is the best attack! Be that as it may, the newest version of Stockfish has also advanced in dealing with Nikitin’s 7-move task, deciphering the mate-in-6 position within the hour. But unlike the case with Siers’, the improvement is for one move only. Nikitin’s original mate-in-7 position is still too tough and thus it becomes the shortest forced-mate sequence I know that cannot be solved by Stockfish.