Humans and computers solving Djaja

by Frederic Friedel
5/12/2020 – Can computers handle perpetual check? Could they do so ten years ago. And more relevantly: can humans? Even those with super-GM titles? Well, a 2351 player was able to do it better than his brother, who was rated 400 points higher. We have told the story before, but since our readers spent the weekend working on the Djaja problem, it may be of interest to remember how Aronian, Navara, Gashimov, Mamedyarov and Kasparov fared.

ChessBase 17 - Mega package - Edition 2024 ChessBase 17 - Mega package - Edition 2024

It is the program of choice for anyone who loves the game and wants to know more about it. Start your personal success story with ChessBase and enjoy the game even more.


Before we come to the Djaja study, the subject of today's article, let me clear something up: a number of readers – well, a few readers – one reader – objected to my phrasing of the Dawson problem: "the player with the white pieces, on the move, refused to accept the resignation of his opponent. Instead he wagered that he would not win the game. He then played on and actually lost! Not by overstepping his time, resigning, or playing an illegal move. So how could he lose?"

True, I did not mention that the wager was accepted, or notarized. I phrased it in the interest of brevity. But for the record here is the original presentation from Thomas. R. Dawson, Reading Observer 29.3.1913. He reprinted it in Dawsons 'Caïssa’s Fairy Tales' in 1947, and the copy here is from that publication. It was sent to me by the ever-diligent Werner Keym.

On to Djaja. In my previous article I told you how, during a Chess960 World Championship 2009 (that's what it was called by the organizer and sponsor, Perdurabo) in Mainz, tournament arbiter Hans Secelle of Belgium showed us a position by D. Djaja. Before I tell you how the top player in Mainz handled the position, let us go through the solution. Full comments are given on our replay board.

As you probably know you can an engine (fan icon) that will help you to analyse. You can also click on the rook icon below the notation window. This will allow you the play the above position against Fritz, where you can see if the engine manages to hold the draw at tournament time controls.

[Event "Donner book"] [Site "?"] [Date "????.??.??"] [Round "?"] [White "Djaja, Dragutin"] [Black "White to play and draw"] [Result "1/2-1/2"] [Annotator "Friedel,Frederic"] [SetUp "1"] [FEN "8/R2Pk3/Pr6/7P/3r4/p5N1/7K/8 w - - 0 1"] [PlyCount "9"] {This is the starting positions of the full study. White’s position appears hopeless as there is no way of stopping the Black pawn’s march to become a queen.} 1. Nf5+ Kd8 2. Ra8+ (2. Nxd4 a2 3. Nc2 ({But our engines tell us that} 3. Rb7 a1=Q 4. Rxb6 Qxd4 5. a7 {would seem to ensure a draw.}) 3... Rb2 { and Black wins.}) {However, let us concentrate on the main line of the intended solution:} 2... Kxd7 3. a7 Ra4 4. Rg8 Rba6 {[#] This is the position we showed the GMs in Mainz, who were told to find a single white move, and then spend a few seconds explaining why it is a draw. The solution is:} 5. Nh6 $3 {and now White has perpetual check along the g-file! The explanation: "Now White has perpetual check along the g-file!" Check it out: the rook is proctected on every square the black king can use to approach: g1-g3 by the white king, g4 and g8 by the knight, and g6 by the pawn. The only unprotected squares, g5 and g7, cannot be used by the enemy king, since f5 and f7 are attacked by the knight.} 1/2-1/2

Now let us look back at engines in 2009, eleven years ago. When we took our bet with Hans Secelle the intention was to use the "Monte Carlo" function of Rybka, in which the program plays thousands of games against itself at high speed and discovers, although it may not understand why, that there is one move which simply does not produce wins for the black side (while all others do). However Rybka did it on a normal level as well:

Above is Rybka running on a standard quad system: the solution popped up in just 28 seconds, and remained permanently the main line of the program. But what about other engines?

This is good ol' Fritz 11, running on the same quad (at close to ten million positions per second). The program came up with the solution and stayed with it after just 32 seconds.

As we learned from the feedback of our 2020 readers, today's programs solve the problem and play 5.Nf6! with something close to a 0.00 evaluation instantaneously. So how about humans? In his book "The King" GM Jan Hein Donner wrote: "Keres, the two Byrnes, Lothar Schmid, Bisguier and I sat staring at this position for more than half an hour. We couldn’t find it. Can you?"

Indeed none of the chess players in Mainz were able to solve this position. Here are some of the top grandmasters who wrestled with the problem, and some cute little stories surrounding their efforts. I have told these before, like eleven years ago. But many readers may have missed the articles or forgotten them.

One of the first players I showed the problem to was Levon Aronian (on the right in this picture), between his games in the GrenkeLeasing Rapid World Championship. He solved it instantly, but had a little confession: "I know this position, I have read the Donner book!"

On the other hand Lev had a prediction: "Show it to Gabriel Sargissian," he said [Gabriel was his second, left in the picture above]. "That guy is a problem solving wonder. He gets any study and any problem immediately. It's a miracle."

No, it isn't! No, he could not.

Gabriel was unable to find the winning idea, and after some taunting by Levon and me he asked for the solution. Which I gave him.

Next I showed the problem to Evgeny Najer, rated 2663, Daniel Fridman, 2665, and David Navara, 2709 (left to right in the picture) – and to any number of other GMs in the hall. None solved it on the spot.

Late that evening Fridman, who spent a lot of time working on it, came up with the solution.

How about the others, the even stronger grandmasters?

That evening at the Champions' Dinner everyone got to try: in the above picture it is the late Vugar Gashimov, rated 2740, his brother and manager Sarkhan, IM elect rated 2351, and Viktor Bologan, 2689. At the same table was also Ivan Sokolov, 2655, Ordix Open winner Shakhriyar Mamedyarov, 2717, and other occasionally some inquisitive GM ("Hey, what you guys doin'?").

Guess which of the Gashimov brothers solved the puzzle. The one who was weaker at over-the-board chess, by almost 400 Elo points! Sarkhan is a project manager of Hewlett-Packard in Azerbaijan, speaks excellent English and has a great sense of humour. He spells his surname "Hashimov", but that is a Russian thing.

Shakhriyar Mamedyarov was another Super-GM who solved the problem – after a number of local tap beers and some intense brooding over our sheet of paper.


Another episode needs to be narrated, but I'll keep the protagonists anonymous, for obvious reasons. One top GM I showed the puzzle to – not necessarily one of those mentioned above – worked for a while on the problem and then gave up. Some time later he returned and asked to see it again. This time, after a few minutes of thinking, a smile broke out on his face and he gave me the correct solution.

Very nice. Except that later that evening a young and somewhat distraught lady told me the following: "He came outside and asked us for the solution, and the whimp (Gabriel) told it to him! The guy said we should not tell you, but I can't allow it to pass." Very devious – but hey, I like that in a man.

Finally there was Garry Kasparov, enjoying a vacation on a Mediterranean coast, but still keeping up with the chess news. He called and told me that he had solved the puzzle in a minute or two. "But only because of the big hint you included in the story!" Garry's reasoning, as he explained it: "If Rybka takes half a minute – that long! – to find the solution, in an open position, then there is only one possibility: it must be a perpetual! Once you realize that the solution is easy to find...". Good thinking, Garry Kimovitch!

Editor-in-Chief emeritus of the ChessBase News page. Studied Philosophy and Linguistics at the University of Hamburg and Oxford, graduating with a thesis on speech act theory and moral language. He started a university career but switched to science journalism, producing documentaries for German TV. In 1986 he co-founded ChessBase.


Rules for reader comments


Not registered yet? Register