Chess
Play Chess against an AI opponent powered by a rule-based engine. Choose from three CPU strategies — Random, Smart, or Best — and sharpen your game.
How to Play Chess
- Select a side to play as (White, Black, PvP, or CPU). In CPU mode the AI controls both sides.
- Choose a CPU strategy for each AI side: Smart plays principled chess with variety, Best always picks the strongest move, Random picks any legal move.
- Click a piece to select it; valid moves highlight on the board. Click a highlighted square to move.
- The game detects check, checkmate, and stalemate automatically — a banner announces the result.
- Click Reset at any time to start a new game with the same settings.
Frequently Asked Questions
- What CPU strategies are available?
- Smart follows the rule-based AI priority order and picks randomly among moves with similar positional scores — strong but varied. Best always picks the single highest-scored move for the top-priority rule — the strongest and most consistent play. Random picks any legal move with no rules or scoring — completely unpredictable.
- Can two humans play on the same device?
- Yes — select PvP mode and pass the device between turns.
- Does the game support castling and en passant?
- Yes. All standard chess rules are implemented including castling, en passant, and automatic pawn promotion to Queen.
- How does the rule-based AI work?
- The AI scores every legal move using piece-square tables, then evaluates a priority-ordered rule list — checkmate, queen captures, escaping threats, castling, centre control, development, and more. The highest-priority rule that matches any move determines the choice.