Tic Tac Toe

Play against AI at 3 difficulty levels or challenge a friend. Score tracking, win animations, and an unbeatable Impossible mode.

Play as:
You
0
Draws
0
AI
0
Your turn (X)

Pro Tips

  • Take the center. If you go first, the center square gives you the most winning opportunities (4 possible lines).
  • Grab the corners. Corners are the next best cells, each belonging to 3 winning lines. If your opponent takes the center, go for a corner.
  • Force a fork. A fork creates two threats simultaneously, making it impossible for your opponent to block both. This is the key to winning against Medium AI.
  • Against Impossible AI. The best you can achieve is a draw. The AI uses the minimax algorithm and plays perfectly. Focus on blocking and forcing draws.

Last updated: March 2026

What Is Tic Tac Toe?

Tic Tac Toe is the world's most recognized strategy game, with over 500,000 people searching for it online every month. Known as Noughts and Crosses in the UK and Xs and Os in other parts of the world, this deceptively simple game has been played for thousands of years. Ancient versions have been found carved into roofing tiles from the Roman Empire, dating back to the first century BCE.

The rules take seconds to learn: two players alternate placing their mark (X or O) on a 3x3 grid, and the first player to get three in a row horizontally, vertically, or diagonally wins. If all nine cells fill up with no winner, the game ends in a draw. Despite this simplicity, Tic Tac Toe is rich enough to have been one of the first games fully analyzed by computer science.

Our version offers three AI difficulty levels and a 2-player mode, turning a quick diversion into a genuinely engaging challenge. The Impossible AI uses the minimax algorithm to play perfectly, making it mathematically unbeatable. Can you consistently force a draw against it?

How to Play Tic Tac Toe

Choose your game mode from the four options at the top. Easy AI makes random moves, Medium AI plays optimally 70% of the time, and Impossible AI uses full minimax search to play perfectly. Two-player mode lets you play with a friend on the same device.

Select your mark by toggling between X and O. X always goes first, so choosing X gives you the first move advantage. If you select O, the AI will move first. In 2-player mode, you can set custom player names.

Tap any empty cell to place your mark. The AI responds after a brief thinking delay (watch for the subtle glow effect in Impossible mode). When someone wins, an animated line draws through the winning three cells and confetti celebrates the victory. Draws are marked with a brief flash.

The score tracker above the board tallies wins and draws across games. Expand the Game History section to see your last 10 games and your win rate against each difficulty level. All stats persist within your browsing session.

Key Features

Every detail is designed for a premium game experience. The X and O marks are drawn with smooth SVG animations, not static text. Winning combinations are highlighted with an animated strike-through line, and a burst of confetti celebrates each victory. Even the Impossible AI's "thinking" is visualized with a subtle red glow around the board.

The three AI difficulty levels cater to every skill level. Easy mode is perfect for young children learning the game. Medium provides a genuine challenge, occasionally making mistakes you can exploit. Impossible mode is for those who want to test their understanding of perfect play and practice forcing draws against a flawless opponent.

Whether you are on desktop or mobile, the game adapts perfectly. Touch-friendly cells, responsive layout, and smooth animations work across all devices. No signup, no downloads, no ads — just load the page and play immediately.

Frequently Asked Questions

Can I beat the Impossible AI?

No. The Impossible AI uses the minimax algorithm, which evaluates every possible future game state to choose the mathematically optimal move. Against perfect play, the best outcome you can achieve is a draw. If you go first and play optimally, every game will end in a draw. If you make a single mistake, the AI will capitalize and win.

What is the minimax algorithm?

Minimax is a decision-making algorithm used in game theory. It works by simulating every possible move for both players, all the way to the end of the game. It assigns scores to outcomes (+10 for AI win, -10 for human win, 0 for draw) and assumes both players play optimally. The AI picks the move that maximizes its minimum guaranteed score, hence the name mini-max.

Does X always go first?

Yes, in standard Tic Tac Toe rules, X always goes first. In our tool, you can choose whether you play as X (going first) or O (going second). Going first is a slight advantage because you get more opportunities to create threats early, which is why X wins slightly more often in casual play.

Can I play with a friend on the same device?

Yes. Select the 2 Players mode to play pass-and-play on the same device. You can customize both player names, and the score tracker keeps a running tally of wins, losses, and draws across multiple games in your session.

Is Tic Tac Toe a solved game?

Yes. Tic Tac Toe was one of the first games to be completely solved by computer analysis. With optimal play from both sides, every game ends in a draw. There are 255,168 possible games, but only 138 distinct terminal positions. The first player can always force at least a draw, and the second player can always prevent a loss with correct play.

Related Tools