Tic Tac Toe in the sand — with an AI that never blinks
Tic Tac Toe (also called noughts and crosses) is the world's most-played pencil-and-paper game, and this free browser version draws the grid right into the beach. Face Corporal Claws 🦀 on three difficulties — including a genuinely unbeatable Impossible mode — or pass the phone to a friend for 2-player hotseat. No download, no sign-up.
Complete rules
- Controls: 👆 tap any empty SQUARE to place your mark, and pick an opponent with the 🌊 EASY 🏖️ NORMAL 🌋 IMPOSSIBLE 👥 2 PLAYERS chips above the board. Works the same with mouse or touch.
- On a 3×3 grid, one player marks ✕, the other ◯, taking turns on empty squares.
- Line up three of your marks in a row — across, down or diagonally — to win; the line glows gold.
- Fill all nine squares with no line and it's a draw — the tide sweeps in and washes the board clean.
- The starting player alternates each game; whoever starts plays ✕ (X always moves first).
How the AI works — and why perfect play always draws
Impossible mode uses minimax, a classic game-theory algorithm. Before every move it explores the full tree of possible futures — every reply and counter-reply, to the end of the game. Each future is scored: an AI win positive, a loss negative, a draw zero. Assuming you also play perfectly, it picks the move with the best guaranteed outcome. Tic Tac Toe is small enough to solve completely, so this AI cannot blunder — which reveals the game's famous secret: when both sides play perfectly, Tic Tac Toe is always a draw. Every "victory" is really the other player's mistake. Normal mode instead follows human-style rules (win if you can, block if you must, prefer centre and corners), and Easy mostly guesses — perfect for kids.
Winning strategy tips
- Open in a corner, not the centre. A corner opening leaves an unwary opponent seven losing replies.
- Going second? Take the centre — it's the only reply that survives a corner opening.
- Build a fork — two winning lines at once. Only one can be blocked.
- Block forks early: if your opponent owns two opposite corners, answer with a side square, never a corner.
- Scan in order: can I win? Must I block? Can I fork? Then centre, opposite corner, any corner, any side.
- Against Impossible, play for the draw — keep blocking and it can never beat you.
Fun history facts
Grids for the Roman game terni lapilli are scratched into ruins across the old empire, and three-in-a-row boards appear in ancient Egypt. In 1952, OXO — a Tic Tac Toe program on Cambridge's EDSAC — became one of the first video games in history, and in 1961 Donald Michie built MENACE, a "computer" of 304 matchboxes full of beads that taught itself the game — a grandparent of machine learning.
FAQ
Can I beat the Impossible difficulty?
No — Impossible uses the minimax algorithm and checks every possible future before moving. The best you can get is a draw.
What's the difference between the difficulties?
🌊 EASY plays mostly random moves. 🏖️ NORMAL follows human rules: win if possible, block, take the centre, then corners. 🌋 IMPOSSIBLE calculates every outcome and never errs.
Can I play against a friend?
Yes — choose 2 Players for hotseat mode and take turns on the same device.
Is it free, and does it work on mobile?
Completely free, no download, no sign-up — built for touch and any modern browser.
Do my scores save?
Your wins, losses, draws and best streak save automatically in local storage. Clearing site data erases them.