Tic-Tac-Toe
Play X/O against an unbeatable AI.
Tic-Tac-Toe at a glance
Tic-Tac-Toe is a free online game you can use right now to play X/O against an unbeatable AI — no account, no install and no usage limit. It runs entirely inside your browser, so whatever you enter stays on your own device.
- Price
- Free — no trial, no paid tier, no watermark
- Sign-up
- Not required
- Where it runs
- In your browser — nothing is uploaded to a server
- Works on
- Chrome, Safari, Firefox and Edge — desktop, tablet and phone
- Category
- Games
Your turn (X)
You're X. The AI uses minimax — it's unbeatable, so aim for a draw!
About Tic-Tac-Toe
Play X against a computer opponent that uses the minimax algorithm to evaluate every possible continuation and choose an optimal move.
You cannot win. That is not a difficulty setting — Tic-Tac-Toe is a solved game, meaning the outcome under perfect play from both sides is known, and it is a draw. The board is small enough that a computer can search every position to the end of the game, so the AI never makes a mistake for you to exploit. Every game you play well ends in a draw, and every game you play imperfectly ends in a loss.
That makes drawing the actual objective, and it is a genuinely useful exercise. Achieving a draw reliably means recognising every threat one move before it completes and understanding which openings create two threats at once — a fork, which is unanswerable because blocking one completes the other.
The practical principles: take the centre when it is available, since it is part of four winning lines while a corner is part of three and an edge only two. Block any line where your opponent has two marks and a gap. And watch for moves that create two threats simultaneously, both to make them and to prevent them — that is where games are actually decided.
How to use Tic-Tac-Toe
- Click a square to place your mark.
- Take the centre when available, and block any two-in-a-row immediately.
- Watch for forks — moves creating two threats at once — from both sides.
Frequently asked questions
Can I beat the AI?
No. It uses minimax to play optimally, and Tic-Tac-Toe is a solved game where perfect play from both sides always draws. A draw is the best available result and means you also played perfectly.
What is minimax?
An algorithm that searches every possible continuation, assuming both players play optimally, and picks the move with the best guaranteed outcome. Tic-Tac-Toe is small enough to search completely, so the AI never errs.
What is a fork?
A move creating two winning threats at once. It is unanswerable, because blocking one lets the other complete. Creating and preventing forks is where the game is genuinely decided.
Is the centre really the best opening?
Yes. The centre square is part of four winning lines, a corner three and an edge only two, so it offers the most opportunities and blocks the most.