Zug
A chess engine built from first principles. Every legal move, pruned branch, and undone position written by hand.
A board with boundaries.
The 120-cell mailbox surrounds 64 playable squares with off-board sentinels.
××××××××××××××××××××××××××××××××××××××××××××××××××××××××
120 cells. 64 squares.Choose a square to explore knight moves.
Board illustration · Knight moves only, independent of engine search.
Inside the build
- Written in C++17 without a chess library, using a 120-cell mailbox board representation.
- Legal move generation covers castling, en passant, and promotions; compact undo records restore board state during search.
- Negamax with alpha-beta pruning and quiescence search explores positions while avoiding noisy leaf evaluations.
- A material-only evaluator keeps the engine small and understandable.
- Speaks UCI so existing chess GUIs and tournament tools can drive the engine.
- Tested with automated position checks and a 100-game baseline comparison using cutechess-cli.
An engine built to understand the entire path from board representation to search and evaluation.