With the black king in the middle of the board, there are two cases: the queen sitting next to the black king and the queen at least two squares away. There are a total of 364 checkmating positions, which appear as "Black to move loses in 0" in the tablebase.Īll of the checkmating positions have the black king on the side of the board or in the corner.
Chess endgame tablebase 7 pieces plus#
The 22,176 positions with queen en prise plus the 872 stalemate positions account for the 23,048 drawn positions.Ĭheckmate positions The white king can not be next to the black king, as that would create an illegal position, and it can not be next to the queen, as it would then be protecting the queen from capture. The white queen must be next to the black king, so there are three possibilities if the black king is in the corner, five possibilities if it is on the side, and eight possibilities if it is in the middle. There are 64 possible positions for the black king. Next, we need to calculate the number of positions with the queen en prise. So with rotations and reflections, there are 8 x 8 = 64 positions of this type. There are two squares the white king can be on, and the position can be shifted 1, 2, or 3 positions to the right. The queen covers four of the five flight squares again, but the fifth square is now next to the black king instead of diagonal from it. Stalemate position D shows a fourth type of stalemate.
Thus, with rotations and reflections, there are 27 x 8 = 216 positions of this type. When shifted 5 files to the right there are only two places for the white king. The same thing happens with the position shifted 1, 2, 3, or 4 files to the right. In Stalemate position C, the queen covers four of the five flight squares, and the white king covers the fifth square, which it can do from five possible squares. With the black king on the side of the board, there are also two types of stalemate. Considering rotations and reflections, there are 15 x 8 = 120 positions of this type. If the white king is on b6, the queen has to attack along the diagonal, so there are five possible squares, while if the white king is on a6, it can also attack along the file, so there are ten squares. If the white king covers two of the flight squares (stalemate position B), the queen only needs to cover one square. The white king can be on any of the remaining 59 squares, so considering rotations and reflections, there are 59 x 8 = 472 positions of this type. If the black king is in the corner, the three flight squares can be covered by the queen as shown in stalemate position A. There are four stalemate configurations, which are shown in the diagrams.
The drawn positions consist of only positions where Black is stalemated or the white queen is en prise. There are a total of 23,048 drawn positions in the KQK endgame. If Black plays less than optimally, he could get checkmated sooner, and if White plays less than optimally, it could take longer to checkmate. The results are for optimal play by both sides. If it is Black's move, "Black to play loses in 5" means that White's fifth move (which is numbered 6) is the checkmating move, e.g. For example, in the sample position given, "White to play mates in 5" means that White's fifth move is the checkmating move, e.g. The number of moves to checkmate is the number of moves required by White, including the checkmating move. In all the positions given, by convention the stronger side is White. A much simpler algorithm like the one in the Chess Wikibook will deliver checkmate only a few moves later than the optimal algorithm, but easily within the 50-move limit. In normal play, there is no need to follow an optimal algorithm. This book shows the optimum method for forcing checkmate in a human-understandable format. Although this tablebase provides a complete solution to the KQK endgame, it is in a format that can only be used by a computer. It is relatively easy to generate a computer database, called a tablebase, which has all the possible positions and the number of moves to checkmate for each position. This book is an exact analysis of the KQK endgame, where one player has a King and a Queen and the other player has only a King.