LK Studio
Games / Tic-Tac-Toe

Tic-Tac-Toe

Three in a row wins. The opponent doesn't make mistakes.

Tic-Tac-Toe Open full screen ↗

Free, no account, no download. It runs entirely in your browser — nothing is uploaded, and your scores stay on this device.

How to play

  1. You and the computer take turns on a 3×3 grid.
  2. Get three marks in a row — across, down, or diagonally.
  3. If all nine squares fill with no line, it's a draw.
  4. The computer plays the optimal move every time.

The maths inside

There are 255,168 possible games of tic-tac-toe. Remove rotations and mirror images and 765 of them are genuinely different. But the number that matters is smaller than all of those: with perfect play from both sides, the result is always a draw.

That isn't "it's hard to win" — it's a proof. The minimax algorithm walks every branch and shows that neither player has a winning strategy.

A draw is not a failure. Against perfect play, a draw is the best outcome that exists.

The interesting part is that humans rarely play perfectly. The game is won by waiting for a mistake — which is exactly what a good opponent never makes.

Questions

Is there a winning move?

No. The first player can force a draw at best. Every other result means someone made a mistake.

Why is it always a draw?

Because the opponent plays the optimal branch, not a random one. A random opponent would lose often.

Will the computer let me win sometimes?

No. That would make the puzzle dishonest — you'd be learning a false lesson about the game.

Seven more where that came from

All of them free, all of them built by one person, all of them short enough to learn in a sentence.

All games →