Chess vs a real engine — or a friend
White to move
Black
White

Moves

No moves yet — White to play.
0
Wins
0
Losses
0
Draws

Play Chess Online vs the Computer

Play a full game of chess directly against the computer, free, in your browser, with no download and no sign-up. Choose whether you play White or Black, pick a difficulty, and click or drag a piece to one of the highlighted squares. Every rule is here — castling, en passant, pawn promotion, check, checkmate and stalemate — and the opponent is a real chess engine, not a lookup table. Legal moves are shown for the piece you pick up, your game is written out in algebraic notation as a live move list, captured pieces and the material score are always on screen, and your wins, losses and draws are tracked per difficulty. Prefer to play a person? Flip the mode to 2 Players for a pass-and-play game on the same device.

How the AI thinks

The computer opponent is a genuine game-tree search engine, the same family of algorithm behind classic chess programs. On every move it generates the fully legal moves — respecting pins, checks and castling rights — and then runs negamax with alpha-beta pruning: it plays out sequences of moves for both sides, scores the resulting positions, and chooses the move with the best guaranteed outcome, skipping branches that provably cannot matter. To avoid grabbing a piece right before the recapture, it extends every leaf with a quiescence search that keeps looking while captures are still on the board. Positions are scored by material plus a positional evaluation — piece-square tables (knights in the centre, rooks on open files), king safety, pawn structure (doubled, isolated and passed pawns), the bishop pair and rooks on open files. It searches with iterative deepening and null-move pruning, and extends the search when a king is in check so it doesn't miss forcing tactics. There are four levels: Beginner hangs pieces on purpose, Medium plays a solid game, Hard thinks about a second per move, and Expert searches deeper still at about two seconds per move. The whole engine runs locally in your browser in a background worker thread, so the page stays responsive and nothing is sent to a server. At its strongest it is a strong club-level opponent, though we do not claim it is perfect or grandmaster-strength.

How to play chess — the rules

Tips to beat the AI

FAQ

Can I play chess against the computer for free?
Yes — that is exactly what this page is. Pick a difficulty, choose your colour, and play. Works on desktop and mobile, free, with no account.

How strong is the AI?
There are four levels. Beginner plays some deliberately weak moves; Medium plays a solid game; Hard runs a negamax search with alpha-beta and null-move pruning, a quiescence search and a positional evaluation (king safety, pawn structure, bishop pair, open files), thinking about a second per move; and Expert searches deeper at about two seconds per move — a strong club-level opponent, though we don't claim perfection.

Does it support castling, en passant and promotion?
Yes — the full rules of chess, including all three special moves plus check, checkmate, stalemate and the standard draw rules.

Can I play a friend on the same device?
Yes. Switch the mode to 2 Players for a local pass-and-play game with no engine involved.

Is it free? Does it work offline?
Completely free, no download, no sign-up. The engine runs client-side, so once loaded the game keeps working without a connection. More AI games: AI Checkers, AI Othello, AI Connect 4, AI Tic Tac Toe or AI Minesweeper.

More AI games on LK Forge