Game Theory

Game Theory and Tic-Tac-Toe: Why Perfect Play Always Draws

By LK Forge  ·  4 min read

Tic-Tac-Toe is the first "serious" game most of us ever lose. It's also one of the cleanest examples in all of game theory — a complete, two-player, zero-sum game of perfect information, small enough to analyse by hand yet rich enough to teach the same ideas that power chess engines and economic models. This is what's really happening every time you draw an X.

It's a Game You Can Put in a Matrix

In a standard 3×3 game, two players alternate placing X's and O's. The game ends when someone gets three in a row in any direction, or when the board fills up — whichever comes first. Because every outcome can be scored, you can describe the whole thing with a payoff matrix: winning is the best payoff, losing is the worst, and a tie sits in between — better for both players than a loss.

The interesting part is that neither player has a dominant strategy. There is no single move that is best no matter what your opponent does. Instead, the right move depends entirely on where the other player has already placed their marks. Tic-Tac-Toe is a game of reaction.

The Minimax Principle

So how should a rational player choose? With the minimax idea: minimise your maximum possible loss while maximising your own chance to win. Each player simultaneously wants to push their own odds up and the opponent's odds down. Two concrete tactics fall straight out of this:

💡 The fork is the whole game. Almost every Tic-Tac-Toe win comes from creating a double threat the opponent can't answer in one move. Almost every loss comes from failing to block one.

Symmetry and the Decision Tree

Because the board is highly symmetrical, the number of genuinely different games is far smaller than it first appears — many openings are just rotations or reflections of each other. A simulator can therefore build a complete decision tree of every meaningful position and label each branch a win, loss, or draw. Once that tree exists, "playing well" is simply reading off the branch that minimises loss.

Why It Always Ends in a Tie

Here's the punchline game theory delivers: when both players play optimally, 3×3 Tic-Tac-Toe is a guaranteed draw. The game is "solved" — its equilibrium outcome is a tie. That's exactly why you stopped playing it as a kid: once everyone learns to take the centre, block threats, and watch for forks, nobody can win. The only way to win is for someone to make a mistake.

Completed 3x3 tic-tac-toe board where both sides played optimally against the Hard AI, ending in a draw with no three in a row
The equilibrium in the flesh: a full game against Hard, both sides playing optimally, ends with every line blocked — a guaranteed draw, exactly as the theory predicts.

That single fact is also why bigger boards are more fun. On the 4×4 through 10×10 boards in our game, the tree of possibilities explodes far beyond what a person can hold in their head — so mistakes, surprises, and real wins come back.

Inspired by the Cornell INFO 2040 Networks course post "Game Theory: Winning Tic-Tac-Toe." Want the practical version? Read our Tic-Tac-Toe strategy guide, or see how a computer applies minimax in How the AI Opponent Thinks.

PLAY NOW