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.
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
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
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.