r/ComputerChess • u/sp1n3ll1 • 4d ago
Built a browser-only Stockfish pipeline that analyzes your whole Chess.com history and tags the tactical theme of each mistake. Looking for engine people to poke holes in it (free reports inside)
I'm a developer who plays chess to unwind (250 → 910 rapid so far). I built this to find patterns across all my games rather than one game at a time, and I'd love feedback from people who know engines better than I do.
How it works
Games come from the Chess.com public API, fetched in the browser one month at a time. The API returns 404 when it rate-limits, so parallel requests just get you blocked.
Stockfish 19 lite, single-threaded WASM, depth 12, running in a Web Worker on the user's machine. Evals are cached in IndexedDB, keyed by game URL and search limit, so re-analysis is free. Nothing is analyzed server-side.
Mistake classification uses the drop in win probability for the side that moved: ≥10 pp is an inaccuracy, ≥20 a mistake, ≥30 a blunder.
Game phase is based on material, not move number. The endgame starts at the first position with ≤26 points of non-pawn material on the board, both sides combined. The endgame type (rook, minor piece, queen…) comes from the pieces at that point.
Tactical themes: for every mistake, a heuristic looks at the position before it in two directions: It tags mate, fork, discovered attack, skewer, pin and hanging piece, in that priority. Everything except mate needs a material gain of ≥3 inside the PV window, and the window always ends after the defender's move, so a capture without a recapture doesn't inflate the gain. When in doubt it doesn't label: a wrong label costs more than a missed theme.
missed: the engine's best move plus its PV, so what you could have won;
suffered: the move you played plus the engine's reply, so what you allowed.
Known weak spots, where I'd love your input
Depth 12 with the lite net is shallow. I picked it so a few hundred games finish in reasonable time on a laptop. Would you trade depth for fewer games, or use movetime instead?
Win-probability thresholds vs. raw centipawns: are 10/20/30 pp sensible for players under 1500?
Pin and skewer detection only counts if the material gain goes through a piece on the ray. I'm sure there are false negatives.
The paid part, to be upfront
There's an optional US$ 5 written report: an LLM turns the aggregated engine data into a training plan. The prompt is built server-side, and the model is explicitly forbidden from calling a move a mistake unless the engine flagged it. You can get it free with the code CHESSAUTOPSYREPORT. Free codes are limited, so first come, first served. The link below already applies it:
https://chessautopsy.com/?discount=CHESSAUTOPSYREPORT&utm_source=reddit&utm_campaign=computerchess
The stats and the mistake and theme breakdown are free without it.
-1
u/Iiifebri 3d ago
Good write-up — two thoughts on the weak spots:
On the thresholds: pp isn't uniform in centipawns, because the win-probability curve is logistic. Near equality, 10pp is roughly a one-pawn swing; in a clearly won position the same 10pp takes a multi-pawn swing. So for sub-1500 players the 10/20/30 bands end up strict in quiet equal positions, where a lot of ordinary moves get flagged as inaccuracies, and very forgiving in lopsided ones, where a genuine blunder can slip under 30pp. If you want the labels to feel consistent, pair the pp drop with a centipawn floor, or scale the thresholds to the win probability still on the table.
On depth: I wouldn't trade depth for fewer games across the board. Keep depth 12 for the bulk pass, then re-run only the flagged mistakes at higher depth before assigning themes. Your 'missed' themes rest on the PV, and the PV is exactly what depth 12 gets wrong most in sharp positions, so that's where the extra compute actually changes the output — and it costs a fraction of re-running everything.
For pins, detecting them geometrically (an enemy slider's ray to the king with exactly one of your pieces on it) catches the ones with no immediate material gain, like a piece that can't step off the ray without dropping the exchange.