EngineLocation: an engine starts from its program on a computer, from the
address of its Web Worker's script in a browser; analysis, the review job,
the judge and the settings take it instead of a path.
platform::page: a game on the screen is an entry of the browser's history,
so Back is «← Library» (with the same questions); unsaved changes or a
running review make the browser ask before the page is left. The draft of an
unsaved game is written every 5 s while it has changes and offered at the
next start (Open / Delete); a saved or left game takes it away.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
game-review: what the job does for one target (the full search, the second
best without the move played, the shallow ones) becomes a machine without I/O
(job/work.rs), driven by the engine processes on a computer (job/engines.rs,
the same searches as before) and by Web Workers in a browser
(job/workers.rs: a dispatcher polled from the frames, never blocking). The
analysis cache goes through a CacheStore (a folder, or the program's files of
the platform).
The browser's engine: Stockfish.js 19.0.1 (npm stockfish, GPL-3.0), its
single-threaded build served beside /app/ (engine/, build.sh checks the
package's sha512), its 99 MB wasm downloaded only through the engine offer,
checked against its SHA-256 and kept in Cache Storage; workers get it as a
blob: address. Live analysis (lines, arrows, the bar) and the review run on it;
the review uses one worker per logical CPU, at most 8.
My games (the web version): a PGN in the browser's storage, always on the
shelf; Ctrl+S puts a game there (its own record, or a new one); deleting with
undo. chess-core's store gives the bytes of append/replace/remove/restore, so
the platform writes them into the browser's files; on a computer the files
are written as before. Settings: Browser data (used and free space, keeping
the data for good, Download all as PGN, deleting the engine).
Files: a file of the last visit offers Choose the file again; Keep a copy in
the browser (refused with the room it needs when the browser gives too
little); files over 1 GB are not opened, with a word on why. No reference tab
and no search by position in the web version. Keys: Alt+Left, plain 1-6,
Ctrl+C, N in the library (the browser keeps Ctrl+W/N/1-6/Shift+C).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The site serves precompressed copies next to its files (the program is 19 MB,
6.3 MB in Brotli); the built program goes to website/static/app (ignored by git,
taken into the image); the device page's screenshots by the site's own paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apps/desktop becomes a library (chesspenguin_app: the interface) and a thin
binary; apps/web starts the same interface in a page's canvas (eframe's
WebRunner). cfg(web) (build.rs) marks WebAssembly in a browser.
The platform layer (apps/desktop/src/platform): the program's folders, files,
background work, the files the user opens or saves, the clipboard and what
the platform offers (CAPS). On a computer it is the system as before; in a
browser the program's data lives in IndexedDB behind an in-memory file tree
loaded before the start, the files the user opens are read into it for the
session (only read), background jobs run on the page's thread after the
frame, the clipboard is read through the browser's API, sounds play through
audio elements, a game is saved as a download.
What a browser does not have is not built for it: updates, the online games
window and its probe, engine processes (analysis starts a Web Worker there;
the review and preparation jobs, Rodent and the judge are native), blocking
requests (engine, Maia and Rodent downloads report no download for the
platform, translation reports that it makes no requests). The desktop
program behaves as before; its build finds unused code (the web build
compiles parts it never shows).
apps/web: the entry point, the page /app/ (device check before anything large
is loaded: phones and tablets get the page about the apps in the site's nine
languages, keys app_* in website/site/i18n), build.sh (wasm-bindgen, profile
web), a static server and headless Firefox checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>