Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/scripts/test-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ $required = @(
'TestAnalyzeInputsDescribeTheSameRecordEntry',
'TestAnalyzeTerminalAndUnsearchedResultsAreExplicit',
'TestAnalyzeRefusalsDoNotWriteState',
'TestAnalyzeDoesNotRedirectAnUnreadableExactGame'
'TestAnalyzeDoesNotRedirectAnUnreadableExactGame',
'TestPlayNowCutsAMaxSearchShort'
)
$missing = @($required | Where-Object { -not $passes.ContainsKey($_) })
$missingStorage = @()
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,12 @@ jobs:
# search enough to change what they measure: on a 24x24 board at the
# measurement budgets the depths reached fall from beginner 1, intermediate 3,
# pro 4 to 1, 2 and 2, so the tiers stop being distinguishable and a strength
# number produced under the detector is not the engine's. The Unix terminal
# harness delegates its PTY to tmux; the concurrent ConPTY implementation is
# covered separately by the native Windows amd64 race job below.
# number produced under the detector is not the engine's. The progress tests
# are the exception and run under it by name: they measure no strength, and
# their subject is a snapshot read from another goroutine while a search
# publishes it. The Unix terminal harness delegates its PTY to tmux; the
# concurrent ConPTY implementation is covered separately by the native
# Windows amd64 race job below.
race:
runs-on: ubuntu-latest
steps:
Expand All @@ -219,6 +222,7 @@ jobs:
run: |
go test -race -count=1 ./internal/netplay/ ./internal/app/ ./internal/cli/ \
./internal/leaderboard/ ./internal/profile/
go test -race -count=1 -run '^TestProgress' ./internal/bot/

# Native Windows executes the same product scenarios through ConPTY. The
# script fails if any terminal test skips or if its positive controls did
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- A live line while the bot thinks: time since its search began, then the
deepest completed iteration and its node count. Only completed work of the
search behind the coming move is shown, and it is read without waiting for
the search. In a terminal too small for the panel, the status line leads
with `esc play now` and the time and completed depth.
- `esc` while the bot is searching plays now, exactly once: the bot makes its
tier's ordinary choice from the work it has finished — the ranking of its
last completed iteration, or its move ordering before one — and the
announcement names the completed depth. The beginner tier still picks among
its near-best candidates. Leaving still discards the search.
- `i` in a bot game shows the figures of the search behind the bot's last
move: completed depth, nodes and time in all, and stop reason. A status line
too narrow for all of them gives up whole items, the stop reason before the
time and the nodes, and always keeps the move and its completed depth.

### Fixed

- A search left running by a finished bot game can no longer have its move
played in the rematch.

## [0.7.0] - 2026-09-12

### Added
Expand Down
34 changes: 33 additions & 1 deletion docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,10 @@ none of those.
| `enter` | Places the peg when none is staged yet, and commits the turn once one is. |
| `x` | Enter or leave link mode. |
| `1`-`8` | Only in link mode: toggle the link in that direction. |
| `esc` | Leave link mode. |
| `esc` | Leave link mode. Otherwise, while a bot is searching for its move: play now, with the search it has finished. |
| `a` | Abort the turn: the board goes back to how it stood when your turn began. |
| `?` | In a bot game: the move the bot would play, and why. |
| `i` | In a bot game: the figures of the search behind the bot's last move. Offered once the bot has moved, and not while it is searching. |
| `s` | Take the swap option, while it is on offer. |
| `d` | Offer a draw, or accept the one on offer. |
| `r` | Resign. |
Expand Down Expand Up @@ -530,6 +531,37 @@ recursive nodes, all position analyses including tactical probes, completed
depth, elapsed search time and the actual stop reason. Nodes and analyses are
different quantities; neither is an MCTS simulation count.

While the bot searches, the panel's thinking line shows how long it has been at
it and, once its first iteration has finished, the deepest iteration it has
completed and the nodes that work took. Those two figures are completed work
only: they hold still while an iteration is in progress, and before the first
one finishes the line shows the time alone. In a terminal too small for the
panel, the status line leads with `esc play now` and a short form of the same
line — the time and the completed depth, as in `2.4s d4`, or the depth alone
when the two do not fit — ahead of whose turn it is. Press `esc` to have the
bot play now. The search stops and the bot makes its tier's ordinary choice
from the work it has finished: from the moves as its last completed iteration
scored them or, if none had finished, as its ordering heuristic ranks them. The
beginner tier still picks among its near-best candidates, as it does on every
move; the other tiers play the move that ranking puts first. The line
announcing the move says it was played early and at what completed depth. The
move is played once, like any other. Leaving the game still discards a search
in progress, and a rematch never plays a move from, or shows the progress of,
a search the previous game left running. Once the bot has moved, `i` shows
that search's figures as `bot.StatsOf` reports them: the depth it completed,
its nodes and time in all, and why it stopped — out of time, stopped by play
now, and so on.
The nodes in all include work on an iteration the search did not finish, so
they can be more than the thinking line last showed beside the same depth. A
search that stopped because it found a winning line has found one among the
moves it searched, which is not a proof. A full principal variation is not
shown. Where the status line is too narrow for the whole sentence, it gives up
whole items rather than cutting one: the opening words first, then why the
search stopped, then the long wording of the depth, which becomes `d4`, then
the time and the nodes. The move and its completed depth always show, at the
least as `E3: d4`, and nodes or time, wherever they show, are still given as in
all.

Asking for a hint runs the same search with the highest-effort settings the package
has, whichever tier you are playing, and gives you the move it would play, a line on
why, and the holes that reason is about, marked on the board. It keeps a two-second
Expand Down
Loading
Loading