On WebAssembly the engine is a Web Worker: a line of UCI is one message each
way, the protocol machine is driven by the worker's messages and by timers set
for its deadlines; the handshake does not block (Engine::start_worker gives a
Starting, polled until readyok). EngineHandle has the same methods as the
process one, minus those that block or name a process. Option and search
checks are shared by both transports.
tests/worker.rs runs the worker transport against a fake engine in JavaScript
in headless Firefox (apps/web/check/uci-worker.mjs: wasm-bindgen-test-runner
serves, a WebDriver BiDi client reads the outcome): handshake, analysis and
stop, coalescing of rapid requests without mixing output, an engine hung on
stop, a crash, and every handshake failure. 5 of 5 pass.
game-review: the job in engine processes (run and its workers) moves to
job/engines.rs, built where there are processes. .cargo/config.toml: the
getrandom backend of WebAssembly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preparing against an opponent (openings), one fixed engine search for the game
review everywhere, !! and ! recalibrated on chess.com (check set of 15 games),
100 classic sample games that update with the program. Formatting by cargo fmt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tester's findings: the stale analysis offered «Дополнить» (fill in) though
it recomputes everything - it now says «Обновить» in 9 languages; and an engine
run over evaluations read from the PGN no longer keeps them under the fixed
search's name - it analyses the whole game.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At every start a sample's file that is not the text built into the program
(an older version, damaged or edited outside) is replaced atomically, under
its name in any language; a sample taken off the shelf stays off. Android
reads the samples from the app's assets: the number of games on a row is
taken again when the sample's SHA-256 is not the one it was counted from.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every position of a game analysis (and of the opening errors) is searched by
ChessPenguin's Stockfish 19 to 1M nodes with one thread, a 32 MB hash and
ucinewgame before each search, so the evaluations depend on the position
alone: the same marks on every computer and phone, whatever the number of
engine processes (one per CPU, at most 8 on a computer and 4 on a phone, and
what the free memory holds) or the order of the positions.
- ReviewMeta.search: analyses of another search are stale; shown, but
Update makes them all again. The prep caches drop such evaluations.
- Desktop: no launch dialog (engine, quality, threads, memory are gone);
Analyse starts at once, its tooltip gives the time; the prep dialog keeps
the colour. Without the own Stockfish the download is offered.
- settings.review and prep.quality removed; old settings files still read.
- fake_uci --hash-memory; tests of determinism on processes and order.
- chesscom_check in the fixed search (CP_REVIEW_NODES for experiments);
review_bench example for times and determinism on a real engine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repertoire starts with its roots folded (no automatic expansion, after a
rebuild, a colour or a depth either); the user opens what he wants.
A click on a column's header orders the table by it, a second click turns the
order round, ⏶/⏷ beside the title as in the library's game table (the header
button is now `widgets::sort_header`, shared with it): the games list (all
columns), the openings (families, and the variations inside each, by name,
ECO, games, %, score, last game, errors), the errors tab (repeated errors by
move, ×, score, opening; «By opening» by games and errors) and the repertoire
(the moves of every position by games, %, score, last game; games first by
default). Each table's order is kept in `settings.prep.sorts`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core: the most precise opening name stays down a line (a deeper position the
table names more generally, «Sicilian Defense» after 3.d4, does not take it
back), in the games' names and in the tree; one name per position across move
orders; the games and the last date of a position over all its move orders;
`evaluated()` (evaluations from the cache count). Report version 3.
Screen: errors judged from cached evaluations show without a run; «Checked N of
M positions · Continue» after «Stop» or a new depth; the report shows the book
only when it was computed with the chosen one; the dialog keeps the remembered
book and the same player reopens with the dialog's colour and book; «Deeper»
and the depth list share one path (setting kept, report from the cache); a
chosen error survives re-judging during the run; quitting during the run asks
first; Ctrl+W returns from a game opened from the report; a game opened at an
error opens after the move, a repeated error at its newest game.
Design (§12): the summary as a grid whose columns give way, counts in the
colours of the signs; result bars without numbers, faint over few games; move
lines numbered at White's moves; whole-move first-move lines; colour icons in
the openings table; ECO kept beside the name; the errors tab as one table with
row selection and keys (↑/↓/→/←/Enter); colour lines there only in the stack;
«Inaccuracies» switch (kept in settings) for the tab, the summary, the tree and
the games; «▾» at the right end; one colour order; the depth caption by the
room left; names first in narrow game lists; two-row games minimum in a low
window; the caption beside the stacked board; «others (N)» when narrow.
Designer's review recorded in docs/design/opponent-prep.md §12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The «Prepare against…» entry points in the library (the filter panel's button
when a player is set, the game row's context menu, Ctrl+Shift+P), the dialog
(database, the player's spellings with the similar names apart, colour, book)
and the report screen in the stack between the library and the game: the
repertoire tree with transpositions, opening names, scores and the book
column, the openings table by family and variation, the errors tab (repeated
errors and by opening), the board of the chosen position with the line under
it, and the games of the selection, which open in the game screen at that move
with «⬅ Back to preparation».
The engine run reuses the game analysis job over the distinct opening
positions of the chosen colour: the launch dialog shares the engine picker and
the quality/threads/memory grid with review.rs (quality «Fast» by default, its
own setting), marks appear as positions are evaluated, «Stop» keeps what was
done, the evaluations and the report are cached under <cache>/prep. One engine
job per program: game analysis and the live engine are blocked meanwhile.
Core: targets and counts by colour (`targets_for`, `missing_for`), the book
step keeps its per-position counts (`book_counts`) for the tree column.
Narrow windows: the board stacks over the lists under 804 px and folds into a
button under 720 px of height; the right column is split explicitly (a nested
bottom panel is not reserved from the content above it in egui).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Name queries: the full stop of an initial separates words too, so
"Carlsen, M." and "Вафин Р." find the full names (suggestions and
filters alike).
- `Database::main_line(index, plies)`: the first moves of a game's main
line; a ChessBase game is decoded without its tree (microseconds), a
PGN game is parsed. `Database::player_name(id)` for both kinds.
- `position::theory_end`: the linear/doubling/halving search for where
a line leaves a database, taken out of the reference panel's
`book_end` so another caller can use it; the panel calls it.
- game-review opens `judge` and `terminal_eval`; `Judgement` is serde.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
At the start and on coming back after ten minutes or more, every database
downloaded from Lichess and Chess.com fetches the games played since, one after
another (the sites ask for one export at a time), on the desktop and on Android.
Only new games are told.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For one frame after each move the panel had no lines (the old ones gone, the
new not yet come) and was 42 px shorter: the notation below jumped up and back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The designer compared JetBrains Mono: in a monospace face !! and ?? fall apart
and O-O-O reads as 0-0-0; the Ubuntu family stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ubuntu Medium and Bold (Ubuntu Font Family 0.83, official release, UFL 1.0)
for the notation's moves and the board's marks on the desktop; heavier weights
on Android.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first rules stay beside the calibrated ones, selectable through
game_review::Rules, to compare them on annotated games and to go back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sacrifice is a piece the move itself gives up; every move of a combination
is marked; a piece saving itself on the only good square and the only good
move of an equal position can be great. 7 of chess.com's 8 marks agree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
!! #26C2A3, ! #81B64C, ?! #F7C631, ? #FFA459, ?? #FA412D (from the owner's
reference); darker variants for text in the light theme; the judgement colors
now come from the NAG colors, and the accuracy follows them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As on Lichess: «Qg7??» in red instead of a pill at the cell's edge, on the
desktop and on Android; the author's own sign stands instead when there is one.
!! and ! get no block under the move (the reason line was more than needed).
Task 18: a shorter draw-offer button.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sound piece sacrifice is !!, the only good move that turns the game is !,
by the rules of docs/research/brilliant-moves.md. Sacrifices come from a static
exchange count over the board (features.rs); the best other move comes from a
second engine search (searchmoves) only where the move played was the engine's
best and could be either. The marks go wherever errors go: report, notation,
graph, board badge, and into the PGN as $3/$1 unless the author's sign is there.
An older analysis is filled in by Update without evaluating it again.
The Android board now draws the move's mark in the corner of its square, as the
desktop does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each request waited for the model's full default thinking, and the batches of a
long game went one after another. A model that rejects the effort is asked again
without it; the first error still stops the job.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cards said «not loaded» for databases not opened yet; a background thread now
counts them one by one and remembers the counts by file size and time. The play
dialog's strength follows the slider's handle. The game buttons are of one height,
navigation on one row and the game's actions on the next.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
During a game against the computer the header's chip shows its control («5+3»,
«∞») where the result comes after it. The players' cards show the king of the
board's piece set instead of ♔/♚, the state line under the name. The player's
clock turning red is heard once a game: a double tick made of Kenney's
tick_004 (CC0), every sound set; a game put aside with the time already low
goes on without it. «The game is on» says which game: «Maia 1550 · you play
white · 5+3 · move 5», as the card of a game put aside. Reviewed by the
designer and the tester.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS: Rodent IV from rodent-iv-0.33-3, built with its home folder (it found
none of its personalities, so no game against it started).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On macOS (Apple silicon) Rodent IV build 2, downloaded over the 1.7 build, was killed
at its first start: the kernel keeps the signature of an executable that once ran, and
the file had been rewritten in place. The owner's Mac ran the same build fine from a
fresh file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner's choice: in rapid, classical and games without a clock «↶ Take back» is not
offered, and Ctrl+Z does nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macOS build of rodent-iv-0.33 (clang) searched garbage out of its book; the Linux
and Windows builds (GCC) stay. Each platform pins its release; an install from another
release is offered again, and files that did not change are kept, not fetched again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The play sheet chooses Maia or Rodent IV, and Rodent's character in a full-screen
list (docs/design/android-rodent.md, docs/decisions.md «Rodent IV на телефоне»).
The engine is built from its authors' sources by androidApp/scripts/rodent4.sh
(patches: no wordexp.h on bionic; the search thread took its parameter by reference,
which clang builds read after it was gone) and ships in both APKs; the opening books
are one checked download. Rodent's tables, its book manifest and its opponent loop
move from the desktop into crates/play, shared by both apps; uci's EngineConfig takes
an environment (RODENT4HOME).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
«⏸ Put aside» in the game, the main answer of «The game is on» and closing the
window put the game aside: its journal stays, with what it is played with and
the side to move's time. A card on the library's shelf (a strip in a folded
shelf) continues it with the clocks where they stopped; a crash leaves a game
put aside too (said once). A new game over it asks first; letting it go writes
it unfinished into the player's database, and a failed write keeps it.
A missing opponent is downloaded before it goes on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner's window froze for about a minute when the network dropped during a
game; its main thread waited in rpc_wait_bit_killable: an NFS mount (hard)
holding a database of the shelf. While a game is shown the reference tab's list
checked every shelf file's existence each frame, and the library asked sizes,
permissions and existence the same way. file_state.rs: a thread of its own looks
at the files the screen asks about every 3 s; the screen reads what it last
found (a file not looked at yet counts as there). The first database at start
is read in the background without a check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Downloaded through the dialog end to end: the engine from our release, the
personalities and books from the authors' repository, the misnamed books
copied, the game against Rodent IV 2000 (Petrosian) started.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner: «заюзаем rodent 4 со всеми его стилями». One opponent «Rodent»:
its list gets Rodent IV's 13 characters and 22 players (sorted by their names
as shown, the Tals side by side); the engine follows the style (Rodent IV's
UCI_Elo 800–2800), «Rodent IV 2000 (Petrosian)» in the record. Texts say
«Rodent» where they said «Rodent V».
Rodent IV's authors publish no builds for Linux and Windows: the workflow
rodent-iv.yml builds it from their sources at a pinned commit (with one fix,
packaging/rodent-iv/home-dir.patch: on Linux it now and then took a wrong home
folder and played without its personality) into a pre-release that is never
«latest». The app downloads that build and the personalities and books from
the authors' repository at the same commit (scripts/rodent4-manifest.py →
rodent4_files.rs), each checked; three misnamed books get a copy under the
name their personality reads. Until the build's sums are written in, Rodent
IV's styles are not shown.
Reviewed (tester and designer in one) with a local build (CP_RODENT4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner: these are the engines' own ratings, «без поля эло, просто
число» — «Maia 1550», «Rodent V 2400 (Tal)»; the player's own rating keeps
its Elo tag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner's decision: no conversion by our measurements. Maia plays the rating
on the slider (temperature 1, the large model when it is there, else the small
one), Rodent V its UCI_Elo; under the slider: these are the engines' own
ratings, not a person's Elo. No automatic switch past Maia's top; changing the
engine brings the strength into its range. Styles without strength ranges.
The journal test waits out a lock held for a moment by another test's child
process (it gets the parent's files until it runs its program).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/research/player-games-db.md, docs/design/player-games.md, decisions
«Партии игрока записываются сами» (desktop; Android next):
- «Roman — games against the computer» (without a name, «Games against the
computer»), made at the first game in the folder of new databases; only
new records are appended.
- During a game a journal after every move (a lock held while the program
runs); a crash leaves it to the next start, which writes the game once,
unfinished. A failed write keeps the journal until the game is saved
elsewhere or left.
- The play dialog says where the games go (wraps under the name), a ▾ list of
the computer's players with their ratings (↓/↑ in the field); a toast when
the database is made; the result strip «Written to the database, No. n ·
Open» instead of «Save to a database…»; the leave question names it.
- ♞ on the player's card and in the folded shelf; a checkbox in Settings →
Interface → Your databases (on).
Checked by the tester (crash, failed write, two instances, names, files of
the same name) and the designer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One scale for every choice (1100–3000); the thumb stops at the style's top.
Under the track Maia's zone and Rodent's with the style chosen, the chosen
one lit.
- Each style shows its strengths in the list and under it; a word under the
slider goes when the strength or the style changes.
- Enter plays only when no control has the focus and no list is open.
- The style list as tall as the buttons; «Balanced», «Tal», «Tal (network)»
without a repeated name.
- The bar: Rodent's style on the second line; in a narrow panel the clock's
digits get smaller before the name is cut, the same on both bars.
- Style tables from 2400 games (800/1600/2400/3000): research/rodent.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The styles play weaker than the balanced Rodent at the same UCI_Elo (by 115
to 680 Elo: Tal and Hector the most), measured at two settings so far. Each
style has its range (Tal ≈1850–2650, Balanced 2250–3000); the slider's top
follows the style and a style change keeps the strength inside its range,
saying so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The slider no longer flips between Maia and Rodent while dragged through the
gap between them (2100–2250): Rodent stays, at his lowest.
- The result strip names Rodent in his games («Left: you … · Rodent V …»).
- The opponent's name in the side panel stays on one line (cut, whole on hover).
- Remembered settings outside the opponent's range are brought into it.
- Changing the opponent cancels «Download and play» for the other one.
- A Rodent folder counts as installed only with nets and books and a mark
written after it started (a cut-short unpacking is downloaded again).
- «Did not start» in words, the details to the log; toolbar and move-menu
tooltips name the computer, not only Maia; 48 MB, not 49.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bottom of the chain is now tied to the Maia-1 bots and Maia-3 levels
(6300 games): the table moves up; between Maia's 2100 and Rodent's 2250 nobody
plays and the slider passes over it, saying so. research/rodent.md: the
measurement.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dialog (docs/design/rodent-opponent.md): «Maia · Rodent V» tiles, one
strength slider for both (Maia's zone marked; past it Rodent is chosen at
once), Rodent's style (Balanced, Attacking, Chaotic, Restricting, Classical,
Tal, Tal (network)) always in its place, greyed for Maia. Rodent V 1.2 (the
authors' release, pinned SHA-256) is downloaded and unpacked with its
personalities, nets and books; it plays through UCI at UCI_Elo from the
measured table (provisional until the measurement ends), with its book,
after Maia's human pause. Its own texts where Russian makes Maia «she» and
Rodent «he». The download helper is shared with Stockfish's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared rule (play::accepts_draw): she accepts when clearly worse or mated,
or when about level (at most +0.2 for her) and her last three scores agree
within 0.3; after a refusal, again two of her moves later. Her judge keeps the
scores of her turns. Desktop: «½ Offer a draw» beside «Resign»; Android: a
«Draw» button in the game's bar (labels may take two lines).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
How a game ends, Maia's pause and her resignation judged by an engine move
from the desktop's play.rs into crates/play; the judge wakes the app through a
callback and takes engine options (Android's EvalFile). The desktop uses it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The measured tables (strength → rating input, temperature) and the choice of
Maia's move (rare moves dropped) move from the desktop's play.rs into the maia
crate; the desktop plays by them. Android: «Learn the opening up to this
move» in the move sheet opens the trainer over the game (tasks bar, wrong
move lit for 400 ms, «Show the move» after three mistakes, the result card).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>