QTNest logoQTNest

Tic Tac Toe

Three in a row against a computer that plays easy, medium or genuinely unbeatable — or hand the device to someone else.

You

0

Computer

0

Draws

0

Your turn.

You are X

Tap a square to play. Three in a row wins.

Plays entirely in your browser · no sign-up, no download

Tic Tac Toe — Including an Opponent That Cannot Be Beaten

Tic tac toe is a solved game. With both players playing well every game is a draw, which sounds like it should make it pointless and instead makes it a good place to see what "playing well" means.

The unbeatable setting here searches the position to the end of the game — all nine moves — and picks the move with the best guaranteed outcome, preferring a win that comes sooner. There is no opening book and no list of tricks; it is the same search either way, which is why it cannot be caught out by an unusual opening. We checked it the only way worth checking: by playing every legal sequence a human could choose against it, as first player and as second. Across all of them it never lost once. A draw is the ceiling, and getting there reliably is a real skill — it means blocking every threat and never leaving two open at once.

Easy and medium exist because an opponent nobody can beat is not much fun on its own. Both use the same search at a shallower depth, and both sometimes play a random legal move instead of their best one — 45% of the time on easy, 12% on medium. The important difference is what they still do while blundering: both will always take a win sitting in front of them, but easy will not always block yours. That single distinction is what makes it winnable, because in a game this small, blocking is most of the defence. Against a player choosing at random, easy loses about 8% of games and unbeatable loses none.

Two players on one device is a mode rather than a separate page, so a game against the computer can turn into a game against the person next to you without reloading anything. Either way the running score sits above the board, and the side that starts alternates between games — whoever goes first in tic tac toe has the advantage, and handing it to the same player every time flatters one of you and frustrates the other.

If you would rather skip the computer entirely, two-player mode is one tap away and keeps score for both sides, and connect four is the version where the board is big enough that good play is not a solved question.

How to play Tic Tac Toe

  1. Choose Easy, Medium or Unbeatable — or "Two players" to play someone on the same device.
  2. Tap any empty square to place your mark. The line under the status says which mark is yours.
  3. Get three in a row, in any direction, before the other side does.
  4. The winning line is highlighted, and the score above the board keeps a running total.
  5. Tap "Play again" for the next game; the side that starts swaps each time.

Questions

Is the unbeatable setting really unbeatable?

Yes. It searches every remaining move to the end of the game, and we verified it by playing every legal human line against it, going first and second — it never lost a single one. The best available result is a draw.

How do I get a draw against it?

Block every threat as it appears, and never let two threats open at once. If you move first, take the centre; if you move second and the computer takes the centre, take a corner.

Can two people play on one device?

Yes — tap "Two players". Turns alternate on the same board, the score is kept for both sides, and no computer opponent is involved. There is nothing to connect and no second device needed, and you can switch back to the computer mid-session without reloading.

Who goes first?

You do in the first game, then it alternates. The first move is an advantage in tic tac toe, so swapping it keeps a run of games fair.

Is this the same as noughts and crosses?

The same game, different name — noughts and crosses in Britain and Ireland, tic tac toe in the US. X and O here are the crosses and the noughts.