How to play Tic-Tac-Toe
The timeless 3-in-a-row duel — take on an AI that never loses, or dial it back to casual.
Tic-Tac-Toe is played on a three-by-three grid. You are X and move first; the computer is O. Take turns filling empty squares. The first to line up three of their own marks in a row, column or diagonal wins. If all nine squares fill with no line, the game is a draw.
That is the entire ruleset, and it takes about ten seconds to learn. What follows is the more useful part.
The game is solved
Tic-Tac-Toe has been completely solved. With correct play by both sides, every single game is a draw. There is no opening trick, no clever square, and no strategy that beats an opponent who does not make a mistake.
This is not a disappointing footnote — it is what makes the game worth understanding. Since you cannot win against correct play, winning means recognising the moment your opponent goes wrong, and not winning means you missed it. And since you cannot lose by playing correctly, learning the correct play means you will never lose again.
On Unbeatable, the computer searches every possible continuation with the minimax algorithm, so it genuinely cannot be beaten. A draw against it is a perfect result. On Casual it sometimes plays a random square instead, which is where real wins come from.
How not to lose, ever
Play these rules in order and you cannot lose.
First, if you have two in a line with the third square empty, take it and win.
Second, if your opponent has two in a line with the third square empty, block it.
Third, if you can make a fork — a move creating two separate lines of two at once — make it. Your opponent can only block one, so the other wins next move. This is how every genuine win in Tic-Tac-Toe happens.
Fourth, if your opponent could fork next move, stop it. Prefer blocking by making a two-in-a-row of your own, which forces them to answer instead of building their fork.
After that: take the centre if it is free, then an opposite corner to one your opponent holds, then any empty corner, and only then an edge.
The squares are not equal
The centre is the strongest square because it is part of four lines — both diagonals, the middle row and the middle column.
A corner is part of three. An edge is part of only two, which is why an edge is nearly always the weakest opening and why beginners who start on an edge lose far more often.
The opening that catches people out
If you open in a corner and your opponent replies anywhere except the centre, you have a forced win available. That is the single most common way a real game is won.
The classic trap runs: you take a corner, they take an edge, you take the opposite corner, and now you threaten two different lines at once. Similarly, if you take a corner, they take the centre, and they later take the corner opposite yours, taking one of the remaining corners forks them.
If you open in the centre, the only reply that draws is a corner. An edge reply loses.
Playing second
As O you cannot force a win, only a draw, and the way to hold it is simple: if X opens in the centre, take a corner. If X opens in a corner, take the centre. If X opens on an edge, take the centre. From there, block every two-in-a-row and refuse to hand over a fork, and the game ends level.
Controls
Click or tap a square to place your X. Get three in a row. Tab to a square, Enter or Space to play.
Strategy tips
- Take the centre when it is free. It sits on four of the eight winning lines, more than any other square.
- Play corners before edges. A corner is on three lines, an edge on only two, and most losses start with an edge opening.
- Check for your own win before anything else, then check for their win, in that order and every single turn. Most losses are a missed block rather than a bad plan.
- Learn the fork. Creating two threats with one move is the only way to actually win, because a single threat is always blockable.
- Block a threatened fork by making your own two-in-a-row. Forcing them to respond takes their fork move away without you having to guess which square it was.
- As X, open in a corner rather than the centre against a human. A corner opening gives an opponent more ways to go wrong, and a centre opening gives them only one correct reply to find.
- As O, answer a corner opening with the centre and a centre opening with a corner. Anything else loses to correct play.
- Against the Unbeatable setting, play for the draw and treat it as a win. It searches every continuation, so a draw is the best result that exists.
Now play Tic-Tac-Toe
Free, in your browser, with no download and no sign-up.
Play Tic-Tac-Toe →Tic-Tac-Toe is a board game and a longstanding classic. See all board games or browse the whole catalogue .
More rules and guides
-
Featured
Connect Four
Drop your discs and be the first to line up four in a row against a computer that actually plans ahead.
Board -
Reversi
Outflank the computer to flip its discs to your colour and own the most of the board when it fills.
Board -
Checkers
Jump and crown your way to victory in classic draughts against a computer that hunts for every capture.
Board -
Fleet Hunt
Hunt down the computer's hidden fleet grid by grid before it sinks yours — classic naval guesswork with a sharp AI.
Board