# VeryChess 0.3.0

**Released:** 29 July 2026
**Previous release:** 0.2.0

This release covers two areas: **search efficiency** and **time management**. 

The late move reduction (LMR) scheme — the heuristic that decides how much cheaper to search moves that are unlikely to be best — has been rebuilt from a crude fixed cap into a proper depth- and move-number-scaled formula, with history and principal-variation awareness. The engine now reaches noticeably greater depth in the same amount of time.

The second area is how the engine spends its clock. Previously it burned most of its time in the opening and middlegame and was left playing on the increment by around move 25–30 — occasionally losing games on time outright. Time allocation has been reworked so the clock now lasts the whole game, and the previously dead `Move Overhead` option is now actually honored.

There are no changes to board representation, move generation, or evaluation in this release.

---

## What's new

### Rebuilt late move reductions

Previously, late quiet moves were reduced by a flat 1–2 plies regardless of how deep the search was or how late the move appeared. That cap wasted most of the available savings at higher depths. It has been replaced with a precomputed reduction table indexed by depth and move number.

The reduction now grows smoothly with both depth and move number — reaching 4–6 plies deep in the tree, where the savings compound — instead of stopping at 2.

Two refinements sit on top of the table:

- **History-aware reductions.** Quiet moves with a strong history score are reduced one ply less. Measurement showed these moves are systematically undervalued by reduction: moves that had to be re-searched carried a median history score roughly two orders of magnitude above a typical reduced move.
- **Principal-variation reductions.** LMR now applies inside PV nodes as well, but cautiously: reductions there are one ply smaller than in non-PV nodes, and the first five legal moves of a PV node are never reduced at all. The first move of every PV node is still searched at full depth in a full window.

Move searching was restructured into a three-level re-search pattern — reduced null-window, then full-depth null-window, then a full-window search in PV nodes — so that a reduced move which looks promising is re-verified cheaply before the engine pays for an exact score. Behavior in non-PV nodes is unchanged by the PV work.

### Reworked time management

The engine was exhausting its clock far too early. The root cause was that the "soft" time limit was never actually a spending cap — it only decided whether to *start* another search iteration. Because each iteration roughly doubles the time of the previous one, the real spend per move came out at one-and-a-half to four times the intended budget, draining the clock by the middlegame.

Three changes fix this:

- **Iteration-completion prediction.** The engine now starts a new deepening iteration only when it predicts it can finish it within the budget, rather than starting one whenever any time remains. This is the core fix: it turns the soft limit into a real per-move budget. On its own it eliminated the clock collapse — median time remaining at the engine's 40th move rose from under a second to over a minute (of a three-minute clock).
- **More realistic game-length assumption.** When the GUI does not say how many moves remain until the next time control, the engine now assumes 50 rather than 30, matching measured game lengths and making early moves less expensive.
- **`Move Overhead` is now functional.** The option was previously declared but never applied. The engine now subtracts the configured reserve (default 10 ms) from its available time so a move reliably reaches the GUI or arbiter before the flag falls. The reserve is deducted once from the remaining time, not per move, so even a large setting costs almost no thinking depth.

### A threading robustness fix

A latent race in the worker-thread startup could, in rare timing, cause the engine to accept a `go` command and then never reply — no `info`, no `bestmove` — while the UCI loop itself stayed responsive. It required a `go` to arrive within microseconds of the engine process starting, so ordinary GUIs (which perform a full handshake first) never triggered it, but automated tooling that streams commands in one burst could. The worker now finishes parking before the constructor returns, closing the window.

### Full principal variation in `info` output

`info` lines now report the complete principal variation rather than only the best move. The line is reconstructed from the transposition table between iterations on the main thread, off the search hot path, so it costs no search speed. Occasionally the reported line is shorter than the search depth, when transposition table entries have been overwritten — this is cosmetic and does not affect play.

### New `benchsearch` command

A new subcommand, available both from the command line and as a UCI debug command: "verychess benchsearch 11"

It runs a deterministic, single-threaded, fixed-depth search over a fixed set of positions, clearing the transposition table before each one, and prints `bestmove`, `score`, `nodes`, `qnodes`, `time`, `nps`, and `pv` per position plus a totals line. Because it is fully deterministic, its `bestmove + score + nodes` signature is a cheap way to compare two builds of the engine and catch unintended changes in search behavior.

This is distinct from the existing `bench` command, which measures perft (move generation) speed only.

---

## Strength

Every change to the reduction scheme was gated by a sequential probability ratio test (SPRT) against the build immediately preceding it, played at 10s + 0.1s and 120s + 2s with paired openings, one thread, and a 64 MB hash. Measured directly against 0.2.0.


---

## Downloads and license

Native binaries are provided for macOS (Apple Silicon and Intel), Linux x86_64,
and Windows x86_64. No installer, no runtime dependencies — a single executable.

VeryChess is **freeware**: free to use and free to share unmodified, but it is
not open source. See `LICENSE.txt` in the release package for the binding terms,
and `readme.txt` for a user-facing summary.

Website: https://verychess.org · Contact: terrytet.chess@gmail.com
