Three in a row in Tic-Tac-Toe
Tic-Tac-Toe — noughts and crosses — is the classic 3×3 duel. Take turns placing your mark and be the first to line up three in a row across, down or diagonally. Play a friend pass-and-play, or test yourself against an AI that, on Hard, simply cannot be beaten.
How to play
Tic-Tac-Toe in 4 steps
Take a square
On your turn, click any empty square to place your mark — ✕ or ◯.
Make three in a row
Get three of your marks in a line — horizontal, vertical or diagonal — to win the round.
Block your opponent
If they have two in a line, take the third square to block them before they complete it.
Pick your opponent
Choose two-player pass-and-play, or play the AI on Easy, Medium or unbeatable Hard.
Controls
- Click / Tap
- Place your mark on an empty square
- Mode buttons
- Switch between 2-player and AI difficulties
- R
- Start a new round
Strategy
Tips to play better
Take the centre
The middle square sits on four of the eight winning lines — more than any other. If you go first, start there.
Watch the forks
A "fork" creates two winning threats at once so your opponent can only block one. Setting up forks is how you win against careful players.
Corners beat edges
When you can't take centre, grab a corner. Corners belong to three winning lines each; edges only two.
Perfect play draws
Against flawless defence, Tic-Tac-Toe always ends in a tie. Winning means waiting for your opponent to slip.
About Tic-Tac-Toe
Tic-Tac-Toe is ancient — versions of three-in-a-row games were played in the Roman Empire, and the modern grid was a fixture of British schoolyards as "noughts and crosses" long before computers existed. In 1952 it became one of the very first video games ever programmed, as OXO on the EDSAC computer.
Though it looks trivial, Tic-Tac-Toe is a perfect introduction to game theory. It is a "solved" game: with perfect play from both sides the result is always a draw, and the optimal strategy can be captured completely. That makes it the textbook example for teaching the minimax algorithm — the same idea that underpins AI for chess and Go.
Our Hard AI uses exactly that minimax search, so it plays flawlessly: the best you can ever do against it is force a draw. Drop to Medium or Easy for an opponent that makes human mistakes, or hand the device back and forth for two-player play. Marks are rendered as crisp Unicode ✕ and ◯ glyphs.
FAQ
Tic-Tac-Toe questions
Can you beat the Hard AI?
Can two people play?
Who has the advantage, X or O?
What is the best first move?
Is it free?
Keep playing