As someone who had no idea on chess, I needed a partner to learn it. What better partner than the intelligent computer? So, I taught computer to play the chess and in the same way learnt it with it.
This project is built on the python programming language, which is an interpreted high-level general-purpose programming language used to develop a chess system based on “Adversarial Search and Games.” This system uses alpha-beta pruning which is a standard minimax algorithm.
To install this project, make sure you have the correct version of Python and Pygame.
- Switch to Python3.
- Follow the code below to create virtual environment and install the necessary libraries.
git clone https://github.com/karmasta13/Chess-Engine.git
cd ./Chess-Engine/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- To start the game, run
python ChessMain.py
, then select the game mode you want to play in the command line. - To undo a move, press
z
. - To reset the board, press
r
.