Strategy

Three in a row in Tic-Tac-Toe

0
Draws0
0

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

01

Take a square

On your turn, click any empty square to place your mark — ✕ or ◯.

02

Make three in a row

Get three of your marks in a line — horizontal, vertical or diagonal — to win the round.

03

Block your opponent

If they have two in a line, take the third square to block them before they complete it.

04

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?
No — the Hard AI plays perfectly using the minimax algorithm. The best possible result against it is a draw, so the goal becomes "never lose".
Can two people play?
Yes. Choose 2-player mode and pass the device back and forth, taking turns as ✕ and ◯.
Who has the advantage, X or O?
The player who goes first (✕) has a slight edge because they can claim the centre, but with careful play the game still ends in a draw.
What is the best first move?
Taking the centre square is strongest — it lies on four of the eight possible winning lines. A corner is the next best opening.
Is it free?
Yes, completely free with no ads or sign-up, like every game on UnicodeGames.