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>
trainer keeps its deadline in web_time::Instant (std's panics in a browser; on a
computer it is std's). play: the Judge type is on every target, only starting
it (an engine process) is native. chess-import: files are closed by the end of
their block before a rename instead of drop(), which a browser's File (no
destructor) makes a lint there. rustfmt of the earlier changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
online-games: the network part (lookups, probes, downloads into the database,
with their tests) moves to net.rs, built where a request may block a thread;
ureq is a dependency there only. The names, paths and states of the online
databases stay for every target.
play: the engines that play (Rodent) or judge (Maia's resignations) run as
processes driven from threads: not built for WebAssembly. getrandom has its
browser backend there.
prep: analyse (the job in engine processes) is native.
Nothing changes on the computer or Android; the tests pass as before.
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>
The handshake and the session after it move to uci::protocol: lines, commands
and the time go in, lines to write and events come out, deadlines are named
instead of waited for. The child process with its reader and supervisor
threads is now one transport of it (process.rs, not built for WebAssembly).
Behaviour on the computer and Android is unchanged; the fake engine tests pass
as before, and the machine has its own tests.
chess-import: the parallel passes (booster, position search, opening tallies)
go through parallel::map, which runs a single worker on the calling thread;
on WebAssembly there is one worker (std threads panic there). read_at and
write_all_at have a portable form through the file cursor for targets other
than Unix and Windows. The bench command is not built for WebAssembly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
90.Ra4+ of the owner's son's game, a skewer, is a textbook blow - the owner
calls it plain. The checks of a mating attack stay (22.Bf5+, 23.Bd7+ of the
Evergreen game). ChessCom rules only; the son's game now lists Ra4+ among the
owner's plain moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brilliant moves for a hard only move a shallow search misses; surer great moves
(no ! for a quiet step away or the king out of check). Formatting by cargo fmt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three of our ! chess.com did not give (23.Kd3, 20...Ka7, 32.Kd2) and three it
did (22.Ke3, 25...Kb6, 20.Ke2) go; the owner counts the move plain. Our ! are now
chess.com's 27 times of 28. ChessCom rules only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shallow search (5 000 nodes) is on: the only good move (10 % ahead) that a
shallow search ranks 30 % lower is !! even without a sacrifice - 17...Be6!! of
Byrne - Fischer and 33.c3+!! of Kasparov - Topalov; !! of chess.com found 35 of 39
(was 32), 95 % of ours right, no wrong one added. Not used for ! (it would take
nearly every ! away). The owner's two games with 10.Be2 and Ra7, which he calls
plain, join the set with an OwnerPlain tag the checker enforces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a move that could be brilliant or great and was the engine's best, an
optional shallow search (same fixed search, go nodes SHALLOW_NODES = 5000)
keeps its best move and evaluation and the move played at that depth
(PosEval.shallow, serde default; SEARCH_VERSION unchanged). Ply.difficulty
says how much the shallow search underrates the move (Measure::Choice:
against its own best move; Measure::Depth: against the deep search).
Hardness (report.rs) says how the difficulty counts in !! and ! of the
ChessCom rules: ! only for hard moves, gaps, the capture/quiet-retreat bans,
!! for a very hard only move. The default changes nothing and makes no
shallow search; rules that use it fill old analyses in like the second
search (seconds_missing). chesscom_check takes CP_SHALLOW_NODES and the
rule parameters for experiments; review_bench CP_SHALLOW_NODES. fake_uci
learns --searchmoves and --shallow for the job test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10.Be2 of the owner's online game (the bishop on d3 under c4, the only square
that keeps f3) was ! - plain, the owner says. A step away with check can still be
great (19...Ne2+, 23.Bd7+ are chess.com's !). ChessCom rules only; 13.Qa4! of the
Evergreen game is given up for it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 requests for one APK within a minute from one Windows browser made 18
downloads out of two people. Repeats are now kind 'repeat' (out of the counts,
as they were out of the notices); rows from before are marked at start.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opponent preparation, !! and ! in the game review, the reference tab, search by
position, 100 classic games and the Android app (no longer alpha); the gallery
takes the current English screenshots of the website plus the opponent
preparation. AppStream's default screenshot follows the new file.
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>
62 famous games added as plain records, from the free player files of
pgnmentor.com, most checked move by move against Wikipedia; two with sources
that disagree were left out. Byrne - Fischer 1956 now has the move order of the
sources (same final position). The new file replaces the old sample on update.
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>
Prediction made before the answer: !! 2 of 3 (10.Nxb5 missed), no wrong mark.
Tried and dropped: a sacrifice from a 1-point net loss (finds 10.Nxb5!! and
22...Rxh3!!, but adds false !! on 22.Nd5 and 17...Rxc3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner wants !! near 100 % and fewer, surer !. Sweeping the thresholds on
the check set, wrong ! came mostly from captures in forced lines; with no !
for a capture and a gap of 25 % (was 10) ours are chess.com's 87 % of the time.
ChessCom rules only. 2M nodes instead of 1M changed !! not at all: kept 1M.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mobile-api GameReview.start(path, eval_file, full): the fixed search in
one engine process per core (at most 4, by free memory), nice 10;
ReviewState.stale, nps_per_process; review_estimate_secs().
- The start sheet keeps the description, the time and one button; quality,
«Start over» and «Analyse again» are gone; a stale analysis offers
«Update», evaluations of the PGN «Analyse with the engine».
- docs/decisions.md: the owner's decision with the numbers (search, memory,
times, the first chess.com check); android-ui.md §21.2; chess.com README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37.Rd7!! of Kasparov - Topalov: 37...Rxd7 38.Bxc4 wins the queen back, but the
bishop has attacked it since 36.Bf1 - the move made no new threat, the rook is
given. Only a threat the move itself makes (18.Bxa7 opening the d-file) means
taking is no answer. Tried and dropped: a pawn given as the only good move as !!
(finds 33.c3+!!, but marks 17.d5 of Steinitz, unmarked by chess.com).
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>
Byrne - Fischer (given to chess.com after our prediction was recorded):
12...Nxc3 and 13...Nxe4 were great by us, not by chess.com - in the whole check
set chess.com marks a capture ! only when the best other move loses (20.Rxe7+,
18.fxe6). 18...Bxc4+ wins back after 18.Bxb6 took the queen 17...Be6 left: the
combination goes on. ChessCom rules only. Tried and dropped: counting a piece
left hanging as given (would find 17...Be6!! but adds four false !!).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every sacrifice of the check set whose best other move also won (up to 93 %)
is chess.com's !!, so a won position no longer rules !! out by win % - only a
forced mate without the move does. The checker compares games known only by
chess.com's totals by count (Levitsky - Marshall). Check set: 10 games.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Calibrated on three more games marked by chess.com (Pillsbury - Lasker,
Rotlewi - Rubinstein, Reti - Tartakower), ChessCom rules only:
- an attacked piece moved quietly onto another attacked square could have
stepped away: offered (18...Ra3!!, 20...Ng4!!); only a desperado capture is
a piece lost anyway;
- a capture winning back what the opponent has just taken elsewhere is no
winning capture and can be great (18.fxe6!), unless the opponent took a piece
the mover had just offered (24...Bxe4+);
- a pawn offered for a quicker mate is brilliant (29...b5+!!).
Check set: 7 games, 38 agree, 6 differ (was 34/10).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>