Chess Endgame Training
Chess Endgame Training
Mini Project
SUBMITTED BY
Amer Bindiyab
(160518733046)
Mohd Ishaq
(160518733028)
ABSTRACT:
“The goal of the project is to create a lightweight application that can generate chess positions
for finding checkmate in a certain number of moves.”
● This app will greatly help chess Enthusiasts to Work on their SKills, By improving them
in the Hardest part of the game(i.e the Endgame).
● The player has to select the number of moves from the UI.
● The app will generate a random puzzle based on the number of moves.
● The player can consider the puzzle and figure out the particular checkmate.
Introduction
In chess and chess-like games, the endgame (or end game or ending) is the stage of the game
when few pieces are left on the board.
The line between middlegame and endgame is often not clear and may occur gradually or with
the quick exchange of a few pairs of pieces. The endgame, however, tends to have different
characteristics from the middlegame, and the players have correspondingly different strategic
concerns. In particular, pawns become more important as endgames often revolve around
attempting to promote a pawn by advancing it to the eighth rank. The king, which has to be
protected in the middlegame owing to the threat of a checkmate, becomes a strong piece in the
endgame. It can be brought to the centre of the board and act as a useful attacking piece.
Compared to chess opening theory, which changes frequently, giving way to middlegame
positions that fall in and out of popularity, endgame theory is less subject to change. Many
people have composed endgame studies, endgame positions which are solved by finding a win
for White when there is no obvious way to win, or a draw when it seems White must lose.
Chess players classify endgames according to the type of pieces that remain.
Literature Review:
Murray Campbell et al [1] contributed to the making of this chess engine which was attempted twice
because the first time it lost to the chess grandmaster Garry Kasparov in 1996 but later went on to defeat him in
1997. It was the first chess machine to defeat a grandmaster in tournament play. It uses a single chip move
generator. Deep Thought 1 and Deep thought 2 were intermediate stepping stones to the Deep Blue, but Deep
Thought 2 was played in a lot of public events from 1991-1995. Deep Blue I, which was initially defeated by
Kasparov, made it
machine games which is a great way to compare which machine works the best when it comes to a game of
chess.
Omid E. David et al [7] put forward the idea that unlike the conventional chess engines, a genetic
algorithm can be used to skip the brute force and actually improve the AI to such a potential that it can surpass a
human at the game. The algorithm starts with a population, and with each generation, the fitness improves,
which improves the chances of a computer winning against a human. In the initial stages of chess engines, only
1-ply searches were possible, but due to the algorithm’s evolutionary nature, now it is possible to make tens of
plies searches in a tournament game. This is tested out in this paper with the help of chess as well as checkers.
Nathaporn Karnjanapoomi et al [8] in this paper brings out the possibility of throwing away the orthodox
idea of two-player chess games and allowing 3 players to play in the same game. Any player that captures
another payer’s King, is declared a winner in this game. Thus, this game not only gives an opposing edge but
also creates the possibility of cooperation of two players to defeat the third one. This is implemented by the use
of the Nondominated Adversarial Search algorithm which makes it necessary for the player to select the number
of good moves over the quality of moves.
Rahul A R et al [9] describes in this engine, that most game engines are beaten by Grandmasters very
easily since the engine does not calculate the future effects of a certain move made currently. This engine thus
evaluates the position evaluation and returns the material difference between the player positions. This is
important as in a game of chess, sometimes a side willingly sacrifices a coin in order to lay out a more elaborate
trap. For the computer to this, it must evaluate the position and the moves in advance and niching and multi-
niching is used to defeat the player. This engine also allows the players to use advance tactics such as castling,
which has been possible only in the real-life board game till recently. Thus, this engine has the closest, most
efficient AI for the game of chess.
Diego Real and Alan Blair [10] made the Duchess chess engine work with efficiency. In this paper, the
duchess chess engine is explained which allows up to six players in each game and also adds an additional coin
of the ‘Duchess’, which can perform the Bishop and Knight’s moves. This engine also adds one additional
player.
○
● Fig 2: checkmate in 1 move
○
● Fig 3: selecting desired no. of moves
○
Conclusion and Future Enhancements:
The first thought that comes to mind is simply expanding to a larger database of positions.
Currently, there are only 100k possible positions to generate, and there should be many, many
(incalculably many) more.
A second idea for improvement is to actually allow the user to play the position. This would
require a much greater understanding of JavaScript than I have and goes beyond the scope of this
project anyways.
Lastly, and somewhat tied to the second improvement, is the ability to give a hint for the first
move to make to follow through on the checkmating pattern.
References:
● Python documentation:
● Flask documentation:
● Pandas, NumPy, plotly from Udemy