feat: live framed search dashboard for a terminal

The terminal output is now a framed dashboard that is redrawn in place
ten times a second instead of a growing list of lines:

- the root position as a coloured board, with the best move's squares
  highlighted;
- the score, white's expected score as an evaluation bar, depth, playouts,
  speed, time with a progress bar (time or playout limit), tree fill and
  notes on tree reuse and collections;
- the principal variation in SAN with move numbers, wrapped and fading
  with depth;
- the most visited root moves (SAN) with a bar for their share of the
  visits, score and prior;
- a spinner while searching, "done" at the end, and bestmove in SAN.

Each frame moves the cursor back to the top of the previous one and
clears below it; lines the user typed under the dashboard (e.g. stop)
are counted and drawn over. The box adapts to the terminal's width and
height (fewer root moves, then no blank lines, the board only when it
fits). RIGBY_PRETTY=1 forces the dashboard into a pipe.

Checked: UCI output is unchanged (node-limited searches identical to
main, including tree reuse and a stalemate root; time-limited ones
differ only in node counts); go wtime, go infinite + stop and quit
work; the dashboard was driven in a real console, including the redraw,
a reused tree and the switch to UCI, and its colours were checked
rendered to HTML. Search is untouched, so the bench is unchanged.

Bench: 546018

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rektdieandclaude committed 2026-11-15 14:30:47 +01:00
1 parent 31a35fd84f
commit c859163e2c
6 files changed
+606 -181

No files matched your search

+10 -6
View File
@@ -60,12 +60,16 @@ Extra commands:
`go depth N` limits the mean playout depth. `nodes` in `info` lines are playouts.
Started from a terminal, Rigby prints its search for a human instead: coloured
progress lines (depth, playouts, speed, tree fill, score, PV) and, at the end, the
most visited root moves with their share of the visits, score and prior. The first
`uci` command switches to plain UCI output for good; GUIs and match runners send it
first and read stdout through a pipe, so they never see the coloured output.
`NO_COLOR` turns it off.
Started from a terminal, Rigby shows its search for a human instead: a framed
dashboard, redrawn in place ten times a second, with the board (the best move
highlighted), the score and an evaluation bar, depth, playouts, speed, a time bar,
tree fill, the principal variation in SAN and the most visited root moves with
their share of the visits, score and prior. It adapts to the terminal's size. The
first `uci` command switches to plain UCI output for good; GUIs and match runners
send it first and read stdout through a pipe, so they never see it. `NO_COLOR`
turns it off, `RIGBY_PRETTY=1` forces it into a pipe (e.g. `less -R`). It needs a
terminal with 24-bit colour and UTF-8 (Windows Terminal, any modern Linux/macOS
terminal).
### Options