The Best First Move in Tic-Tac-Toe, and Why You Still Can’t Win
By Lucian — builder & engineer, LK Forge
Tic-tac-toe is small enough to solve completely, so we did: we walked all 255,168 games and counted every outcome. Two things fall out. Between two perfect players it is a forced draw — nobody can ever win, which is exactly why you can’t beat the computer. But the moment play is imperfect the game is lopsided: the first player wins 51% of all games, and the strongest opening isn’t the corner most people reach for — it’s the center.
· 5 min read · exact, from a full game-tree enumeration · Updated September 2026
How we counted it
These are not estimates. Tic-tac-toe has so few positions that a computer can walk the entire game tree — every legal sequence of moves, from the empty board to a win or a full grid — in a fraction of a second. So instead of playing a sample of games we enumerated all of them, stopping each line the moment a player made three in a row (as the game actually ends), and tallied who won.
The total comes out to 255,168 games — 131,184 first-player wins, 77,904 second-player wins, 46,080 draws. That figure is the long-published census of the solved game, so reproducing it exactly is our proof that the enumeration is right rather than subtly miscounting. Everything else here — the opening-square splits, the random-vs-random outcome, the forced-draw result under optimal play — comes from the same exhaustive walk.
Going first is a real edge
On a nine-square board the first player places five of the marks to the opponent’s four, always reaching new threats a move ahead. Over every possible game that shows up as a 1.7-to-1 win ratio in the first player’s favour — and if both sides just move at random, it barely changes, with draws collapsing to one game in eight.
Outcome share across all 255,168 games (solid) and for two random players (faded). The first player leads in both; draws are the minority outcome unless play is skilled.
Why the center is the strongest opening
Each square belongs to a different number of winning lines. The center is on four — its row, its column and both diagonals; a corner is on three; an edge on only two. More lines through your first mark means more ways to make a threat, and the win counts follow exactly: games opened in the center are first-player wins 60.5% of the time, a corner 52.8%, an edge just 48.1%.
First-player win share by opening square, over all games from that opening. The center leads because it touches the most winning lines. (A corner is the sharper trap against certain experienced opponents — but by raw win count, the center is strongest.)
Every number
| Games counted | Count | First player | Second player | Draw |
|---|---|---|---|---|
| All games | 255,168 | 131,184 · 51.4% | 77,904 · 30.5% | 46,080 · 18.1% |
| Open on center | 4 lines | 60.5% | — | — |
| Open on corner | 3 lines | 52.8% | — | — |
| Open on edge | 2 lines | 48.1% | — | — |
| Two random players | weighted | 58.5% | 28.8% | 12.7% |
| Both play perfectly | — | 0% | 0% | 100% (forced draw) |
Exact counts from a full game-tree enumeration, 10 September 2026. Games are counted as move-orders; opening rows give the first player’s win share among all games from that opening.
So how do you never lose?
The census says the game is won and lost on mistakes, so avoiding your own is the whole job. Two rules cover almost all of it: always take a winning move if you have one, and always block your opponent’s three-in-a-row threat if they have one. The rest is about forks — positions with two threats at once, which cannot both be blocked. Open in the center or a corner, watch for a move that makes two threats, and deny your opponent theirs, and you will draw every game you don’t win.
That is precisely the strategy the LK Forge Tic-Tac-Toe AI follows — it searches the same game tree we enumerated here and picks a move that can never lead to a loss. Which is why the honest answer to “how do I beat the computer?” is: you don’t. You play for the draw, and hope it’s you who moves first against a human. If you want the algorithm itself, watch it think in the minimax explainer.
Reproduce it yourself
The whole census is a dozen lines of dependency-free code — walk every move, count the leaves. If it prints 131184 77904 46080, you have reproduced the solved game.
const LINES = [[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];
const win = b => LINES.some(([a,c,d]) => b[a] && b[a]===b[c] && b[a]===b[d])
? b[LINES.find(([a,c,d]) => b[a] && b[a]===b[c] && b[a]===b[d])[0]] : null;
const tally = { X: 0, O: 0, D: 0 };
function walk(b, player) {
const w = win(b);
if (w) { tally[w]++; return; }
const empty = [...b.keys()].filter(i => !b[i]);
if (!empty.length) { tally.D++; return; } // full board = draw
for (const i of empty) { b[i] = player; walk(b, player === 'X' ? 'O' : 'X'); b[i] = 0; }
}
walk(Array(9).fill(0), 'X');
console.log(tally.X, tally.O, tally.D); // 131184 77904 46080 Tag each game by its first move to get the opening-square splits, or plug in a minimax player to confirm the forced draw. Then go lose to the tic-tac-toe engine yourself.
Try to beat the draw
Play the unbeatable engine free in your browser — open in the center, hunt for a fork, and see how far you get.