AbraCalc

Tic-Tac-Toe

Play Tic-Tac-Toe against a smart computer AI in your browser. Can you win?

Tic-Tac-Toe
You are X — Your turn!
Score — You: 0 Draw: 0 CPU: 0
Embed this tool on your site

How to play

  1. You are X — click any empty cell to place your mark.
  2. The CPU (O) responds immediately after your move.
  3. Get three in a row — horizontal, vertical, or diagonal — to win.
  4. Use Easy mode for a beatable random opponent, Hard for a perfect AI.
  5. Click Restart to begin a new round; the score carries over.

You play as X. Click a cell to make your move. The computer plays O and uses Minimax (Hard) or random (Easy) strategy. Can you win?

Frequently asked questions

Can I beat the hard AI?
The hard AI uses Minimax and plays perfectly — the best you can do is draw. Try Easy mode for a beatable opponent.
How does Minimax work?
Minimax explores all possible future moves and picks the one that maximises the AI's chance of winning.