Classic 3 by 3 or Ultimate with nine boards. Play an unbeatable computer, an easier one, or two players on one screen. Undo, score tally, keyboard play.
Tic Tac Toe is played by taking turns to place X or O on a 3 by 3 grid, and the first player to line up three of their marks in a row, a column or a diagonal wins. If all nine squares fill with no line, the game is a draw. On this page X always moves first unless you pick O first. Against the computer you are X, so choosing O first lets the computer open. In 2 players mode both players share one screen and the status line says whose turn it is. The tally under the options counts X wins, draws and O wins for this page visit only: reloading the page or pressing Reset sets it to zero. A game in progress is saved, so closing the tab does not lose it. Undo takes back your last move, and against the computer it also takes back the computer's answer, so you are on the move again; it is off once a game has ended. A winning line is outlined and filled so it shows without colour.
Easy plays a random square about a third of the time. Otherwise it takes a winning square if it sees one, and blocks you only about half the time, so it makes mistakes you can use. Medium takes a win if it has one, blocks your win, then prefers the centre, then a corner. It never plans a fork, a move that makes two threats at once, so a fork beats it. Unbeatable searches every continuation of the game to the end and picks a move that cannot lose. Classic Tic Tac Toe has 255,168 possible games: 131,184 won by X, 77,904 won by O and 46,080 drawn. With best play from both sides every game is a draw, so the most you can get from Unbeatable is a draw. Its first move is a random corner or the centre, because all of them draw, so it does not play the same game every time.
Ultimate has nine small boards in a 3 by 3 pattern, each a normal Tic Tac Toe board. The first player may play in any square of any board. After that, the square you play inside a small board decides which small board your opponent must play in next: if you play the top-right square, your opponent must play in the top-right board. If the board you are sent to is already won or completely full, your opponent may play in any open board. Three in a row inside a small board wins that board, and it is marked with a large X or O. Once a board is won, nobody can play in it any more, even if it has empty squares. A small board that fills with no line is dead: it counts for nobody. You win the game by winning three small boards in a row, column or diagonal. If every board is decided and nobody has three boards in a row, the game is a draw. The status line names the board you must play in, and the playable boards have a dashed outline.
In Ultimate, Easy plays random legal moves but takes a small board half the time when it can. Medium looks two moves ahead. Hard looks up to six moves ahead, stopping when it has examined about 30,000 positions, and scores each position by the boards won, the boards that could still make a line, and the weight of the centre and corners. Hard is strong but it is not a solved game player, so it can be beaten. Useful ideas: the square you play is also the board you send your opponent to, so avoid sending them to a board where they can win at once, and try to send them to a board that is already full or won only when that suits you, because it gives them a free choice. Winning the centre board is worth more than a side board, because it sits on four of the eight board lines.
Tap or click a square to play. With a keyboard, Tab moves to the board, the arrow keys move between squares and Enter or Space places your mark. In Classic the number keys work like a number pad: 7 8 9 are the top row, 4 5 6 the middle row and 1 2 3 the bottom row, so 5 is the centre. On a phone, Ultimate shows one small board at a time, large enough to tap: you are zoomed into the board you must play in, or you tap a board to zoom into it when you may choose, and All boards shows the whole grid. The status line is read out by screen readers. Your options, the game in progress for each setup and your record against the computer are saved in this browser and never uploaded; the session tally resets when you reload.
No. Unbeatable searches the whole game to the end, so it never loses; the best result against it is a draw. To win, play Medium: it blocks and takes wins but never plans a fork, so look for a move that makes two threats at once, and it cannot stop both.
Nobody: with best play from both sides every game is a draw. Of the 255,168 possible classic games, 46,080 end in a draw, 131,184 are won by X and 77,904 by O, and all the wins come from at least one player making a mistake.
Nine small boards form a 3 by 3 grid. The square you play inside a small board is the board your opponent plays in next. Win three small boards in a row to win the game. A small board that fills with no line counts for nobody, and if no one gets three boards in a row the game is a draw.
You may play in any open board. A board is open if nobody has won it and it still has an empty square. The status line shows Play in any open board, and every open board gets a dashed outline.
Choose 2 players. X moves first unless you pick O first, then you take turns on the same screen. The status line names the player to move, Undo takes back one move, and the tally keeps X wins, O wins and draws until you reload the page.
No. The game is processed in your browser and not uploaded. Your mode, opponent, level, who starts, the game in progress and your win record against the computer are saved in this browser's local storage; the session tally is not. The page counts visits with Google Analytics, never your moves.