How to play Tic-tac-toe

1 player vs computer, or 2 online

Play Tic-tac-toe now

Get three of your marks in a row — across, down or diagonally — on a three-by-three grid, before your opponent does.

The rules, step by step

  1. 1

    The grid is three squares by three. You play crosses; the computer plays noughts.

  2. 2

    Take turns. On your turn, tap any empty square to put your mark in it.

  3. 3

    The first player to fill a whole line of three — a row, a column or one of the two diagonals — wins.

  4. 4

    If all nine squares are filled and nobody has a line, the game is drawn.

  5. 5

    The opening move alternates between games, so a run of losses is never just a run of second moves.

Three tips that change how you play

The fork, worked through

You open in the top-left corner. Your opponent answers on an edge — say the middle of the top row — instead of taking the centre. You take the centre. They block your diagonal by taking the bottom-right corner. Now you play the bottom-left corner, and look at what you have: crosses on top-left, centre and bottom-left. The left column is yours with two of three and the top-left-to-bottom-right diagonal is blocked, but the bottom-left-to-top-right diagonal is now yours with two of three as well. Two lines, each one square from finishing, and the squares are different. They block one; you play the other and win. Nothing clever happened. They gave up the centre on move two, and every game where that happens ends the same way.

Three mistakes that cost beginners the game

Building your own line and forgetting to look at theirs.
Every turn, check their two-in-a-rows before your own. Taking your own win beats blocking theirs, but only if the win is actually there this turn — otherwise blocking comes first. This is the mistake that loses more games than every other one put together.
Opening on an edge.
An edge square sits on two lines and gives the opponent the centre. Open in the centre, or in a corner if you want to play for the two-corner fork. There is no plan that starts with an edge.
Assuming a draw means you played well.
Against the hard opponent it does. Against easy it means you missed something: easy does not block at all, so any two-in-a-row you build should finish. If you are drawing with easy, you are answering its moves instead of making your own.

Common questions about Tic-tac-toe

Can the hard computer really not be beaten?

No, and that is a property of the game rather than of this site. Noughts and crosses has been solved for a long time: with best play from both sides it is always a draw. The hard opponent searches the whole game before every move, so the most it will ever do is draw — and it takes any mistake you make.

Is it better to go first?

Yes, but it is not decisive. The first player has more chances to set up a fork, and against imperfect play that is worth a lot. Against perfect play it is worth nothing at all: the game is still a draw. The opening move alternates here so neither side keeps the advantage.

What is the difference between the three levels?

Easy takes a line it has already built and does not block yours. Medium wins where it can, blocks where it must, and otherwise takes the best free square — it is beaten by a fork and by nothing else. Hard searches every position and cannot be beaten.

Ready to play Tic-tac-toe?

Free, in your browser, on any device. Nothing to install and no account needed.

Start a game