Block two in a row
X must take the top-right square. Creating a new threat elsewhere would let O win across the top row.
Play free against the computer or with another person on the same device—no download, account, or sign-up required.
Vs Computer · Medium · saved on this device
Two players alternate placing X and O on a 3×3 grid. X traditionally goes first; the Vs Computer options can change the starting side. The first player to complete a horizontal, vertical, or diagonal line of three marks wins. If all nine squares fill without a winning line, the round is a draw.
Vs Computer: choose Easy, Medium, or Unbeatable in Options, then tap an empty square. 2 Players — Same Device: share this screen and take turns; this is pass-and-play, not remote online multiplayer.
The dashed square is the recommended move. “Load this position” opens the example as a two-player practice board.
X must take the top-right square. Creating a new threat elsewhere would let O win across the top row.
Bottom-left gives X two next-move threats: the left column and bottom row. O can block only one.
When X owns opposite corners and O has the centre, O should take a side—not another corner—to avoid an X fork.
O can occupy either empty square without opening a winning line. X fills the last square, so careful defence secures a draw.
Chooses randomly from every valid empty square. It does not deliberately win or block.
Takes an immediate win, blocks your immediate win, then prefers the centre, corners, and sides. It does not search the full game tree.
Uses minimax with alpha–beta pruning to check every legal continuation. It cannot be beaten; perfect play against it ends in a draw.
The game runs entirely in your browser and sends no moves, names, or records to a game server. Preferences and records by opponent and difficulty are stored in local browser storage when available. Reset Records clears those results on this device.
Noughts and crosses has long been used to introduce game trees and decision-making. Donald Michie’s 1963 paper described a trial-and-error device that learned the game with matchboxes and coloured counters. A commonly quoted count of 255,168 refers to possible complete game sequences, not “legal positions.”
For a short classroom activity, ask learners to identify all eight winning lines, explain why a move blocks a threat, or compare the choices made by Medium and Unbeatable.
Sources: Wolfram MathWorld: Tic-Tac-Toe; Michie, The Computer Journal (1963); University of Göttingen: MENACE; IEEE CIG 2006 proceedings. Reviewed 18 July 2026.
Yes. The game is free to play, with no download, payment, account, or sign-up required.
Choose 2 Players — Same Device, then take turns placing X and O on this device. It is local pass-and-play, not a remote online room.
No. Unbeatable checks the complete game tree with minimax. Perfect play can force a draw, but the computer will not lose.
X always moves first in two-player mode. Against the computer, open Options to choose whether you, the computer, or alternating sides start.
Against the computer, Undo normally removes your move and the computer reply. In two-player mode it removes one move. After a result, Undo also reverses that result in the saved record.
Yes, when browser storage is available. Records and preferences stay only on this device and can be reset from Options.
Yes. The board scales to narrow phone screens and supports touch without horizontal scrolling.
Yes. Tab enters the board, arrow keys move between squares, and Enter or Space places a mark. Number keys 1–9 also choose squares from top left to bottom right.