Skip to content

Releases: clrsrc/liru-bot

LiRu-Bot v0.4.0

Choose a tag to compare

@clrsrc clrsrc released this 16 Jul 14:36

LiRu-Bot 0.4.0

LiRu-Bot (Lichess Rust Bot) — a bridge between the Lichess Bot API
and chess engines. Coupled with clrsrc v1.3.0: this release pairs the engine's search and
mate/endgame correctness work with a round of robustness and connectivity hardening on the bot
side — all of the bot fixes had already been running on the live bot.

Engine — clrsrc v1.3.0

A pure search/correctness release; the network is unchanged from v0.3.0. Highlights:
singular extensions disabled, reworked mate / tablebase-win score banding (tablebase wins get
their own band; mate N means a genuine mate), mate-before-50-move-rule priority, an NNUE
loader guard (clear error instead of an out-of-bounds panic on a foreign-bucket net),
opening-book hygiene, and a default-on conversion-time floor so clearly won endgames get
converted instead of drifting toward a repetition draw.

Bot — robustness & connectivity hardening

  • Stream-idle watchdog (60 s): a half-open connection resubscribes in seconds instead of
    hanging ~12 min for the OS TCP keep-alive.
  • Stream-open & connect timeouts: a socket that accepts but never responds can't wedge the
    reconnect loop (an established stream's body is not limited).
  • Non-JSON error-body tolerance: a challenge endpoint returning HTML (load balancer on
    5xx/429) no longer aborts the request path.
  • Game-task panic isolation: a panicking game is caught as a normal per-game error instead
    of leaking its concurrency slot and idling the bot.
  • Accept/gameStart race guard: under concurrency: 1, two challenges processed before
    either game starts can't both be accepted.
  • Threefold-repetition counting fix: repetitions are counted per move, not per event.
  • Experience-overlay self-heal: a torn trailing record from an interrupted write is
    truncated to the last aligned boundary before appending.
  • Config hardening: env-only token support and a restart-safe daily game counter.

Downloads (Windows x86-64)

Asset Description License
liru-bot-0.4.0-windows-x86_64.exe Default subprocess build — engine-agnostic, talks UCI to any engine you configure. pure AGPL-3.0
liru-bot-clrsrc-0.4.0-windows-x86_64.exe Embedded build — the clrsrc engine linked in-process for an authoritative wall-clock search deadline. Turnkey clrsrc bot. combined work (see below)

Both are portable builds (no target-cpu=native); they run on any x86-64 CPU.

Running

  1. Copy config.yml.exampleconfig.yml and set your Lichess bot:play token.
  2. liru-bot-0.4.0-windows-x86_64.exe: point engine: at your UCI engine (e.g. the
    self-contained clrsrc 1.3.0 binary).
    liru-bot-clrsrc-0.4.0-windows-x86_64.exe: no external engine needed — supply the NNUE
    network clrsrc_v32_seed_b.nnue (from the
    clrsrc v1.3.0 release) via EvalFile.
  3. liru-bot-0.4.0-windows-x86_64.exe --config config.yml

License / Corresponding Source (AGPL §6 / §13)

LiRu-Bot is AGPL-3.0-or-later, a modified derivative of lichess-bot
(© lichess-bot-devs and contributors). The default subprocess binary is a pure AGPL-3.0
artifact; its Corresponding Source is this repository at tag v0.4.0.

liru-bot-clrsrc-0.4.0-windows-x86_64.exe is a combined work (AGPLv3 §13 / GPLv3 §13):
LiRu-Bot (AGPL-3.0) + clrsrc (GPL-3.0). Each part keeps its own license. Corresponding Source
for this binary is both:

Operating the embedded binary as a network service triggers the AGPL §13 obligation to offer
the Corresponding Source of the whole to its users.

Credits

Derived from lichess-bot by the
lichess-bot-devs and contributors (AGPL-3.0). Embedded engine:
clrsrc (GPL-3.0).

LiRu-Bot v0.3.0

Choose a tag to compare

@clrsrc clrsrc released this 23 Jun 07:03

LiRu-Bot v0.3.0

Engine update

  • clrsrc v1.2.0 (bench 1527458, embedded KB16 NNUE cf576f64)
  • late-IIR search ordering improvement
  • TMV1 time management (SOFT_INFLATION_CAP, flatter defense spend)
  • TT-mate-depth guard (anti warm-TT-mate-dump)
  • Embedded PV fix (lib.rs, correct PV reporting)

Bot hardening

  • Daily game budget: UTC-day counter with configurable soft cap against Lichess 100 bot-vs-bot/day limit
  • Escalating 429 backoff: opponent rate-limit tracking with progressive back-off
  • Opponent rate-limiting: per-opponent incoming cap to block ELO-harvesting floods
  • Content-decline skip: proper handling of onlyFriends and content-policy declines (no account-level backoff)

Assets

File Description MD5
liru-bot-clrsrc-0.3.0-windows-x86_64.exe Self-contained (embedded clrsrc v1.2.0 + KB16 NNUE) ca9dedf2c274bcfd787f998691553157
liru-bot-0.3.0-windows-x86_64.exe Subprocess mode (bring your own engine binary) eb893d03613a864e30be516db3ba7b2e

Engine source: clrsrc v1.2.0

LiRu-Bot v0.2.0 — clrsrc v1.1.1 (+~100 Elo) + connectivity hardening

Choose a tag to compare

@clrsrc clrsrc released this 10 Jun 13:00

v0.2.0 (2026-06-10)

Engine

  • clrsrc v1.1.1 (matefix + repfix + IIR-late): ~+100 Elo over v0.1.0's clrsrc v1.1.0
    • matefix: fixes short-mate repetition shuffle (+48 Elo), closes game uEn2qBri class
    • repfix: fixes long-mate 3-fold draw-detection in depth<=0 leaf, closes game lPG7cqDO class
    • IIR-late: moves the Internal Iterative Reduction block after pruning gates — effective pruning
      depth is no longer reduced, yielding stronger pruning and +56 Elo

Connectivity hardening

Three fixes that prevent mid-game connection losses from forfeiting games:

  • Fix 1a — Game-stream resubscribe (clock-aware): When the game stream drops (EOF or transport
    error), the bot now attempts to reopen it with an exponential backoff (1s / 2s / 4s, hard cap 8 s,
    total budget min(12 s, remaining_clock / 10)) rather than immediately abandoning the game.
    On reconnect Lichess resends a gameFull event; the new gameFull reconnect arm replays the full
    move list from that event so the board state is always canonical (idempotent — no double-move risk
    even if our last move was already delivered before the drop).

  • Fix 2a — Stream-open Storm-Killer: get_event_stream / get_game_stream now use a single
    HTTP attempt instead of the old with_backoff loop (100 ms retry every 5 s for up to 60 s on
    failure). That old loop issued ~600 rapid requests on a transient blip, triggering Lichess's
    /api/stream/event 429 cascade which killed all game streams account-wide. A single failing
    attempt is now surfaced immediately; the reconnect cadence is owned by the outer loop.

  • Fix 2b — Event-stream 429 back-off: When the event-stream reconnect receives an HTTP 429
    RateLimited, the bot now honors retry-after from the Lichess response (plus jitter) instead
    of pressing ahead at the fixed 5 s exponential cadence. This prevents repeated re-triggering of
    the 429 window.

Matchmaking

  • Diversity brake: Matchmaking now enforces max_challenges_per_opponent_per_day (default: 5)
    so a single online bot cannot monopolize the challenge queue. A soft weighting additionally
    down-weights already-played opponents in favour of fresh bots when several are available.
  • Config key matchmaking.max_challenges_per_opponent_per_day (integer, 0 = unlimited).

Timer / subprocess time management

  • Added movetime_cap_ms on the subprocess path: instead of forwarding raw clock times to the
    engine via go wtime/btime, the bot now sends go movetime N where N = remaining/30 + inc.
    This bounds the rare soft-inflation overshoot class (clrsrc's stability_factor could inflate
    the soft limit on oscillating positions, causing single moves > 120 s → forfeit on slow hardware).

Diagnostics

  • Per-move engine eval is now logged at DEBUG level (ply, bestmove, score, depth,
    nodes, pv) when using the embedded engine backend. Useful for post-game analysis.

LiRu-Bot 0.1.0

Choose a tag to compare

@clrsrc clrsrc released this 31 May 17:35

LiRu-Bot 0.1.0

LiRu-Bot (Lichess Rust Bot) — a bridge between the Lichess Bot API
and chess engines. A Rust port of the official Python
lichess-bot.

Downloads (Windows x86-64)

Asset Description License
liru-bot.exe Default subprocess build — engine-agnostic, talks UCI to any engine you configure. pure AGPL-3.0
liru-bot-clrsrc.exe Embedded build — the clrsrc engine linked in-process for an authoritative wall-clock search deadline. Turnkey clrsrc bot. combined work (see below)

Both are portable builds (no target-cpu=native); they run on any x86-64 CPU.

Running

  1. Copy config.yml.exampleconfig.yml and set your Lichess bot:play token.
  2. liru-bot.exe: point engine: at your UCI engine.
    liru-bot-clrsrc.exe: no external engine needed — supply clrsrc.nnue
    (clrsrc_v32_seed_b.nnue, from the clrsrc v1.1.0 release)
    via EvalFile.
  3. liru-bot.exe --config config.yml

License / Corresponding Source (AGPL §6 / §13)

LiRu-Bot is AGPL-3.0-or-later, a modified derivative of lichess-bot
(© lichess-bot-devs and contributors). The default liru-bot.exe is a pure
AGPL-3.0 artifact; its Corresponding Source is this repository at tag v0.1.0.

liru-bot-clrsrc.exe is a combined work (AGPLv3 §13 / GPLv3 §13): LiRu-Bot
(AGPL-3.0) + clrsrc (GPL-3.0). Each part keeps its own license. Corresponding
Source for this binary is both:

Operating the embedded binary as a network service triggers the AGPL §13
obligation to offer the Corresponding Source of the whole to its users.

Credits

Derived from lichess-bot by
the lichess-bot-devs and contributors (AGPL-3.0). Embedded engine:
clrsrc (GPL-3.0).