Chess Engine (Beta)
Play
A chess engine that runs entirely in your browser. You play White; drag a piece to move. Nothing is sent anywhere, and the search runs on your own machine.
Captured
Settings
Move history
How it works
Everything happens in this page: there is no server, no API call and no stored game. The engine is a classical search over the game tree, the same design as the first chess programs, with three parts.
Search
The engine uses iterative deepening, alpha-beta pruning and principal-variation search, with transposition tables, move ordering, null-move pruning and late-move reductions. Tactical positions are extended with quiescence search rather than stopping abruptly after a quiet move. The selected depth is a target: the engine searches progressively deeper and keeps the last fully completed result if the local time budget expires.
Evaluation
Positions are evaluated from White's point of view using material, piece-square tables, mobility, king safety, pawn structure, passed pawns, bishop pair, rook files, central control and an endgame-specific king evaluation. Static exchange information helps order tactical captures. The evaluation changes with the material remaining on the board.
Opening book
For the first few moves, the engine can follow a short book of standard openings instead of searching. When the moves played so far match the start of a book line, it plays the next move of that line, choosing at random when several lines match. Turning the book off makes the engine think from move one, which is slower and often stranger.
House rules
- Colours
- You play White and move first. The engine plays Black.
- Special moves
- Castling and en passant are allowed. A pawn reaching the last rank always promotes to a queen.
- Draws
- Threefold repetition, the fifty-move rule, stalemate and insufficient material all end the game.
- No undo
- Once a move is released it is final. Start again with New game.
- Waiting
- The search runs locally in the browser. The engine uses iterative deepening and keeps its previous completed search, so a deeper search can be interrupted cleanly by the local time budget.