Skip to content

Kaeboon/AI-Chess-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Chess Game

Alt text

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.

Dependencies

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.

How to Play

  1. Run the chess game script in your Python environment.
  2. The chessboard with pieces visualisation will be displayed.
  3. Enter the current position of the piece you want to move (e.g., 'a2').
  4. Enter the new position for the piece (e.g., 'a4').
  5. The chessboard will be updated, and the new position of the piece will be displayed.
  6. 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.
  7. Continue making moves until you decide to end the game.

Usage

python chess_game.py

Follow the on-screen instructions to play the game.

Author

Ho Kae Boon

About

Player vs Computer Chess game using Alpha-Beta Pruning Algorithm. Expansion of project for NUS CS3243

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages