Chess Game

Play locally with a friend or challenge the built-in AI at 3 difficulty levels — full rules including castling, en passant, and pawn promotion.

Check!
Wins: 0Losses: 0Draws: 0

About this chess game

This is a full-rules chess game covering every standard rule: two-square pawn openings, en passant, castling (kingside and queenside), pawn promotion to queen/rook/bishop/knight on the back rank, and check/checkmate/stalemate detection. The move generator's correctness has been verified against perft — the standard node-counting method used across chess programming — so it doesn't miss or over-count any legal move.

Two-player vs vs-Computer

Two-player mode lets two people take turns on the same device, with no account or internet connection needed — great for playing face to face. Single-player mode ships a built-in AI opponent that combines piece-value-plus-position evaluation tables with minimax search and alpha-beta pruning, at Easy, Medium, or Hard; Hard searches as deep as it can within its time budget.

How to play

Click the piece you want to move — legal destinations are marked with small dots (capture squares are marked with a red ring), then click the destination to complete the move. When a pawn reaches the back rank, a promotion menu pops up so you can choose queen, rook, bishop, or knight. When you're in check, the board makes it clear, and you can only make moves that get you out of check. The undo button steps back one move; in vs-computer mode, undo steps back both the computer's move and your own so it's your turn again.

Choosing a difficulty

New to chess? Start on Easy to get comfortable with the rules and how each piece moves. Medium looks three moves ahead, so basic tactics start to matter. Hard searches up to five moves ahead within a time limit and plays with noticeably more structure — but it's still a lightweight browser AI, not a professional-grade engine. The goal is a fair challenge for casual players, not an unbeatable opponent.

Frequently Asked Questions

What modes does this chess game support?
Two modes: local two-player (two people take turns on the same device, great for playing face to face) and single-player vs the built-in AI, with Easy, Medium, and Hard difficulty to choose from.
Are the rules complete — castling, en passant, all of it?
Yes. The move generator's correctness has been checked with perft, the standard verification method in chess programming (matching known node counts for standard test positions). Castling (both sides), en passant, pawn promotion to queen/rook/bishop/knight, and check/checkmate/stalemate detection are all fully implemented.
Is the computer opponent hard to beat?
There are three difficulty levels: Easy looks only one move ahead and is easy to handle; Medium looks three moves ahead; Hard searches up to five moves ahead within a time limit and plays with real structure. It's still a lightweight browser AI (piece-value-plus-position evaluation with minimax search), not a professional chess engine — its strength sits between beginner and intermediate, which is plenty for casual practice and fun.
Can I undo a move?
Yes — the Undo button steps back one move. In vs-computer mode, undo steps back both the computer's move and your own in one click, so it's your turn again and you can rethink the mistake.
Do I need to download anything or create an account?
No — just open the page and start playing. No download, no install, and no account needed for either two-player or vs-computer mode, so you can jump into a game whenever you feel like it.

My Bookmarks