The story behind clrsrc

From an afternoon hack to its own chess AI.

clrsrc didn't appear overnight - but almost. In about three months the path led from a Python engine written in one afternoon, through a Rust rewrite, to a standalone engine with a self-trained neural network that plays live on Lichess today. Here is the whole story: the tech, the hardware, the method - and why none of it would have been possible without a human-AI partnership.

March–June 2026 Rust own NNUE home cluster vibe coding
Timeline

Three months, one sprint

The public engine matured from version 1.0.0 to 1.1.1 in only about two and a half weeks - preceded by weeks of prototyping with the predecessor Jugernaut.

Timeline: Jugernaut (Python) in March, Rust Jugernaut, clrsrc 1.0.0 on May 25, 1.1.0 and LiRu-Bot on May 31, 1.1.1 on June 9, website on June 10, 2026.
Origins March–June 2026 · self-made graphic
The genesis

From Jugernaut to clrsrc

About the name

Why "clrsrc"?

A small retro nod to the craft: in the early C days (Turbo C / Borland, conio.h) almost every program started with the call clrscr() - "clear screen", to wipe the console. That became the project name: clr (clear) + src (source) = "clear source" - the pure source.

The brain

How a neural network learns chess

An NNUE (Efficiently Updatable Neural Network) evaluates positions - and is trained in four steps:

NNUE pipeline: 1. datagen generates about 200 million positions via self-play, 2. Stockfish 17.1 re-evaluates them as a teacher, 3. the trainer bullet learns a net from them, 4. the net is embedded into the engine.
Self-play → teacher labeling → training → embedding · self-made graphic
Staying honest: a distilled net can approach its teacher, but on the learned distribution it cannot surpass it. That is exactly where the ongoing research starts - bigger nets, deeper training labels.
Quality

Observe, analyze, fix

An engine doesn't get stronger because you claim it does - but because you measure every change, find weaknesses from real games and eliminate bugs consistently.

Quality loop: generate data, train net, SPRT test, deploy to the live bot, analyze games, fix bugs and maintain the book - and back to data generation.
Every insight from real games feeds back into data, net and search · self-made graphic

Monitoring - distributed, not central

There is no central monitor: each AI instance watches its own domain, and the findings converge over the message bus.

Game & bug analysis

Bug fixing

Four examples following the pattern symptom → cause → fix → effect:

Experience

The curated experience book

So the engine doesn't have to recompute every known position, an "experience book" collects deep search verdicts - and it's maintained like its own little data format.

The hardware

A data center built from leftovers

The millions of training positions were not created in the cloud, but on a patched-together home cluster - desktop, old laptops, even smartphones under Termux, orchestrated over SSH - complemented by a rented VPS, the only node running all year round.

10
compute nodes (incl. VPS)
~250–300
positions / second
~60M
positions in 2-3 days
RTX 5060 Ti
GPU for net training
NodeProcessorSystem
DesktopRyzen 9 9950X + RTX 5060 TiWindows 11
Laptop YogaCore i7-1165G7 · AVX-512Debian
Laptop Device33Core i5-7200UDebian
Laptop X230iCore i3-3110MDebian
Smartphone X1Dimensity 9300+Android · Termux
Smartphone X2Snapdragon 778GAndroid · Termux
Smartphone X3Snapdragon 888Android · Termux
Smartphone SamsungSnapdragon 888Android · Termux
TV boxARMv8 (aarch64)Android · Termux
VPS (rented)x86-64 · AVX-512Linux · 24/7/365
Inter-instance communication

When AIs talk to each other

Each subproject - engine, bot, training, website - has its own AI instance. To work in sync, they exchange facts over a lean message bus. clrsrc is the hub.

Bus topology: clrsrc as the central hub, connected to the instances nnue_train, website, chess_engines and bot via pairwise buses; above them a shared, read-only fact log.
clrsrc as hub · pairwise buses + shared fact log · self-made graphic

Some instances even respond autonomously to incoming messages - safeguarded by several brakes: limited reply depth, cooldowns, a daily limit, a budget cap and a kill switch. A human message resets the chain at any time.

Instances & skills

Five specialists, one toolbox

Each instance has its own remit - and self-built tools for it, called skills in Claude Code jargon: small, recurring workflows that launch with a single command. What the four working instances can do:

♟️

clrsrc - engine & hub

The actual chess engine and at the same time the central instance through which all the others are coordinated.

Skills: expmerge-deploy (curate-merge the opening book from real bot games & ship it live), sprt (statistically A/B-test new versions), cold-probe (reproduce reported blunders in a fresh process), fleet-status (control the compute cluster). Rust hardening with Kani, Miri and Clippy.

🤖

bot - Lichess bot

Runs @clrsrc_lc0 live on Lichess and analyzes every game.

Skills: game-review (triage lost games: rating drift + eval trajectory to the tipping point), cold-probe (prove a finding move-by-move), report-finding (report & file findings uniformly), bot-health (live status, read-only). Plus occasional code-review and an hourly tournament poll.

🧠

nnue_train - net training

Trains the neural network and decides which candidate may proceed.

Skills: coverage-round (a complete training round), eval-net (check a candidate against the baseline), sprt-handoff (hand a net over for strength testing), build-book (a targeted opening book for data generation). Principle: selection by playing strength, not by training loss.

📊

chess_engines - the yardstick

A curated collection of 57 reference engines with uniform technical profiles. Measures clrsrc's strength from real engine-vs-engine games - measured, not estimated.

Work: profile analysis (reading engine internals faithfully from source), cutechess tournaments (round-robin & gauntlet), source verification and an independent fact & code review of this website.

And the fifth instance? It built this site - static, no framework - and draws its numbers exclusively from the verified facts of the other four. Above them all sits shared tooling: the message bus with its shared fact log, an automatic check for new mail at the end of every reply, an autopilot for headless operation and a crash recovery that can resume any session with full context.

Human & AI

Who actually does what?

🧭

The human - architect & decision-maker

Sets the goals and quality bars, runs the hardware, keeps the legal guardrails and judges results with chess understanding.

⚙️

Claude Code - the executing developer

Writes and refactors the code, builds tools, researches and documents - and runs partly autonomously within clear limits.

💡

Thinking together

The biggest progress comes not from plain task processing, but from thinking together. The human brings a question or an observation; the instance digs in, checks hunches against the actual data and discards what doesn't hold. Often a long-held assumption flips - because someone measured instead of guessing. Human and AI here are not a command chain, but conversation partners: the human sets direction and limits, the instance delivers depth, evidence and sometimes pushback.

💬

Working together and talking about it

The work happens in conversation: active brainstorming, open exchange, collecting ideas and sharpening them together. The special part is the short path - over the interinstanz bus the instances talk to each other directly, flexibly and fast. Questions, answers and evidence travel back and forth automatically, without anyone copying text from one chat into the next.

This is vibe coding in the serious variant: not "let it generate blindly", but stating intent in natural language - and then proving every engine change statistically via SPRT. Vibe meets the measuring stick. Without this partnership the project wouldn't exist.

Why chess is hard

The endless positions

Chess can't be "brute-forced". There is a perfect solution - but it's practically unreachable.

~10⁴⁴
legal positions
~10¹²⁰
possible games (Shannon number)
~10⁸⁰
atoms in the visible universe

The way out is two levers that multiply: search smarter (prune the search tree aggressively) and evaluate better (the NNUE). These two levers are the entire story of this project.

Law & fairness

Open and clean

Full acknowledgement of all projects from which code, algorithms or data formats originate is in the CREDITS file on GitHub ↗.

Outlook

Where it's heading