r/ComputerChess • u/Far_Session_9986 • 16d ago
How I use Stockfish to find the tactics a player missed across their whole game history: looking for feedback on the pipeline
I'm about 2500 online chess.com, and I've been building Motify, which runs Stockfish over every game a player has on lichess or chess.com and turns each tactic they missed into a puzzle. I'd like feedback on the detection side from people who know engines better than I do.
The pipeline, per game, for every position where the player was to move:
- Cheap pass. 5,000 nodes (depth capped at 8) on the position before and after the move played. Anything that lost at least half the threshold goes on to the deep pass. A fixed depth cost anywhere from about 200 to 27,000 nodes depending on the position, so a node budget was far more predictable. Lichess games that already carry evals skip this pass.
Deep pass. MultiPV 2 at depth 12. A position counts as a missed tactic when:
- the move played lost at least 150cp (user-adjustable),
- the best move is at least 100cp clear of the second best, so there was one move to find, not a general edge,
- the best move leaves the player at least equal, so it isn't just "less lost".
- Confirm. A candidate is searched again at depth 16 and only stored if it still passes. Mates are re-checked at depth 22 to catch ones the shallower search found one move short.
- Solution line. The answer is walked forward only while the side to move has one clearly best move (100cp gap over the second, MultiPV 2). The puzzle ends where the tactic ends, not 15 moves into a won endgame.
Engines run with 1 thread and 128MB hash each, and concurrency comes from running several engine processes. Multi-threaded search made results vary from run to run at these depths, and the same game should give the same puzzles every time.
On my own account that's 1,635 games and 650 tactics. Before each of the player's own tactics, the trainer gives them warm-ups from the lichess puzzle database that share the same theme.
What I'd love opinions on:
- Is depth 12 to find and depth 16 to confirm a reasonable trade-off, or is NNUE noise at these depths still letting false positives through?
- Is the MultiPV gap a good test for "this was tactical", or is there a better signal?
- Any smarter ways to pick which positions get the deep pass?
It's free to try with just a username if you want to see what it finds in your games. I'd especially like to hear if it flags something that isn't really a tactic.