Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Unit tests and puzzles


My blog post: Building My Own Chess Engine

A chess engine which implements:

  • Alpha-beta pruning for move searching
  • Move ordering based off heuristics like captures and promotions
  • Tomasz Michniewski's Simplified Evaluation Function for board evaluation and piece-square tables
  • A slice of the Universal Chess Interface (UCI) to allow challenges via
  • A command-line user interface

It uses Python 3.8 with Mypy type hints and unit + integration tests.

See Contributing to help out!


pip install -r requirements.txt

Use it via command-line

Start the engine with:


Start as [w]hite or [b]lack:

  8 ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
  7 ♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
  6 · · · · · · · ·
  5 · · · · · · · ·
  4 · · · · · · · ·
  3 · · · · · · · ·
  2 ♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟
  1 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
    a b c d e f g h

Enter a move like g1h3:

Use it as a UCI engine

The only interfaces that Andoma currently supports are ShailChoksi/lichess-bot and the command-line UI ( Debug information and configuration options are minimal compared to a full UCI engine.

Start the engine with:


An example interaction with the engine (responses have #):

# id name Andoma
# id author Andrew Healey & Roma Parramore
# uciok
position startpos moves e2e4
# bestmove g8f6

Also accepts a FEN string:

position fen rnbqk1nr/p1ppppbp/1p4p1/8/2P5/2Q5/PP1PPPPP/RNB1KBNR b KQkq - 0 1

See the UCI interface doc for more information on communicating with the engine.

The UCI protocol slice that's implemented by this engine means you can play it via by using ShailChoksi/lichess-bot (a bridge between Lichess API and chess engines) and a BOT account.

The engine file required by lichess-bot may be generated using pyinstaller.


There are unit tests for the engine, UI, and evaluation modules. Mate-in-two/mate-in-three puzzles are being added.

python -m unittest discover test/

Type hints:

pip install -r requirements-dev.txt

mypy .


Raise an issue to propose a bug fix or feature (or pick up an existing one).

I (@healeycodes) am happy to help you along the way.

For coding style: look at the existing files, use Mypy types, use PEP8, and add a test for any change in functionality.

Please run the tests locally before submitting a PR.