Hard Mode: The Unbeatable Computer
Hard mode uses the minimax algorithm - The same core idea behind classic game-playing AIs. Before every move, it checks every way the rest of the game could play out, then picks the best one. Tic tac toe is a solved game. That means a perfect player can never lose. The best you can do against Hard mode is force a draw.
What "Solved" Actually Means
A game is solved when someone has worked out the best move for every single position. For tic tac toe, that work is done: with perfect play from both sides, every game ends in a draw. Hard mode plays that perfect game every time, so it can never lose.
How Do You Draw Against Perfection?
Every game against Hard mode is winnable - As a draw - If you avoid three classic blunders.
1. Never Miss a Block
The moment you leave a line of two unanswered, Hard mode takes it instantly. The win check and block check routine has to be flawless here. Scan both your own line and the opponent's line, every single turn.
2. Respect the Fork Patterns
Hard mode's only path to victory is forcing a fork. Two key defenses stop it: answer a corner opening with the center, and when the computer holds two opposite corners against your center, reply with an edge, never a corner.
3. Don't Waste Moves
Every mark you place should sit on a line you could still win. A passive edge move hands control to an opponent that never gives it back.
- Win check. Do you have two in a row with the third square open? Take it.
- Block check. Does the computer have two in a row? Cover it now.
- Fork check. Would your move open two threats for the computer next turn? If so, play somewhere else.
A good ladder to climb: draw once, then draw from every one of the three opening types (center, corner, edge), then draw ten games straight. At that point you have mastered classic tic tac toe. It's a real skill: this is the same perfect play that OXO, the 1952 Cambridge computer game, first showed the world.
Life After Hard Mode
Once draws are routine, the classic board has taught you everything it can. But the game hasn't run out of challenges.
Where to Go Next
- Ultimate tic tac toe. Nine boards at once, unsolved in practice, and it rewards planning several moves ahead.
- 5×5 four-in-a-row. A bigger board that brings decisive wins back.
- Misère rules. The same game flipped upside down - Now you have to avoid making three in a row, so you'll need to unlearn what Hard mode just taught you.
How Hard Actually Plays: 50,000 Simulated Games
These aren't estimates. We ran the exact AI code behind Hard mode - Not a simplified stand-in - Through 50,000 games against a completely random opponent and another 50,000 against a mathematically flawless one, for all three difficulties. Here's what the full run found, difficulty by difficulty:
| Mode | vs Random Opponent win / draw / loss | vs Perfect Opponent win / draw / loss | Avg. Game Length |
|---|---|---|---|
| Easy | 36.8% / 11.1% / 52.1% | 0.0% / 3.1% / 96.9% | 7.43 moves |
| Medium | 84.8% / 14.0% / 1.2% | 0.0% / 80.6% / 19.4% | 6.71 moves |
| Hard ← this page | 78.0% / 22.0% / 0.0% | 0.0% / 100.0% / 0.0% | 7.04 moves |
A "perfect opponent" is a flawless minimax player - Which is precisely what Hard mode is. Want to confirm the draw-every-time record? The simulation that generated every number on this page is bundled in the site's source, free to run yourself.
What the Numbers Show
Across 50,000 simulated games against a random opponent and another 50,000 against a flawless one that plans every move - That's 100,000 games total - Hard mode has lost exactly zero.
- Vs. random play: it still wins 78.0% of the time and draws the rest.
- Vs. perfect play: it draws all 100.0%. Not one loss.
That isn't a marketing claim. It's what minimax guarantees on paper, and the simulation just shows the math holds up at scale.
A Real Captured Game
Against a flawless opponent: every square fills, nobody ever completes a line, and the game ends dead level after all nine moves.
Full board, no line anywhere. This is what "unbeatable" looks like in practice - Not a computer that wins every game, but one that can never be made to lose.
Hard Mode FAQ
Is Hard mode really unbeatable?
Yes. Hard mode uses the minimax algorithm to examine every possible continuation of the game before it moves, so it never makes a mistake. Since tic tac toe is a solved game where perfect play draws, the best possible result against Hard mode is a draw.
What's the point of playing an opponent I can't beat?
Forcing a draw against perfect play - Every game, from every opening - Is the real mastery test of tic tac toe. Hard mode punishes every slip immediately, which makes it the fastest teacher on the site. Draw ten in a row and you've genuinely mastered the game.
How does the Hard computer decide its moves?
It runs minimax: it simulates every legal move, every reply, and every counter-reply to the end of the game, scores the outcomes, and assumes you will always play your best move. It then picks the move with the best guaranteed outcome. Our math page explains the algorithm in plain English.