feat: coloured search output for a terminal
Started from a terminal, Rigby now shows its search for a human: coloured progress lines (depth/seldepth, playouts, speed, time, a tree fill bar, score in pawns, the PV fading with depth) at 125, 250, 500 ms and then every second, and at the end a table of the most visited root moves with a bar for their share of the visits, their score and prior. Tree reuse and collections are shown as notes, and bestmove is highlighted. 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. On Windows the console gets ANSI processing and UTF-8 output. Checked: the UCI output of a scripted session (two searches with tree reuse, a stalemate root) is identical to main apart from nps and time; go wtime, go infinite with stop, and quit work; the pretty mode was driven in a real console, including the switch to UCI. 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:
1 parent
1754753a6e
commit
6490286852
6 files changed
+319
-17
No files matched your search
@@ -60,6 +60,13 @@ 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.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Meaning |
|
||||
|
||||
Reference in new issue
Block a user