
About a year ago, I started building a chess engine for the spell chess variant. I build a working prototype of an engine in about a month but then I hit a wall. There was literally no tooling available for this specific chess variant, no guis nor SPRT test runners. As a result, my engine was actively accumulating all sorts of bugs.
This is why built UCILoader. It is a self-contained, cross-platform UCI protocol client library made using entirely hand-written code and no vibe-coded nonsense. AI usage was limited to rewriting documentation for doxygen.
What my project does:
- It is a C++ 17 cross-platform library for writing tools that interacts with chess engines using UCI protocol
- Provides support for standard chess out-of-the-box and can be easily customized for exotic chess variants with custom move notation.
- Handles the lifecycle of engine instances, including opening executables, synchronizing initialization, and automatic cleanup upon destruction.
- Allows users to ask engines to search for the best move within a specified time limit and retrieve details such as the best move, ponder move, and search status.
- Allows to enumerate and set engine options (e.g., Hash table size, WDL settings) directly from C++ code.
- Supports redirecting UCI protocol messages to various output destinations (files, stdout, stderr, in-memory buffers, callbacks, or custom classes)
- Offers traits to customize logging behavior, such as adding timestamps, adding direction prefixes, or filtering out specific message types
- Supports registering callbacks to capture specific engine events, such as when engine sends info message or when it crashes
- Uses the CMake build system to generate files and allows for easy linking into other C++ projects via
add_subdirectoryorfetch_content. - Posses a robust UCI protocol parser that handles malformed messages gracefully
- Doesn't require any other dependencies
I successfully solved most of my original problems using this library, as it powers my own SPRT test runner, tournament manager and soon my own GUI.
Let me know if you find that kind of library helpful or if it is too low level. Feedback and critique welcome.