A simple chess engine with a graphical interface built using Python, Pygame, and python-chess. Includes a random AI agent and an Alpha-Beta pruning AI for move selection.
- Graphical user interface (GUI) built with Pygame.
- Playable chess with legal moves enforced.
- Random AI agent.
- Alpha-Beta pruning AI for stronger play.
- Highlighting for legal moves, promotions, and check situations.
-
Python 3.8+
-
Dependencies (install via pip):
pip install pygame chess
-
Clone the repository:
git clone https://github.com/ogaber1/ChessAI.git cd ChessAI -
Run the game:
python main.py
An executable version is included for convenience.
Important: Place the executable file in the same directory as the assets folder, otherwise the game will crash.
- Ensure
main.exeand theassets/folder are in the same directory. - Double-click
main.exeto run the game.
- Human vs. Random AI
- Human vs. Alpha-Beta AI
- Random AI vs. Alpha-Beta AI
- Built with Pygame and python-chess.
- Developed by ogaber1 and maryamyasser33.