How to play Tic-Tac-Toe
- Choose a mode. Against the computer you are X; in two-player mode you take turns as X and O.
- Click or tap an empty square to place your mark. Squares are buttons, so the keyboard works too: Tab to a square and press Enter.
- Line up three of your marks horizontally, vertically or diagonally to win. If all nine squares fill with no line, it is a draw.
- Press Next round to play again. The starting player alternates each round.
Tips
- Take the centre if it is free; it belongs to four winning lines. Corners belong to three, edges to only two.
- Against an opponent who opens in a corner, answer in the centre; against a centre opening, answer in a corner.
- Look for a fork: a move that creates two winning threats at once. Your opponent can only block one.
- The unbeatable computer never loses. Every game against it is a draw at best, which makes it a good way to learn perfect play.
About Tic-Tac-Toe
Grids for three-in-a-row games appear in Roman ruins, and the modern game was one of the first ever programmed on a computer: OXO, written for the EDSAC in 1952. With only 255,168 possible games, it is fully solved, and two perfect players always draw.
The unbeatable mode here uses a complete minimax search, so it sees every possible continuation. The easy mode takes obvious wins and blocks, but otherwise plays randomly.
Scores and preferences for this game are stored only in your browser's local storage. Nothing is sent to a server and no account is needed. Browse all games.