Skip to content

Repository files navigation

ChessRTK

ChessRTK

A deterministic chess programming toolkit.

Explore ChessRTK docs »

Report bug · Command reference · PDF manual

License Java

Overview

"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.

Files

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.

Using ChessRTK

Install the launcher on Debian/Ubuntu-style systems:

./install.sh
crtk doctor

Run 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 2s

The 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 workbench

If the launcher is not installed, use the jar or classpath entry point:

java -jar crtk.jar help
java -cp out application.Main help

Read the getting started guide and command reference for the full command surface.

Compiling ChessRTK

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 jar

See Build and Install for prerequisites, install paths, optional UCI engines, model files, and native GPU backends.

Contributing

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 recommended

See Development Notes, Quality and Testing, and AI Agents for repository conventions, test targets, and reproducible agent workflows.

Terms of use

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.

Releases

Contributors

Languages