⭕ Tic Tac Toe vs Computer

Challenge the unbeatable AI — or play a friend. 3 difficulties, score tracking, works on mobile. Can you force a draw on Hard?

Your move — you are X
You / X: 0 Draws: 0 CPU / O: 0

💡 Hard mode is mathematically unbeatable — the minimax AI plays perfectly, so a draw is your best result. Warm up on Easy first!

📖 How to play

  1. You are X and always move first. Tap any empty square.
  2. Get 3 in a row — horizontally, vertically or diagonally — to win.
  3. Vs Computer: pick Easy (random), Medium (blocks & attacks) or Hard (unbeatable minimax AI).
  4. 2 Players: pass the device — X and O take turns.

❓ Frequently asked questions

Can you beat the unbeatable Tic Tac Toe AI?

No — on Hard the AI uses the minimax algorithm and plays every game perfectly, so the best you can achieve is a draw. If you want wins, try Easy or Medium.

How does the minimax AI work?

Minimax looks ahead at every possible future move, assuming both players play optimally. It then chooses the move with the best guaranteed outcome — a win if one exists, otherwise a forced draw. It can never be tricked.

Is Tic Tac Toe a solved game?

Yes. With perfect play from both sides it always ends in a draw. There are only 255,168 possible games — few enough for a computer to evaluate completely, which is exactly what Hard mode does.

Is my score saved?

Yes — wins, losses and draws are stored in your own browser (localStorage), so your tally survives refreshes. Nothing is sent to any server.

🔗 See also

🔤

Hangman

Guess the word before the hangman is complete — 4 categories, hints included.

Play →
🃏

Memory Match

Flip cards and match pairs — train your brain against the clock.

Play →
🔢

2048

Slide and merge tiles to reach 2048 — the classic number puzzle.

Play →
Share: