← play

Chess Engines

All engines implement the same stateless interface — they receive a board position in FEN notation and return a move. Adding a new engine requires no changes to the UI or API.

RandomrandomBeginner

Picks a uniformly random legal move each turn. Easy to beat — useful as a baseline opponent and a minimal reference implementation of the engine interface.

Algorithm

Random selection

Look-ahead

None

MinimaxminimaxIntermediate

Classic minimax with alpha-beta pruning, searching 3 plies deep. Positions are evaluated using material values plus piece-square tables that reward strong piece placement (center control, king safety, open files for rooks).

Algorithm

Minimax + alpha-beta pruning

Search depth

3 plies

Piece values

♙ Pawn 100♘ Knight 320♗ Bishop 330♖ Rook 500♕ Queen 900♔ King 20 000

Adding a new engine

Implement the ChessEngine interface in lib/engines/, add the ID to the EngineId union in lib/engines/types.ts, and register it in lib/engines/registry.ts. The engine selector and API route pick it up automatically.