Tic-Tac-Toe
Play Tic-Tac-Toe against a smart computer AI in your browser. Can you win?
How to play
- You are X — click any empty cell to place your mark.
- The CPU (O) responds immediately after your move.
- Get three in a row — horizontal, vertical, or diagonal — to win.
- Use Easy mode for a beatable random opponent, Hard for a perfect AI.
- 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.