Chess programming
Open source · GPLv3I've been fascinated by computer chess since I was a child.
One Christmas I was given a Chess Challenger, and it took me ages before I could beat it. As soon as I started programming I was trying to write chess programs of my own, and I recognised early on that searching the tree of possible moves needed a recursive approach. There were very few books or magazines about chess programming then, and no internet, so I worked it out slowly for myself, rediscovering minimax, negamax and alpha-beta along the way.
My first real chess program, written when I was fifteen or sixteen, was in Z80 assembly language on a 16K ZX Spectrum. It played terribly, but it played legal chess, promotions, castling and en passant included. I kept improving it, but soon realised that assembly language was too hard going, so my later engines have been written in C and then C++. More recently I've enjoyed porting them to Rust and Go, two languages I really like.
Computer chess has changed enormously over the years, and I've learnt along with it: the bitboard board representation, the many ways to prune and speed up the search, evaluation functions tuned by heuristics, by hand and through games, and most recently how to build and train efficiently updatable neural networks (NNUE) to evaluate positions.
Everything here is open source under the GNU General Public License. I hope you find the code easy to read and understand, well documented, and strong over the board.
The engines
Five engines in five languages. The three pawnstars play the very same game: given the same position and depth, each searches an identical tree.
pawnstar
The original: bitboards, a Lazy SMP alpha-beta search and an NNUE evaluation.
- Strength
- about 2900 Elo*
- Licence
- GPLv3
- Source
- GitHub
* Measured by us against engines on the CCRL lists. It is not an official CCRL rating.
zenith
A separate engine in C, small and simple by design, with a network it trains itself. The strongest of the five.
- Strength
- about +110 to +135 Elo over pawnstar
- Licence
- GPLv3 or later
- Source
- GitHub
pawnstar-go
pawnstar ported to Go, with hand-written AVX2 and NEON kernels for the network; on Apple Silicon it runs level with the C++.
- Strength
- level with pawnstar
- Licence
- GPLv3
- Source
- GitHub
pawnstar-rs
A mechanical port to Rust, bit-exact with the C++: every node count, move and score identical.
- Strength
- level with pawnstar
- Licence
- GPLv3
- Source
- GitHub
Stoopid Chess
An engine and a board to play it on, first written in 2009 and rebuilt in 2026 for .NET 10, with a GUI for Linux, macOS and Windows. Its GUIs will play any UCI engine.
- Licence
- GPLv3
- Source
- GitHub
A page to play Stoopid Chess and zenith in your browser is coming.
"Level with pawnstar": a three-way round robin put all three within the error bars of one another (Go +13, Rust −7 against the C++).