With perfect play from both sides, Tic-Tac-Toe always ends in a draw — making it a great introduction to game theory and the concept of a "solved" game.
Tips
Setup and grid
A 3×3 grid. Squares are usually numbered 1–9 (top-left to bottom-right) or referenced as corner, edge, or center. X always moves first and has a slight theoretical advantage. A win is three of your marks in a row — horizontal, vertical, or diagonal. If all nine squares fill with no three-in-a-row, the game is a draw.
History
Tic-Tac-Toe is one of the oldest games in continuous play. The Romans played a version called terni lapilli ("three pebbles at a time") whose grid markings have been found scratched into stone surfaces across the empire. Egyptian inscriptions from earlier still show what may be the same game. The 3×3 grid is the smallest board on which a meaningful strategic game can exist — and it remains a foundational teaching tool for game theory, AI search, and the concept of solved games.
Tic-Tac-Toe is a solved game — with perfect play from both sides, every game is a draw. This makes it perfect for studying strategy because there's a known correct move from every position. Most beginners lose to the same handful of patterns: missed forks, missed blocks, and the corner trap from the center.
As X, the strongest first move is the center. The opponent must respond with a corner; any other reply lets X force a win. After O takes a corner, X plays the opposite corner — this sets up multiple fork threats. Edges are the weakest opening squares for X and often allow O to draw.
As O, the rule is "always block, never lose to a fork." If X opens center, take a corner. If X opens corner, take center — corners and edges both lose. The hardest fork to spot is the L-shaped fork: two of your opponent's marks form an L around an empty corner. That empty corner creates two threats and is the move you must prevent.
Why does the game always tie with good play?
Tic-Tac-Toe is solved. Every position has a known optimal response, and the optimal line from move 1 leads to a draw. Mistakes are the only way to win or lose.
What's the best opening move?
For X: center. For O after X plays center: any corner. For O after X plays a corner: center.
What is a fork?
A move that creates two simultaneous winning threats. Your opponent can only block one, and you win on the next move with the other.
Is there any way to always win as X?
No. With optimal play from O, X cannot force a win. X can only win if O makes a mistake.
Why play if it's solved?
Practicing recognition of forks, blocks, and traps. Tic-Tac-Toe is also the foundation for understanding more complex games — every classic game-tree algorithm (minimax, alpha-beta, MCTS) is first taught here.
Does the AI ever lose?
Only if it's set to play imperfectly to give beginners a chance. A perfect Tic-Tac-Toe AI never loses — it only wins or draws.
Chess — The full strategy game — same fork concept, infinitely deeper.
Othello — Larger grid, sharper turns, every move flips the board.
Checkers — Diagonal movement and forced jumps on an 8×8 grid.
Fox and Hounds — Asymmetric four-vs-one chase on a chessboard.