Some of you may remember Superpawn from around 2013. It was a single-file C++11 engine written in what its README called the "objects gone wild" style: every piece was an object that knew how to move. It was easy to read and irredeemably slow, and the README told you not to take it very seriously. It sat mostly untouched after 2017.
In early October I went back to it. The first pass was a refactor of the old code: a perft suite, a pile of bug fixes, CI builds, pawn structure and king safety terms, and a gauntlet script. That made it correct, but it couldn't make it fast, because the design was the bottleneck. So on October 15 I started over. The current Superpawn is a new engine written from scratch in C++23, and none of the old code survives. The old engine is preserved on the feature/old branch for anyone curious.
Search
Alpha-beta over bitboards (magic bitboards, optional PEXT), PVS with iterative deepening, aspiration windows and MultiPV. A lockless shared transposition table. Null move with verification, razoring, reverse futility, IIR, ProbCut, LMP, futility and SEE pruning, continuation-history pruning, singular extensions with multi-cut, and history-scaled LMR. Move ordering uses capture history, butterfly history, continuation history (1, 2 and 4 plies back) and killers. Lazy SMP, with the final move chosen by a depth-and-score weighted vote across threads.
I'll be plain about where this comes from. The search follows Stockfish closely, including its structure, much of its naming and, in places, its tuned constants. Stockfish is credited in the README, and Superpawn is AGPL-3.0. What's different is everything around the search: the evaluation, the training pipeline and the testing discipline.
Evaluation
NNUE, perspective network: 768 inputs per side -> 1024 hidden per perspective -> SCReLU -> 8 output buckets selected by piece count. Weights are int16, with AVX-512, AVX2 and scalar paths chosen at compile time (the scalar path doubles as the reference the SIMD code is tested against). Accumulators update lazily: a node pays for an accumulator update only when it is actually evaluated.
Every network was trained only on Superpawn's own games
No data, weights or evaluations come from any other engine. Generation zero was a simple hand-crafted evaluation. Its self-play games trained the first network, that network's games trained the next, and so on. Data comes from the built-in datagen command, training uses Jamie Whiting's bullet, and a new network is adopted only if it passes SPRT against the current one:
- spn-002: 20M positions from the hand-crafted eval. +460 Elo vs hand-crafted at fixed nodes
- spn-003: 30M positions from spn-002. +141 Elo vs spn-002 at 10+0.1
- spn-004: 160M positions from spn-003. +263 Elo vs spn-003 at 10+0.1
- spn-005: 500M positions from spn-004, plus spn-004's data. +165 Elo vs spn-004 at 10+0.1
Testing
Search and eval changes are accepted on SPRT results (fastchess, UHO_Lichess_4852_v1 book, normalized Elo bounds), not on intuition. The bench node count is the search signature. The whole loop of datagen, shuffle, train, convert, check, SPRT and publish is scripted and documented in the repo, so anyone can reproduce a network.
Getting it
Version 1.9.2 uses network spn-005 (bench 470907). Each download is a single statically linked binary with the network embedded, with no other files needed. Builds are available for Linux and Windows (AVX2 and plain x86-64), macOS (Apple Silicon and Intel) and Android arm64.
Releases: https://github.com/johnwbyrd/superpawn/releases
Source: https://github.com/johnwbyrd/superpawn
It speaks UCI (Threads, Hash, MultiPV, Move Overhead, EvalFile), and there's a PolyGlot config for XBoard users.
Not done yet
Syzygy probing, Chess960, pondering, SPSA tuning of the search parameters, and king buckets in the network. The next network generation is in progress.
What I'd like from you
I haven't measured its absolute strength yet, so I'd welcome gauntlet results against engines you know well, along with bug reports and criticism of the search or the training setup. Issues and PRs are welcome on GitHub.
On tooling
Much of the rewrite was done with Claude as a coding assistant, and the commit log says so. Every change to search or evaluation still had to pass the same SPRT gate as any other change.
Credits
The logo is by Angela M. Eads. Search ideas trace back through Stockfish and its predecessors, NNUE to Yu Nasu's work and the engines that developed it, and the trainer to Jamie Whiting's bullet.
John Byrd