Just one of 17,823,400,766 positions

by Frederic Friedel
4/23/2015 – Last Tuesday we told you how difficult four-piece endings can be for humans, especially against a computer that understands them perfectly. Well, it's peanuts compared to five and six-piece endings where we sometimes have absolutely no idea what the program is doing and why. Still you can analyse them with your computer and recognize new ideas that can be used in other areas of the game.

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.

More...

Perfect endgame play (2)

In the first part of this series we told you how endgame databases (or "tablebases") worked, using the example of the four-piecer king+queen vs king+rook. It was the first endgames that was exhaustively calculated, by Ken Thompson back in the early eighties. He generated every legal position with the given material – 1,900,000 in all – and working backwards from mates created a list in which every position contained information with the distance to mate (the longest was 61 moves). His program used this list to play the queen vs rook ending with absolute perfection – "as well as god", Ken once quipped.

In the subsequent years Ken Thompson and others worked out all five-piece endings. If you buy one of our chess programs, they will already play a number of four and five-piece endings (e.g. Q vs R or R+P vs R) perfectly. With the Endgame Turbo (see below), which is delivered on four CDs, our programs will play all important five and six-piece endings perfectly. They will in fact use the endgame knowledge in the search, so that games against the computer these days usually end in mate announcements in 20 or more moves!

In the following we will give you some interesting facts about the longest six-piece endgame. Much of the text is taken from an article we published thirteen years ago (probably we have a GM-strenght reader who was not born at the time?!). In the meantime there are a few seven-piece endings, where mates in well over 500 moves are recognized. But these tablebases would occupy around 150 terabytes of hard disk space and so definitely do not fit on a pen drive. They are interesting mainly for research purposes.

Just one of 17,823,400,766 positions

The four-piece endgame queen vs rook required the computer to generate a total of 1.9 million legal positions that are possible with the given material. In subsequent years Thompson calculated all relevant five-piece endings, which contained 212 and 335 million positions each. And then came the six-piece endings, which required truly massive computing power to calculate – and plenty of hard disk space to store. Russian programmer Eugene Nalimov created a new format that required eight times less space than the previous versions. The latest format, developed in 2013 Ronald de Man, is seven times smaller than the Nalimov tablebases, and for the first time makes it possible to provide users six-men tablebases on DVDs, to be installed on a notebook computer.

In 2002 Helmut Conrady, a German computer chess journalist, started experimenting with the first six-piece endings and made some remarkable discoveries. With the help of Ken Thompson he found the the longest know win in a six-piece ending.

White needs to play 262 accurate moves to mate the opponent, assuming perfect play by both sides. You can replay the solution below, but before you do so here are some interesting (actually "depressing" would be more apt) facts about the the endgame and the above position.

  • The number of positions in the above endgame, K+R+N Vs K+N+N, with White to move is exactly 17,823,400,766. They have all been calculated and are all contained in the database. 70.08% of them are winning for White.

  • The above position is the only one (excluding its mirror positions) in this ending that requires 262 moves to mate. All other of the thousands of billions of positions are shorter wins (or drawn).

  • In the course of the solution White exceeds the fifty-move rule no less than five times.

  • If the black king were on a1 instead of b1 in the above position the number of moves to mate is reduced by 141 moves (to 121 moves). If it were on a2, b2 or c1 the position would be a draw.

  • It is quite likely that nobody will ever understand the point of the moves which the computer tells us are necessary. If you replay the solution you will feel that White sometimes makes no progress for dozens of moves. Then he seems to restrict the black knights, only to let them go for the next 30 or 40 moves.

  • Of the first 14 moves in the solution to the above position eleven white moves are absolutely forced. This means that if White does not find the only accurate move the game is immediately drawn. There is a phase from move 125 to move 134 in which White has to make ten accurate moves. Any deviation from the forced line loses half a point.

In the above position the only move that wins (= mates in 262 moves) is 1.Ke6!! Conrady wrote at the time: "Only the chess god Caissa knows why in a position without enemy contact or direct threats exactly this one unique move must be played." The best black reply is 1...N6b4! If he plays anything else he shortens the game by at least 143 moves, e.g. 1...Kc1 = mate in 119, 1...N6d4 = mate in 117 or 1...Na5 = mate in 106.

In our analysis any move with two exclamation marks indicates that it is the only white move that retains the win. Every other move draws. A single exclamation mark (!) indicates that this move leads to the shortest mate – all other moves will delay the win unnecessarily. For Black a single exclamation mark means this is the only move that doesn't shorten White's win. The first eight moves of the solution are 1.Ke6!! N6b4! 2.Ke5!! Nd3+! 3.Ke4!! Nf2+! 4.Kf3!! Nd3! 5.Ke2! Ncb4! 6.Ke3!! Kb2! 7.Kd4!! Nf4! 8.Kc4! Nbd5!

Here's a depressing question: which is the next move that White must play in order to keep the win? There is only one single move he must find, all others lead to a position in which Black can draw. Write down five candidate moves and then check whether the correct one is among them when you play through the solution. GMs should write down three, 2800-players only two.

