/chess-engine

Dig chess. Curious about building my own basic chess engine.

Primary LanguagePython

Chess AI

A simple chess AI implemented in Python using the python-chess and pygame libraries. Play against a basic chess engine with an 800 Elo rating.

Installation

Follow these steps to set up the Chess AI on your system:

Prerequisites

  • Python 3.x
  • Pip (Python package manager)

Install Dependencies

  1. Install the python-chess library:

  2. Install the pygame library:

  3. Install the cairosvg library:

  4. For macOS users, install the cairo library using Homebrew:

If you don't have Homebrew installed, follow the installation instructions on the Homebrew website.

Running the Chess AI

To run the Chess AI, execute the following command:

This will open a new window with the chessboard. Play as the white pieces by clicking on a piece and then clicking on the destination square.

Features

  • Basic chess engine with an 800 Elo rating
  • Simple GUI using the pygame library
  • Minimax search algorithm with a limited depth
  • Material-based evaluation function

Future Improvements

  • Implement more advanced evaluation functions
  • Add better search algorithms (e.g., alpha-beta pruning)
  • Improve the GUI (e.g., board scaling, move animations)

License

This project is licensed under the MIT License.