Chess

Full rules — castling, en passant, promotion, and every draw condition — against a search-based computer opponent or a friend on the same device.

Copied

Last updated

0White wins
0Draws
0Black wins
White to move
Black
White

Tap a piece, then tap a highlighted square to move it.

Moves

About this game

This is complete chess, not a simplified version. Castling on both sides is offered only when the king and rook have not moved, the squares between them are empty, and the king is neither in check nor passing through or landing on an attacked square. En passant is available for exactly one move after the enemy pawn's double step. Pawns reaching the last rank open a promotion chooser — queen, rook, bishop, or knight. Illegal moves are never offered in the first place: every candidate move is played out internally and discarded if it would leave your own king in check, so a pinned piece simply has no squares along which it could expose the king.

The game ends by checkmate or stalemate, and also declares the three standard draws automatically: threefold repetition of the same position, the fifty-move rule (fifty moves by each side with no capture and no pawn move), and insufficient material — king versus king, king and a single minor piece, or king and bishop versus king and bishop on the same color squares.

The computer opponent is a real engine: an alpha-beta minimax search with a quiescence search that plays out capture sequences before evaluating, so it does not hang pieces to a simple recapture. Positions are scored on material plus piece-square tables, which is what gives it a sense of putting knights near the center, castling its king into a corner, and pushing pawns in the endgame. Easy searches one ply with substantial noise added to move scores, Medium searches three plies with a little noise, and Hard runs iterative deepening up to five plies under a time budget of about a second and a half — it always answers quickly rather than freezing the tab.

Undo steps back one full move against the computer (taking back its reply and your move, so it stays your turn) and one half-move in pass-and-play. Board flip, last-move highlighting, legal-move dots, and a live algebraic move list are all built in. Your game in progress — position, turn, castling rights, en passant target, move history, and mode — is saved on this device, so closing the tab and coming back picks up exactly where you left off.