r/ComputerChess • u/solarflare1121 • 9h ago
r/ComputerChess • u/dig9977 • 14h ago
Chess engine to find checkmate vs humans as fast as possible - does anything else like this exist?
Inspired by YouTube challenges where GMs must mate amateurs within 20–25 moves, I wondered: how fast could a chess engine checkmate a human if that were its only objective? (and knowing it must resign on, say, move 26 no matter what)
What I built: an engine explicitly optimized for speed of mate against humans. Details:
- Openings: started by mining ~100GB of Lichess games for Elo-specific opening books (shortest average games, not best evals). Now the books are built offline by simulating games against Maia-3 at each rating, with a separate book for each move limit. For the shortest limits it uses a value net trained by self-play against Maia-3.
- Midgame: uses Maia-3 to predict likely human responses. Stockfish suggests candidate moves, each one gets played out in a bunch of simulated games vs Maia, and it plays whichever mates most often before the deadline. As a result, it plays moves that an engine like stockfish would destroy, but that a human will probably fail against.
- Endgame: 2-3 moves from the deadline it switches to an exact calculation of the mate chance over the human's likely replies (not forced mates, but most likely mates against a human).
Why standard engines struggle: even aggressive engines optimize for objective soundness and win probability instead of risky lines that might mate much faster. I've had this program running for over a year, and it exists as a lichess bot, and A/B testing shows it is better than Leela with high Cpuct, Komodo with high contempt, stockfish 11 with high contempt, and stockfish 19. I'm an average player and can avoid checkmate until move 41 vs stockfish19, around move 35 against the other "aggressive" engines, but can never last until move 25 against this engine.
I'd love links to any work/projects on minimizing time-to-mate against human play (I couldn't find any). I have no intent to ever make money from this. Just a fun project.
Apologies this is sort of a repost from a year ago (and I've posted about this a few times in between), but LLMs have contributed to a lot of new chess projects and I'm wondering if anyone else has tried this. It seems like an intrinsically interesting problem to me, and I would guess someone smarter than me has done something better, maybe using a custom Leela training build.
If anyone wants to try it, you can play here & view code: http://siegechess.com
It's also playable on LiChess as
https://lichess.org/@/mate-in-twenty (best if your ELO is ~1400 or lower)
https://lichess.org/@/mate-in-thirty (1400–2200)
https://lichess.org/@/mate-in-forty (2200+)
r/ComputerChess • u/turunju8899 • 23h ago
All 4 rulesets of 4x5 Microchess weakly solved as Draw (with a 0-dependency Rust verifier & 91.19M-state exhaustive TB audit)
I have weakly solved and independently machine-checked all four published ruleset variants of Dan Glimne's 4x5 Microchess (`rbnk` and `knbr` layouts, both with and without back-rank castling). All four have exact game-theoretic value **Draw** (`1/2 - 1/2`):
- `rbnk/p3/4/3P/RBNK w - - 0 1` (Fairy-Stockfish `[microchess:gardner]` / PyChess): **Draw** (`2,991` & `285,143` DAG nodes)
- `knbr/p3/4/3P/RBNK w - - 0 1` (Green Chess / Dan Glimne): **Draw** (`5,393` & `199,399` DAG nodes)
- `knbr/p3/4/3P/RBNK w Qk - 0 1` (1997 back-rank castling): **Draw** (`42,334` & `241,676` DAG nodes)
- `rbnk/p3/4/3P/RBNK w Qq - 0 1` (symmetric castling): **Draw** (`3,008` & `366,092` DAG nodes)
- **Tablebase:** Complete reachable `<=5`-piece DTM TB (`108` strata, `91,187,486` legal states).
- **Zero-trust verification:** `crates/microchess-verify` has empty `[dependencies]`, uses an independent 2D board and collision-free `[u8; 22]` state keys, checks Perft, exhaustively Bellman-audits all `91,187,486` TB entries (`263.95 s`, `0` errors), and replays all 8 SHA-256-sealed `.dag` proof certificates.
- **Total core solve time (all 4 variants):** `10.51 min` (`630.55 s`, `121.66M` nodes) on a single 6-core machine.
- **GitHub & Proofs:** https://github.com/MuhammadSadiyev/microchess-4x5-solved
- **Preprint PDF & 108-Stratum TB Archive (Zenodo DOI):** https://doi.org/10.5281/zenodo.24579901
Would love independent verification runs (`cargo run --release -p microchess-verify`) and any feedback!