Skip to content

A readable, experimental, and not very serious UCI protocol C++ chess engine

Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

Superpawn logo designed by Angela M. Eads


Superpawn is an experimental C++ chess engine which should not be taken very seriously. Superpawn uses the Universal Chess Interface protocol in order to communicate with a compatible graphical user interface of your choice.

The latest build of Superpawn can always be downloaded from .


Windows x86 executable. If you don't know which file to download, this one is probably it.

Windows x64 executable. Slightly faster for x64 machines.

Source code. For building on arbitrary Macintosh and Linux boxes. The Travis build system currently reports Superpawn's build status as: Build Status


Superpawn is capable of making many fascinating chess moves, many of which are legal. It beats its author handily at the game, which is not terribly surprising since its author is a lifelong patzer.

Superpawn is an excellent example of the "objects gone wild" style of programming, in which Everything Is An Object. Even the pieces themselves are objects; they know how to move, capture, etc. This of course slows down the move generation and evaluation process immensely, making this program irredeemably slow in tournament conditions. However, its logic is easy to follow and extend as you see fit.

Superpawn requires a C++11 compiler with support for threading. It builds and runs on Windows, Linux and MacOS systems, and compiles under Microsoft, gcc and clang compilers. A CMake implementation is provided to ease compilation on arbitrary targets.

If you are compiling with gcc, Superpawn requires gcc 3.8.2 or higher to compile. Earlier versions don't support all C++11 features, and your compilation will fail.

Building on Windows

To attempt a Windows build, from the root directory of the installation type:


Test suite

Superpawn includes a simple test suite that uses the cutechess-cli application to run a series of tests against existing chess engines. Superpawn currently loses handily to most of them. The test suite currently runs on Windows platforms only but could be modified to run on other platforms.

The core of the test suite is a Lua script that enumerates all currently existing chess engines in the tools\engines subdirectory, and uses the cutechess-cli application to launch a gauntlet test against Superpawn. The results of the gauntlet are automatically stored in the build\tests subdirectory.

To build and run against the test gauntlet, run the following on a Windows box from the root directory:

tools\win32\make\build --TESTS

As of this writing, I test against specific Windows builds of the following engines:

I make no proprietary claim for cutechess-cli or any of the included chess engines except Superpawn. If you don't want me to test against your engine or include it in github, let me know and I'll happily delete it from the repository.

Information on recent gauntlet results, including PGN format games and their elostat analyses, may be online here.

Raspberry Pi

Superpawn has been demonstrated to work, excruciatingly slowly, on the Raspberry Pi embeddable computer. However, most graphical user interfaces for chess on the Pi utilize the older xboard protocol, while Superpawn uses the Universal Chess Interface protocol. This can be worked around by installing and using Polyglot to launch Superpawn. A sample polyglot.ini for the Raspberry Pi is included with this distribution. This configuration works well with the eboard graphical user interface on the Pi.

You will need to have gcc 3.8.2 or higher installed on the Pi. As of this writing, instructions for updating the Pi from older compilers are here.


When my wife Amanda was very small, her older sister made her play chess. Although her older sister was quite serious at the chessboard, Amanda quickly tired of the slow game. Eventually Amanda would grab a pawn and yell "It's SUUUUPERPAWWWWWN!" and whoosh it around, knocking all the other pieces off the board. This is the basic strategic and evaluation methodology that I have attempted to incorporate into this chess engine.


  • ANSI C++11 code
  • Compiles under Microsoft Visual Studio 2013, gcc 3.8.2, AppleClang 5.1.0, and clang 3.3
  • Implements a subset of UCI protocol sufficient to permit play with Arena 3.0+, Tarrasch Chess GUI, Fritz GUI, cutechess-cli and others
  • Pluggable architecture permits easy experimentation with new algorithms for search and evaluation
  • Principal variation search
  • Basic material evaluator
  • Basic mobility evaluator
  • Gratuitous functional programming
  • All the code exists within a single C++ source file
  • Vaguely sort of const-correct
  • Compiles cleanly in 32-bit and 64-bit modes
  • Compatible with cmake build systems
  • Simple test framework based on cutechess-cli
  • Castling, stalemate, fifty move rule, and draw by repetition
  • Reports distance to mate
  • Basic time management controls
  • Basic transposition table

Things it doesn't do

  • Take castling into account in computing hashes
  • Understand pawn structure
  • Better endgame logic for say KRK and KQK. Superpawn is currently perfectly capable of throwing easily winnable endgames.
  • Play chess well


Source code is provided under the Creative Commons 3.0 Attribution Unported license. Please don't pass off this chess engine as your own work.

Feel free to contact or ridicule the author at mailto:johnwbyrdatgmaildotcom.