Incidentally Frederic Friedel reports that he once visited the Kasparov camp of a World Championship preparation session. There was the most powerful human chess entity on the planet: the strongest chess player alive, and four of the best analysts in the world. Frederic presented the group with two positions from the above endgame. Naturally he did not ask them to find the proper continuation – that would have been silly. He just told them that one position derives from the other after twelve accurate move – deviating from any one of these moves at any point would lead to a draw. The five chess brains were only required to tell him which was the earlier position and which one came after the twelve "only moves". Kasparov simply burst into laughter – both positions were equally obscure, there was no way of telling which was the more advanced position that the attacking side needed to aim for.

So why install these endgame tablebases and why use them? After all even if the computer tells you, in an analysis session, that you can trade down to a winning six-piece ending, what is the point if you have no idea how to actually force the win? Well, remember you are playing a fellow human who also does not understand all the subtleties of the position the way the computer does. By practicing the endgame against the database you can become not perfect but consideraby better at handling it. And: trying to attack or defend such positions against the computer will show you ideas and manoeuvres you have never seen before. These ideas stick in your brain and can prove useful in positions that have nothing to do with the endgame.

Computers and endgames: Ken Thompson with Garry Kasparov in 1996

You can play through the main line of this endgame on our Javascript board. If you want full analysis with replayable variations you can download the game in CBV format, which can be read by ChessBase, Fritz or any of our compatible chess programs. Maybe we are wrong, maybe with a few decades of intense work you will be able to understand this endgame.

[Event "?"] [Site "?"] [Date "2002.01.26"] [Round "?"] [White "Longest six-piece endgame"] [Black "R+N vs N+N"] [Result "1-0"] [Annotator "Helmut Conrady"] [SetUp "1"] [FEN "6N1/5KR1/2n5/8/8/8/2n5/1k6 w - - 0 1"] [PlyCount "523"] [EventDate "2002.??.??"] [SourceDate "2002.02.14"] {In this analysis any move with two exclamation marks (!!) indicates that it is the only white move that retains the win. Every other move draws. A single exclamation mark (!) indicates that this move leads to the shortest mate - all other moves will delay the win unnecessarily. For Black a single exclamation mark means this is the only move that doesn't shorten White's win.} 1. Ke6 $3 N6b4 $1 2. Ke5 $3 Nd3+ $1 3. Ke4 $3 Nf2+ $1 4. Kf3 $3 Nd3 $1 5. Ke2 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h4 $1 Nfe5 234. Ke6 $1 Nf7 $1 235. Rg3 $1 Nfh6 $1 236. Rg1 Kg8 237. Ra1 Kf8 238. Ra7 Kg8 $1 239. Rd7 Kf8 240. Ng6+ $1 Kg8 $1 241. Nf4 $1 Nh2 242. Rb7 Nf3 $1 243. Kf6 $1 Ng4+ $1 244. Kf5 $1 Nf2 $1 245. Ne6 $1 Nh4+ $1 246. Kg5 $1 Nf3+ $1 247. Kf4 $1 Ne1 248. Ra7 $1 Nfd3+ 249. Kf5 $1 Nf3 $1 250. Rg7+ $1 Kh8 251. Rg3 $1 Nfe5 252. Nc7 $1 Kh7 $1 253. Ne8 $1 Nf2 $1 254. Kxe5 Kh6 $1 255. Rf3 Kh5 256. Rxf2 Kg4 $1 257. Nf6+ Kg3 258. Ne4+ $1 Kg4 $1 259. Kf6 $1 Kh4 $1 260. Kf5 $1 Kh3 $1 261. Ra2 Kh4 262. Rh2# $1 1-0

Endgame databases for notebook computers

In the years after the pioneer work with four-piece endings Ken Thompson and others worked out all five-piece endgames, which have between 212 and 335 million positions each. And then came the six-piece endings, which required truly massive computing power to calculate – and plenty of hard disk space to store. Russian programmer Eugene Nalimov created a new format that required eight times less space than the previous versions. And in 2013 Ronald de Man developed the "Syzygy Bases" that were in turn seven times smaller than the Nalimov tablebases. For the first time it was possible (or practical) to provide users six-men tablebases on DVDs.

If you buy one of our chess programs, they will already play a number of four and five-piece endings (e.g. Q vs R or R+P vs R) perfectly. With Endgame Turbo the programs will play all important five and six-piece endings perfectly. They will in fact use the endgame knowledge in the search, so that positions with many more than six pieces that can be traded down to advantageous six or five-piece endings will be handled perfectly as well.

Endgame Turbo 4 contains all five and 27 of the most important six-piece endgames in the Syzygy format, which can be used with top engines like Komodo 8 or Houdini 4. Endgame Turbo 4 consists of four DVDs with the following endgames:

You can order Endgame Turbo 4 in the ChessBase shop here.
Price: €59.90 – €50.34 without VAT (for customers outside the EU) and $54.03 (without VAT).


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.

Discuss

Rules for reader comments

 
 

Not registered yet? Register