LiRu-Bot, our Lichess bot
LiRu-Bot is our standalone Lichess bot - a Rust port of the official lichess-bot by the lichess-bot-devs (AGPL-3.0). It drives a UCI chess engine: in the standard build any engine as a separate process, in the online deployment compiled together with the clrsrc engine into a single program. Plus connectivity hardening and matchmaking.
Architecture
The core building blocks - deliberately accessible.
The name: LiRu-Bot
LiRu-Bot stands for Lichess Rust Bot - which is also its name on GitHub: a bot written in Rust that lets an engine play through the official Lichess bot API.
Rust port of lichess-bot
A reimplementation of the official lichess-bot by the lichess-bot-devs in Rust. Because the upstream is AGPL-3.0, LiRu-Bot is AGPL-3.0 too - the upstream is openly credited.
Engine-agnostic
LiRu-Bot speaks the UCI protocol and can therefore drive any UCI engine - not just clrsrc. The engine is interchangeable; the connection stays the same. (Applies to the standard build with a separate engine process.)
Connectivity hardening
It detects dropped connections and hanging or missed moves and keeps continuous operation stable - even over a flaky home internet connection.
Matchmaking
It seeks suitable opponents on its own and accepts challenges - so games happen around the clock.
By the Lichess bot rules
LiRu-Bot plays through the official Lichess bot API - via an account upgraded to "BOT" with its own endpoints. It receives the game flow as a running event stream and reports the moves computed by the engine (including resign, draw offer and draw claim). The clock runs against an absolute deadline - subtracting only half the round-trip time to the server, since Lichess compensates for the lag itself. Only standard chess games are accepted; on rate limits it backs off.
When porting, LiRu-Bot was checked not only against the Python upstream but against the official Lichess spec - parity with Python is not the same as conformance with the spec.
How it fits together
LiRu-Bot drives a UCI engine - depending on the build, as a separate process or as one shared program.
Standard: two programs
In the standard build, LiRu-Bot launches the engine as a separate program and talks to it over UCI (text lines via stdin/stdout) - two distinct processes. This lets you attach any UCI engine; here the clrsrc engine is not linked to the bot.
Online deployment: one program
For continuous operation on the rented VPS, the bot and the clrsrc engine are compiled into a single program - one process that connects to Lichess from there. The benefit: one precise wall-clock deadline instead of separately stacked time estimates of bot and engine - and noticeably fewer time forfeits. You can watch the running game on the Live page →
License: LiRu-Bot - like the lichess-bot upstream it is ported from - is under AGPL-3.0, the clrsrc engine under GPL-3.0. In the standard build both run as separate programs (loosely coupled over UCI, engine not linked) - two cleanly separated licenses. In the embedded live build they form a combined work (the GPL engine statically inside the AGPL bot); this is not a license conflict, because AGPL-3.0 covers GPL-3.0. Source: github.com/clrsrc/liru-bot ↗.