Tic Tac Toe
Get three in a row against the computer: Easy, Medium, or unbeatable Hard.
How to play Tic Tac Toe
You are X and always move first; the computer is O. Click any empty square to place your mark. Get three of your marks in a row (horizontally, vertically, or diagonally) before the computer does.
- Easy plays randomly, Medium blocks your wins, and Hard is unbeatable: the best you can do is a draw.
- Use New game to start over at any time.
How to never lose at Tic Tac Toe
Tic Tac Toe is a solved game, which means perfect play by both sides always ends in a draw. Since you are X and move first on Inkplay, you hold the advantage: you can never lose if you follow a simple rule set, and you can beat the weaker difficulties outright. The single most important decision is your first move: take a corner, not an edge. A corner opening gives you the most ways to build a line and quietly sets traps that a careless opponent walks straight into on the following turn. The game is also tiny in a way that is fun to know: counting move orders, there are exactly 255,168 possible games, collapsing to 26,830 once rotations and reflections merge. Small enough for a machine, or a motivated human, to know all of it.
How to beat Easy and Medium
The Easy computer moves at random and Medium only blocks your immediate wins, so both can be beaten by creating a fork, a position where you threaten two separate lines at once and your opponent can only block one of them:
- Open in a corner; if the computer replies anywhere but the center, you can usually force a fork.
- Always take a winning move when you have one, and always block the computer's three-in-a-row threat.
- Set up two intersecting threats that share one empty square. That shared square is your fork.
- Against Medium, prefer moves that block its plan and build toward your own line at the same time.
- When you play second, grab the center: it sits in four of the eight possible winning lines.
Here is the classic trap played out. Open in the top-left corner. Suppose the computer takes the center, the strongest reply. Answer in the bottom-right corner, so your two marks bracket the long diagonal. If the computer now grabs the remaining corner, it has already lost: you take the bottom-left, and suddenly the bottom row and the left column both threaten to complete. One block cannot cover two lines. The only saving reply to your opposite-corner setup was a quiet edge square, and quiet edge moves are precisely what the weaker difficulties never find. Run this sequence a few times and watch how often the corner grab appears; the fork practically plays itself. And if the computer skips the center entirely on its first reply, your job gets easier still: take the center yourself, and with the middle plus two corners in hand you can normally manufacture two threats inside the next two moves.
Why Hard can never be beaten
The Hard computer plays perfectly, evaluating every possible continuation all the way to the end of the game, a tree small enough to search completely. Because Tic Tac Toe is a guaranteed draw under perfect play, the best result you can force against Hard is a tie. If you make even one inaccurate move it will punish you at once, so treat every game against Hard as a puzzle in not losing rather than in winning. It is genuinely useful practice: the habits that draw against Hard, blocking early, refusing bad edges, seeing forks a move ahead, are exactly the ones that win instantly on Medium.
Origins, Romans, and Tinkertoys
Games of three-in-a-row date back to ancient Rome, where grids for a game called terni lapilli were scratched into paving stones across the empire, though scholars suspect many of those boards belonged to its cousin three men's morris, in which the pieces move around after being placed. The name noughts and crosses is the traditional British term, a nought being the zero-shaped O. The game's small size made it a landmark in computing history: in 1952 A.S. Douglas at Cambridge wrote OXO, a perfect noughts-and-crosses player for the EDSAC computer and one of the earliest video games ever made. In the 1970s, MIT students led by Danny Hillis went the other way and built a computer out of Tinkertoy parts that plays the game flawlessly, a wooden contraption that ended up in a museum. And the 1983 film WarGames closes on a military computer learning from tic-tac-toe that some games cannot be won. Bigger cousins like Connect Four, Gomoku, and Ultimate Tic-Tac-Toe extend the same line-making idea onto larger boards, where the guaranteed draws finally stop.
Tic Tac Toe leaderboard
Top scores. Log in to compete.
- Loading leaderboard…
Tic Tac Toe: frequently asked questions
Can you beat the computer at Tic Tac Toe?
On Easy and Medium, yes. On Hard the computer plays perfectly, so the best possible result is a draw.
Is Tic Tac Toe free to play?
Yes. It is completely free, with no download and no sign-up.
How do you always win or draw at Tic Tac Toe?
Take the center or a corner first, always block the opponent’s two-in-a-row, and look for moves that create two threats at once.
Can the first player always win at Tic Tac Toe?
Not against perfect play. Two flawless players always draw. But since you move first as X, you can and should beat the Easy and Medium computer, which do not defend perfectly.
What is the best opening move?
A corner. It sits in three winning lines and creates more chances to build a fork than an edge does. Taking a corner also pressures a weaker opponent into an early mistake.
Why can't I beat the Hard computer?
Hard plays perfectly by checking every possible continuation, and Tic Tac Toe is a solved draw. The best result you can force against it is a tie, so treat Hard as a test of not losing.
What is a fork in Tic Tac Toe?
A fork is a single move that creates two winning threats at once. Your opponent can only block one of them, so you complete the other next turn. Forks are how you beat imperfect play.
How many possible games are there?
Counting move orders, 255,168 distinct games exist, shrinking to 26,830 once mirrored and rotated duplicates merge. That tiny size is exactly why the Hard computer can check everything and never lose.
Does the computer ever slip up on Hard?
No. Hard never makes a mistake, because the game is small enough to solve completely. Any win you manage against the computer will have come from the Easy or Medium setting.
Is Tic Tac Toe free to play?
Yes. Tic Tac Toe is completely free on Inkplay, with no download, no sign-up, and no in-game purchases. Open the page and play instantly on desktop or mobile.
Can I play Tic Tac Toe unblocked?
Yes. Tic Tac Toe runs entirely in your browser with no download, install, or plugins, so it loads instantly and keeps working even on school or work networks where bigger game sites get blocked.
More games to play
In the mood for more? Try Chess, Connect Four, Reversi, Checkers, or browse all board games and the full games list on Inkplay.