A Python-based set of tests for UCI server/chess engine implementations
Project description
UCI Test Suite
A Python-based set of tests for UCI server/chess engine implementations (such as Stockfish).
Overview
The UCI Test Suite is designed to test the correctness of a chess engine's implementation of the Universal Chess Interface (UCI) protocol, not its playing strength. This makes it useful for testing new chess engines or modifications to existing ones.
Features
- Tests basic UCI protocol commands and responses
- Checks position handling and move calculation
- Validates different time control parameters
- Supports various UCI options like Ponder and MultiPV
- Tests run in order of increasing complexity
- Testing continues even if individual tests fail
Dependencies
You need to have Python 3.10 or newer, and also uv/uvx installed.
Usage
To function, it requires an installed UCI-compatible chess engine, like Stockfish (has been tested with Stockfish 17).
In case of Stockfish, you can download it from https://stockfishchess.org/download/.
On macOS, you can use brew install stockfish.
You need to find out the path to your UCI-capable engine binary; for further example configuration, the path is e.g. /usr/local/bin/stockfish (which is default for Stockfish installed on macOS using Brew).
Run with --help to see all available command-line options.
Uvx (recommended)
Uvx is able to directly run the Python application by its name, ensuring all the dependencies, in a automatically-created virtual environment.
This is the preferred way to run the uci-test-suite.
Run the test suite using the following command line:
uvx uci-test-suite /usr/local/bin/stockfish
Uv
Use it if you have the repository cloned locally and run from it:
uv run uci-test-suite /usr/local/bin/stockfish
Development
# Clone the repository
git clone https://github.com/AnglerfishChess/uci-test-suite.git
# ... or
# git clone git@github.com:AnglerfishChess/uci-test-suite.git
cd uci-test-suite
# Create a virtual environment
uv venv --python python3.10
# Activate the virtual environment
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
# Install the package in development mode
# uv pip install -e .
# or, with development dependencies
uv pip install -e ".[dev]"
# Resync the packages:
#
uv sync --extra=dev
# Run tests
pytest
# Check code style
ruff check
Release process
uv build
uv-publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uci_test_suite-0.1.1.tar.gz.
File metadata
- Download URL: uci_test_suite-0.1.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8208e66827ea9c4d98ba0c65adce251f40d66ff56513ca4c80c327f1e8305b16
|
|
| MD5 |
faf9376e22555d8dab01c4a638696d6a
|
|
| BLAKE2b-256 |
8225d5e2262c78dc6c71225b5cf2736ec2db053a4a885738a93078e727d30f0c
|
File details
Details for the file uci_test_suite-0.1.1-py3-none-any.whl.
File metadata
- Download URL: uci_test_suite-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ec4a376f7e605333bbe5c7175927f382831baf71acfa287efc9aaae3183c7bd
|
|
| MD5 |
be71c94fa23e5459dd368f27c3a5fa6f
|
|
| BLAKE2b-256 |
ba96aad7c8fa049cfe176590d25f3fab0d306739d669f1f616c1093e1eba73bc
|