What is Chess vs AI?

Chess vs AI is a full chess game against a built-in computer opponent. Move validation uses the chess.js library, the AI runs a minimax search with alpha-beta pruning and piece-square evaluation, and six difficulty levels cover absolute beginners through to club-level players. It is free and private — your moves stay yours and nothing is uploaded.

Six difficulty levels are tuned by search depth and random-move probability. Novice and Beginner search 1 ply and pick a random legal move 75 and 40 percent of the time, so they hang pieces often enough for kids and absolute newcomers to win. Casual searches 2 plies with a 15 percent blunder rate. Intermediate searches 3 plies and rarely blunders. Advanced and Expert both search 4 plies with the full piece-square tables and play solid club-level chess, punishing loose moves. Pieces move by click-to-select or by drag-and-drop, and a Hint button lights up the strongest move at any time using a fixed 3-ply search, independent of the difficulty you picked. Castling, en passant, promotion, threefold repetition, fifty-move rule, and stalemate are all handled, and the move history exports as PGN you can paste into Lichess or Chess.com.

How to use

  1. Pick a difficulty from the six-level scale (novice, beginner, casual, intermediate, advanced, expert) and choose whether to play as white or black.
  2. Click a piece to see valid moves highlighted, then click a destination square to make your move. The AI responds automatically.
  3. Track the game with the move history panel, undo moves to try different strategies, or start a new game at any time.

When to use

  • Drilling an opening repertoire by replaying the same first 8 moves and seeing how the AI deviates.
  • Practising endgame technique by setting up the starting position and steering toward king-and-pawn endings.
  • Killing fifteen minutes on a phone with a real game instead of yet another puzzle rush.

Result

You want to practice your Sicilian Defense before a tournament. Pick intermediate, play as Black, reply to 1.e4 with c5, and see whether the AI heads into a Najdorf, Sveshnikov, or a quiet Anti-Sicilian. After the game you copy the PGN from the move history and paste it into Lichess for engine analysis.

FAQ

How strong are the advanced and expert difficulties in Elo terms?
Roughly 1500-1700 Lichess rapid, depending on the position. Both Advanced and Expert run a 4-ply search with the full piece-square tables, which gives solid tactical awareness, but neither has an opening book or real endgame knowledge, so a 1800+ player will pull either apart in long games. The Expert label is mainly there to signal full strength when you want it clearly named.
Why do the novice and beginner levels sometimes hang a queen?
By design. Both run a 1-ply search and then roll a dice — novice plays a random legal move 75 percent of the time, beginner 40 percent. That keeps them beatable for absolute newcomers and curious kids. The moment those blunders stop teaching you anything, jump straight to casual or intermediate.
Can I undo my move when I see the AI's reply?
Yes. The Undo button rolls back the most recent pair of moves (yours and the AI's). It is meant for learning, not cheating against a friend, since there's no friend on the other side. If you want a fair record afterwards, copy the PGN before undoing.
Can I play as Black instead of White?
Yes. Open the side panel and switch Play As to Black before starting a new game. The board flips so the Black pieces sit at the bottom, and the AI plays the first move as White. Switching mid-game restarts the position.
Where can I paste the PGN to get a deeper analysis?
Lichess Analysis Board (lichess.org/analysis), Chess.com analysis, and most desktop GUIs such as Arena or SCID accept the same PGN format. Lichess gives you a free Stockfish 16 review of every move, which is far stronger than the in-page AI.

Related Tools