Chess playing program using minimax algorithm and alpha beta algorithm. Alpha beta runs much faster. To run the code first download and install python. Run 'pip install python-chess' from the command line. Then, run 'python Minimax.py' or 'python AlphaBeta.py' from the command line. Note, user always plays white. Jan 26, 2018.
Published on Mar 28, 2020
Abstract
The objective: The main goal of this project is to create an effective algorithm for finding the best move in a given chess position. This algorithm will consist of a series of step-by-step tests and avoids the use of intuition or the need for a theoretical chess background.
Methods/Materials
The materials I used were a chess set and chessboard, various positions from The Art of Planning in Chess and other chess books, Fritz 11 and ChessDiagrammer chess software, and a pencil or pen.
In order to create my first algorithmic component, I analyzed various chess positions where tactical motifs, or types of tactics, were present and investigated the interactions and relationships between the pieces involved in the tactics.
Geometrically defining these relationships enabled me to create a series of step-by-step methods a player can use to determine whether he can execute any tactics.
For my second component, the Positional Evaluator, I studied annotated chess games and classified plans that were employed in those games under certain categories based on their purposes and goals.
By examining these plans I was able to extract certain relationships between the pieces involved in the plan and other points and lines on the board. I again used these relationships to create various tests chess players can use to determine whether he should implement a certain type of plan.
I tested my algorithm on many different instances from master games and in each instance a strong move was found.
Results
I successfully created an algorithm for finding the best move in any chess position that does not require the user to have any theoretical chess background or to implement his intuition.
Conclusions/Discussion
I concluded that there are certain spatial and functional relationships between the pieces on the chessboard that determine the positional and tactical features present in a given position. I fulfilled my goal by creating an algorithm for finding a strong move in a chess position that avoids the use of intuition.
Algorithm For Chess Program In Python Free
This Mathematical project creates an understandable algorithm for finding the best move in a chess position that does not require the user to implement his intuition.