Free Tic-Tac-Toe Online

You play X. The computer plays O. Get three in a row to win.

Your turn (X)
W: 0 D: 0 L: 0

About This Game

Tic tac toe is fully solved. With correct play from both sides every game is a draw, which makes it a clean demonstration of game tree reasoning, the same look ahead thinking trained in the NIH-funded ACTIVE trial, where reasoning gains in 2,832 older adults persisted for years.

Because the game is solved, the benchmark is not winning. On Hard mode a run of draws means you are playing perfectly, and any loss marks a specific error you can find.

This is why it is a good teaching game for children. The whole decision tree is small enough to hold in your head, so cause and effect stay visible in a way chess never allows.

The tip most people miss: going second, the corner reply is a trap. If the opponent opens in a corner, the only reply that draws is the centre. Taking another corner feels symmetric and natural, and it loses to a fork every time against a competent opponent. Most casual losses at this game come from that single move rather than from anything later.

How to Play Tic-Tac-Toe

You always play as X and move first. Click any empty square to place your X. The computer then places its O. The first player to get three of their marks in a horizontal, vertical or diagonal line wins the round. If all nine squares are filled without a winner, the game is a draw.

Easy vs Hard Mode

Easy mode makes random valid moves. Hard mode uses a perfect strategy called minimax, which means it will never lose. Hard mode is still worth playing because the only way to avoid losing is to play perfectly yourself. Use Hard mode to practise finding the correct defensive responses.

Tips

  • Take the centre square on your first move whenever it is available. It gives you the most winning lines.
  • If you can win on this turn, do it immediately. Never delay a winning move.
  • Watch for forks - situations where you create two threats at once. The opponent can only block one.
  • On Hard mode, every draw is a success. The AI plays a perfect game, so draws against Hard are the best possible outcome.

FAQ

Can I beat the Hard AI?
No. On Hard mode the AI uses minimax, a complete game tree search for a 3x3 board. It plays perfectly and will never lose. A draw is the best achievable result against it.
Is my win record saved?
Wins, draws and losses are tracked for your current session. They reset when you close the page. Your all-time best win streak is saved to localStorage and persists across visits.

Try Next

How Do You Play Tic Tac Toe?

Two players alternate marking squares on a three by three grid, one using X and the other O. The first to complete a row, column or diagonal wins. Click or tap an empty square to place your mark. If all nine squares fill with no line, the game is drawn.

The game is small enough to be solved completely, which is what makes it useful as a teaching example: every position has a known best move, so the only way to lose is to make an error.

What Are the Cognitive Benefits of Strategy Games?

The value here is in pattern recognition and forced move reasoning rather than in difficulty. Recognising that a position is already lost or already drawn is the same skill as spotting an inevitable consequence several steps ahead in a more complex problem.

The honest caveat is that gains are largely specific to the skill you practise. Research on cognitive training transfer found that transfer to unrelated tasks is real but usually modest, so treat these as focused practice rather than general brain training.

Tips to Improve Your Tic Tac Toe Score

Take a corner rather than an edge if you move first, since corners appear in more winning lines. If your opponent opens in the centre, respond in a corner. Always check for an immediate win before blocking, and always block an opponent three before pursuing your own threat. Against a competent opponent every game should be drawn, so treat a win as evidence they made a mistake rather than a sign of improvement.

Frequently Asked Questions

Can you always win at tic tac toe?

No. The game is solved and perfect play by both sides always ends in a draw. You can only win if your opponent errs.

What is the best first move?

A corner. Corners participate in three winning lines each, more than an edge square, which gives your opponent more ways to go wrong.

How should I respond to a centre opening?

Take a corner. Responding on an edge gives your opponent a forced win with correct play.

Why is the game considered solved?

The position space is small enough to evaluate exhaustively, so the best move in every position is known. That is what makes it a standard teaching example rather than a competitive game.

Does playing it improve strategic thinking?

Only narrowly. It is good practice at spotting forced sequences, but research on cognitive training suggests transfer to unrelated reasoning is modest.