This repository contains a Python-based chess engine designed to work with the xboard interface. The engine leverages Python's powerful libraries and pyenv to create a flexible and easy-to-maintain chess playing system. It supports the UCI (Universal Chess Interface) protocol, allowing it to integrate seamlessly with various chess graphical user interfaces (GUIs) that support UCI.
The project includes:
- A Chess Engine: Implemented in Python, capable of interacting with chess GUIs via the UCI protocol.
- Configuration: Detailed instructions to set up the environment using
pyenvand manage dependencies withpip. - Integration with
xboard: Configuration to run the engine usingxboard, a popular chess GUI.
Whether you are a chess enthusiast looking to experiment with chess engines or a developer interested in enhancing a chess engine, this repository provides a solid foundation to build upon.
Make sure you have the following tools installed on your system:
Follow these steps to clone the repository, set up the Python environment, and run the chess engine:
-
Clone the Repository
Open a terminal and run the following command to clone the repository:
git clone https://github.com/Aayush-Kr-13/Chess-Engine-Python.git
-
Create a Virtual Environment
Navigate into the cloned repository directory:
cd Chess-Engine-PythonCreate a new virtual environment using pyenv:
pyenv virtualenv 3.12.0 chessify
-
Configure pyenv
Add pyenv to your PATH and initialize it. You can add these lines to your shell configuration file (e.g., .bashrc, .zshrc, etc.):
export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"
After adding these lines, reload your shell configuration:
-
Activate the Virtual Environment
Activate the newly created virtual environment:
pyenv activate chessify- Install Dependencies
Install the required Python packages using pip:
pip install -r requirements.txt- Run the Chess Engine
Use xboard to run the chess engine:
xboard -fcp chessify/main.py -fd . -fUCINotes
Ensure that xboard is properly installed and configured on your system. If you encounter issues related to aplay, it is generally safe to ignore them unless audio functionality is crucial for your setup.