Nyxptr is a C++20 chess engine built around a Torch-backed searcher, UCI support, self-play generation, PGN and puzzle conversion tools, and Syzygy tablebase probing.
- UCI engine mode for chess GUIs and analysis tools
- Monte Carlo tree search powered by a TorchScript model
- Self-play data generation with policy/value training data
- PGN-to-binary conversion helpers
- Lichess puzzle conversion helpers
- Syzygy probing for tablebase positions
You can find pre-built binaries on the Releases page.
- Windows (CPU): The standard release (
Nyxptr-v0.0.4-windows-cpu.zip) includes everything needed to run on Windows using the CPU version of libtorch. - Other Platforms/GPU: Currently, there are no pre-built binaries for Linux or GPU-accelerated (CUDA/ROCm) versions. If you wish to use GPU acceleration or run on Linux, please follow the Build instructions below.
- Download a release or build from source.
- Model File: Ensure you have the model file at
model/nyxptr_v4.pt. (This is already included in the Windows release ZIP). - Run the engine binary directly or through
run.baton Windows. - For GUI use (e.g., Nibbler), point the GUI to the executable.
- Model File: A trained TorchScript model (
model/nyxptr_v4.pt) is required. You can download the latest version from the Releases page. - Tablebases: (Optional) Syzygy tablebases in a
tablebases/directory. - Build Dependencies:
- CMake 3.19+
- C++20 compatible compiler (MSVC 2022, GCC 11+, or Clang 12+)
libtorch(Match the version to your hardware: CPU, CUDA, or ROCm)
- Download the
libtorchc++ zip from the PyTorch website. - Extract it into the repository root so that the
libtorchfolder is visible to CMake. - Run
cmake --preset vs2022-x64
cmake --build --preset vs2022-x64-releaseThe executable will be located at out/build/vs2022-x64/Release/Nyxptr.exe.
The repository includes a Linux preset that expects libtorch at /opt/libtorch:
cmake --preset linux-rocm
cmake --build --preset linux-releaseUpdate CMakePresets.json or pass -DTorch_DIR=... if your libtorch is installed elsewhere.
By default, Nyxptr starts in UCI mode. It also supports specific utility tasks:
--uci: Start the UCI loop explicitly.--selfplay <games> <simsPerMove> [outputFile]: Generate training data.--convert <pgnDir> <binDir>: Convert PGN files to binary training format.--convert-puzzles <csvPath> <binPathBase>: Convert Lichess puzzle CSVs.
Example:
Nyxptr.exe --selfplay 50 800 selfplay_data.binsrc/&include/- Core engine logic and entry points.ext/Fathom/- Syzygy probing source (MIT License).run.bat- Windows helper to launch the Release buildCMakeLists.txtandCMakePresets.json- build configurationout/- Default build output directory.
- Hardware Acceleration: While the Windows release uses the CPU, Nyxptr supports GPU acceleration. For maximum search speed, it is recommended to compile the project yourself against the CUDA (NVIDIA) or ROCm (AMD) versions of libtorch.
- Nyxptr Engine: Distributed under the GNU General Public License v3.0.
- Third-Party Code: This repository bundles Fathom for Syzygy probing (MIT License). See
ext/Fathom/for details and third-party notices. - Binary Distributions: Pre-built releases contain redistributable binaries from the PyTorch project and Intel. Full attribution and license texts for these dependencies are included in the
NOTICEfile within the release ZIP.