A deterministic chess programming toolkit.
"Chess programming exposes you to a wide range of programming disciplines."
ChessRTK (crtk) is a deterministic chess programming toolkit for
legal move generation, move validation, perft testing, FEN/PGN/SAN/UCI workflows,
Chess960, UCI engine analysis, puzzle mining, dataset export, SVG board rendering,
and native PDF publishing.
ChessRTK is not a single playing engine. It is the toolbox around chess engines and chess data: a shared Java 17 rules core, a scriptable command line, a Swing desktop Workbench, record and dataset pipelines, rendering tools, and publication tooling. The same position model powers every surface, so legality, notation, tags, diagrams, engine jobs, datasets, and books do not drift apart.
See the documentation for setup, examples, command help, Workbench usage, dataset workflows, book publishing, and troubleshooting.
This repository contains:
- README.md, the file you are currently reading.
- LICENSE.txt, the GNU General Public License version 3.
- src, the Java source for the CLI, Workbench, chess core, engines, renderers, dataset writers, and regression tests.
- scripts, build, documentation, release, and regression helpers.
- wiki, the Markdown source for the generated documentation.
- docs, the generated documentation site and PDF manual.
- assets, logos, board assets, diagrams, screenshots, and social preview graphics.
- native, optional CUDA, ROCm, and oneAPI native backends.
Large local model weights belong under models/ and are intentionally not tracked.
Install the launcher on Debian/Ubuntu-style systems:
./install.sh
crtk doctorRun a few deterministic chess-programming checks:
crtk fen print --startpos
crtk move list --startpos --format both
crtk engine perft --startpos --depth 4 --threads 4
crtk engine bestmove --fen "<FEN>" --format both --max-duration 2sThe command grammar is noun-then-verb:
crtk <area> <action> [options] [args]
Examples include crtk move list, crtk engine perft,
crtk engine bestmove, crtk puzzle mine, and crtk book render.
Start the desktop Workbench:
crtk workbenchIf the launcher is not installed, use the jar or classpath entry point:
java -jar crtk.jar help
java -cp out application.Main helpRead the getting started guide and command reference for the full command surface.
ChessRTK builds with the stock JDK. There is no Maven, no Gradle, and no third-party Java dependency tree. Always compile for the Java 17 release:
find src -name '*.java' | sort > /tmp/crtk-srcs.txt
javac --release 17 -d out @/tmp/crtk-srcs.txt
rm -rf out/schemas && cp -R schemas out/schemas
jar --create --file crtk.jar --main-class application.Main -C out .Or use the regression runner:
./scripts/run_regression_suite.sh build
./scripts/run_regression_suite.sh jarSee Build and Install for prerequisites, install paths, optional UCI engines, model files, and native GPU backends.
ChessRTK prioritizes deterministic behavior and one shared chess core. Changes to legality, notation, engine workflows, rendering, datasets, or publishing should keep outputs stable and should update the docs when behavior changes.
Before sending changes, run:
./scripts/run_regression_suite.sh recommendedSee Development Notes, Quality and Testing, and AI Agents for repository conventions, test targets, and reproducible agent workflows.
ChessRTK is free software distributed under the GNU General Public License version 3.
You may use, modify, and redistribute it under the terms of that license. When you distribute modified versions, keep the license and corresponding source available. For research or published work, cite the repository and pin the commit hash or tag used to produce your results.
