Tic-Tac-Toe has been completely analyzed — every one of its 5,478 distinct board positions has a known optimal outcome. This article walks through the game from start to finish under perfect play, explaining the best responses at each stage and why they inevitably lead to a draw.


The Numbers Behind the Game

Before diving into specific positions, here are the key statistics:

  • 9 — squares on the board
  • 8 — winning lines (3 rows, 3 columns, 2 diagonals)
  • 5,478 — distinct legal board states
  • 255,168 — distinct complete game sequences
  • 362,880 — maximum permutations of 9 moves (9!), of which many are illegal

Of all 255,168 possible games, X wins about 51.3%, O wins about 30.5%, and 18.1% end in draws. These percentages include all possible play, not just optimal play. Under perfect play, every single game is a draw.


Opening Move Analysis

Due to the board’s symmetry, there are only three meaningfully different first moves for X: center, corner, or edge. Rotations and reflections make all four corners equivalent, and all four edges equivalent.

Center Opening (Optimal)

The center participates in four winning lines — more than any other square. After X takes the center:

  • If O takes a corner, X should take the opposite corner. The game proceeds to a draw with correct play.
  • If O takes an edge, X can create a fork. This is O’s worst response — it gives X a genuine chance to win against imperfect defense.

Corner Opening (Strong)

A corner is the second-best opening. It participates in three winning lines. After X takes a corner:

  • O’s best reply is the center. From there, careful play by both sides leads to a draw.
  • If O avoids the center, X can often engineer a fork.

Edge Opening (Weakest)

An edge participates in only two winning lines. While X can still draw from an edge opening, the position offers the least flexibility and the fewest fork opportunities.


The Second Move — O’s Critical Decision

O’s response to X’s first move is the most consequential moment in the game. The optimal replies are:

X Opens In O’s Best Reply Outcome with Perfect Play
Center Any corner Draw
Corner Center Draw
Edge Center Draw

The pattern is clear: O should almost always take the center when it is available, or a corner when it is not.


Moves Three and Four — The Fork Window

Moves three and four are where the game’s tactical richness peaks. This is the window where forks are created or prevented.

X’s third move should aim to set up a fork — a position with two simultaneous threats. If X opened in the center and O responded with an edge, X can nearly always find a corner that creates an unavoidable double threat.

O’s second move (move four overall) must prioritize blocking any potential fork. If O can occupy a square that disrupts both of X’s possible forks, the game remains on track for a draw.


Moves Five Through Nine — Forced Sequences

By the fifth move, the game is typically on rails. Either:

  1. A fork exists, and the forking player is about to win.
  2. All forks have been blocked, and both players fill the remaining squares in a sequence forced by blocking obligations.

In scenario two — which is the perfect-play scenario — each move is a forced block or a neutral fill. The board fills up with neither player achieving three in a row.


A Complete Perfect-Play Example

Here is one line of perfect play from start to draw:

  1. X → Center (strongest opening)
  2. O → Top-left corner (correct response)
  3. X → Bottom-right corner (opposite corner, maintaining symmetry)
  4. O → Top-right corner (blocks X’s diagonal fork potential)
  5. X → Bottom-left corner (forced block of O’s top-row threat)
  6. O → Center-left edge (blocks X’s left-column threat)
  7. X → Center-right edge (blocks O’s right-side threat)
  8. O → Bottom-center edge (blocks X’s bottom-row threat)
  9. X → Top-center edge (fills last square)

Result: Draw. Every square is filled, no three in a row for either player.


Why Draws Are Inevitable

The fundamental reason perfect play always draws is mathematical: X has the initiative (moves first and makes more total moves), but O has sufficient defensive resources to block every threat before it becomes a fork. The board is small enough that O always has time to respond. Neither player can build a two-move lead in any single line.

This balance breaks in larger or more complex variants. In 4×4×4 three-dimensional Tic-Tac-Toe, for example, the first player can force a win because the increased number of winning lines overwhelms the second player’s ability to block.


Practical Takeaway

Understanding perfect play gives you a roadmap for every situation. If your opponent deviates from optimal play at any point, you can punish the mistake — often by creating a fork. If your opponent also plays perfectly, you can relax knowing the draw is guaranteed. Either way, you will never lose.

For the algorithmic details behind this analysis, see our article on minimax and game theory.