Skip to content

Repository files navigation

Thibau Chess Engine C++

A C++20 UCI chess engine with a small Python desktop UI and testing tools. The engine supports alpha-beta search, transposition tables, perft/regression checks, opening-book loading, and NNUE evaluation support.

Features

  • UCI-compatible engine binary: thibau_uci
  • CMake build with portable, AVX2, native, and AVX-512 VNNI CPU profiles
  • Regression/perft test target
  • Python GUI for running local UCI engines
  • Match and self-play scripts for engine testing
  • Stockfish-derived NNUE integration

Build

Portable release build:

cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release -DENGINE_X86_PROFILE=portable
cmake --build build-release -j

AVX2 release build:

cmake -S . -B build-release-avx2 -DCMAKE_BUILD_TYPE=Release -DENGINE_X86_PROFILE=avx2
cmake --build build-release-avx2 -j

Debug build:

cmake -S . -B build-debug -DCMAKE_BUILD_TYPE=Debug -DENGINE_ENABLE_SANITIZERS=OFF
cmake --build build-debug -j

Run

UCI smoke test:

@"
uci
isready
ucinewgame
position startpos
go movetime 500
quit
"@ | .\build-release\thibau_uci.exe

Test

Quick regression:

.\build-release\regression.exe --quick

Full regression:

.\build-release\regression.exe

Python Tools

Install Python dependencies:

python -m pip install -r requirements.txt

Run the GUI:

python .\tools\uci_gui.py

Run a random-position match:

python .\tools\match_random_positions.py --engine1 .\build-release\thibau_uci.exe --engine2 .\build-release\thibau_uci.exe --positions 20 --movetime 100 --seed 1

Large Files

NNUE network files are tracked with Git LFS. Install Git LFS before cloning if you want the full evaluation assets:

git lfs install

License

This project is distributed under GPL-3.0-or-later. See LICENSE.

Some NNUE source files are adapted from Stockfish and retain their original copyright notices. See NOTICE.md.

About

C++20 UCI chess engine with NNUE support and Python tooling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages