

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.
