A complete chess interface built in Python using the Pygame library. This interface supports three game modes: Player vs Player, Player vs Stockfish, and Player vs Custom Chess Engines. The project includes custom chess engines with distinct evaluation strategies, providing a versatile and competitive chess experience.
- Graphical User Interface (GUI): A user-friendly interface built with Pygame, displaying an interactive chessboard for seamless gameplay.
- Game Modes:
- Player vs Player (PvP): Traditional chess between two human players.
- Player vs Stockfish: Challenge yourself against the Stockfish chess engine for a competitive experience.
- Player vs Custom Engine: Play against one of five custom chess engines, each with unique evaluation strategies.
- Custom Chess Engines:
- Created 5 engines with distinct evaluation metrics, including mobility, king safety, material balance, pawn structure, and piece-square tables (PST).
- Engines were compared in a round-robin tournament, with the mobility-based engine achieving a 37.5% win rate, though with a longer evaluation time.
- Python 3.12
- Pygame:
pip install pygame
- Stockfish chess engine installed and configured
-
Clone this repository:
git clone https://github.com/AkNegi924/Chess-Playing-Interface.git cd Chess-Playing-Interface
-
Install the required libraries:
pip install pygame
-
Configure Stockfish:
- Download and install the Stockfish chess engine.
- Ensure the Stockfish executable path is set correctly in the code.
- Open
main.py
in a code editor, such as VS Code. - Run
main.py
to launch the initial window. - Select one of the three game modes:
- Player vs Player
- Player vs Stockfish
- Player vs Custom Engine
- After selecting a mode, begin playing!
Round-robin tournament results of the custom chess engines.
The custom engines were evaluated based on their unique strategies in a round-robin format. The mobility-based engine showed the highest win rate (37.5%) but required more computational time compared to other engines.
- Optimization of engine performance, especially for the mobility-based engine.
- Addition of more evaluation functions and combinations for enhanced gameplay.
- Improved user interface for move suggestions and analysis tools.
This project is licensed under the MIT License. See the LICENSE file for details.