About

Quick Links

Background

I’m a sixth-form student in the UK, and Topple is a computer chess project that I’ve been working on for around two years in my spare time. The idea of developing a chess engine seemed like a natural way to combine my interests both in computer science and the game itself.

Topple is based around PVS, combined with a handcrafted evaluation with automatically tuned weights. The command line interface can be used, but a UCI compatible interface is needed to interact with Topple comfortably.

Strength

Having implemented several modern game programming techniques, Topple’s strength is on par with the strongest human grandmasters, though it currently pales in comparison to the strongest computer systems. CCRL maintains rating lists for chess engines, wherein Topple is currently ranked 100th in the world.

Topple determines its choice of move by mapping out possible future positions with Principal Variation Search, focussing on the most promising variations though a combination of Aspiration windows, Null move pruning, Internal iterative deepening, Restricted singular extensions, Check extensions, Mate distance pruning, and Late move reductions.

At each of these potential states, Topple determines the desirability the position by first resolving any exchanges and recaptures with Quiescence search, and then applying an evaluation function which takes into account the material imbalance, the locations of pieces, pawn structure, king safety, mobility, attacks, rook activity, and a number of other miscellaneous positional factors. The result is tapered based on the total material on the board for a smooth transition between the middlegame and the endgame.

On a modern PC, Topple can analyse around 2 million positions per second, which is achieved through the highly efficient bitboard representation: each ‘bit’ on a 64-bit CPU register represents a square on an 8×8 chessboard, which allows common operations – which would otherwise have needed loops or complex logic – to take place in a single bitwise instruction.

Play Topple

Topple plays as a bot on Lichess.org and will accept any challenge short of Correspondence. You can also download the latest release from GitHub to play against or analyse with locally, though you will need a UCI-compatible GUI to use the engine comfortably. The complete source code is also available there under the MIT Licence.

Syzygy tablebases are supported, and can be used for perfect play in endgames with 6 or fewer pieces (if the tables are present). Multithreading is also supported, and is implemented with YBWC.

Acknowledgements