Tic Tac Toe rules
Tic Tac Toe, also called noughts and crosses, is played by two people on a 3×3 grid of nine squares. These five rules are the whole game:
- Choose who is X. One player is X and the other is O. X always moves first.
- Take turns. On your turn, place your mark in any empty square. Marks are never moved or removed.
- Make a line to win. The first player with three marks in a row wins on the classic 3×3 board. A row can run across, down, or diagonally.
- Block your opponent. When your opponent has two in a line with the third square empty, take that square or they win on their next move.
- Know when it's a draw. The round is a draw when the board fills up, or as soon as every possible line holds both marks, so nobody can win.
Tic Tac Toe rules for bigger boards
The same rules work on bigger boards; only the length of the winning line changes. Longer lines keep the game fair: four in a row on 4×4 and five in a row on 6×6 are proven draws with perfect play, while five in a row on 9×9 has no published perfect-play result.
| Board | Squares | In a row to win |
|---|---|---|
| 3×3 | 9 | 3 |
| 4×4 | 16 | 4 |
| 6×6 | 36 | 5 |
| 9×9 | 81 | 5 |
Each board has its own page with strategy tips: 4x4 Tic Tac Toe, 6x6 Tic Tac Toe, and 9x9 Tic Tac Toe.
How to play Tic Tac Toe on this site
Choose a board and an opponent under Game settings, next to the board. Changing a setting starts a new round.
- Board switches between 3×3, 4×4, 6×6, and 9×9.
- Computer lets you choose a difficulty and whether you play X (you move first) or O (the computer opens).
- 2 players is for two people sharing one device. X still moves first. See 2 player Tic Tac Toe.
Computer difficulty levels
- Easy picks a random empty square (on 6×6 and 9×9, one next to a mark already on the board). Good for learning the game.
- Medium always takes a winning square and always blocks a line that is one mark from complete. Otherwise it plays a random move half the time, like Easy, and a strong one the rest of the time, so a well-built fork can beat it.
- Hard on 3×3 looks ahead through every possible ending and never makes a mistake: you can draw, but not win. The bigger boards have far too many positions for that. There, Hard always takes a win or blocks a line one mark short, and otherwise spends about 0.3 seconds searching several moves ahead. On 6×6 and 9×9 it only considers squares within two steps of a mark. It is strong but not perfect.
Buttons and scores
- New round clears the board and keeps the score.
- Undo takes back your last move while the round is still open. Against the computer, it also takes back the computer's reply.
- Reset scores sets the scoreboard you're looking at back to zero. Each board size, opponent, and difficulty has its own scoreboard, saved in this browser.
Keyboard controls
- Tab moves into the board and out to the buttons.
- Arrow keys move between squares; Home and End jump to the ends of a row.
- Enter or Space places your mark.
- 1 to 9 play a square directly on the 3×3 board, counting left to right from the top row.
Next: learn how to win Tic Tac Toe
Knowing the rules is the easy part. To stop losing and start setting traps, read how to win Tic Tac Toe: the eight-step move checklist, forks, openings as X, and how O holds the draw.