This is a player vs computer AI chess game implemented in Python. The game features an interactive chessboard where players can make moves by entering the current position and the desired new position of a chess piece. Additionally, the game includes an AI opponent with movement implemented using the alpha-beta pruning algorithm.
This project is an extension of my own AY 22/23 S1 CS3243 Project 3.
The game uses the following Python libraries:
os: For interacting with the operating system.matplotlib: For visualizing the chessboard.
Make sure to install these dependencies before running the game.
- Run the chess game script in your Python environment.
- The chessboard with pieces visualisation will be displayed.
- Enter the current position of the piece you want to move (e.g., 'a2').
- Enter the new position for the piece (e.g., 'a4').
- The chessboard will be updated, and the new position of the piece will be displayed.
- The AI opponent will make a move using the alpha-beta pruning algorithm, the chessboard will be updated, and the new position of the piece will be displayed.
- Continue making moves until you decide to end the game.
python chess_game.pyFollow the on-screen instructions to play the game.
Ho Kae Boon
