Browser games and pointless experiments. Nothing to install.

Tic Tac Toe

3×3 or 4×4, unbeatable computer or two players

X0 Draw0 O0

Your turn

You may also like

Tic Tac Toe, with an opponent that actually plays properly

Three in a row on a three by three grid, except this version does the things most browser copies do not. The computer on Unbeatable genuinely cannot be beaten, there is a four by four board where you need four in a row, two people can play on the same device, and there is a neon glow mode if you would rather it did not look like a spreadsheet.

The uncomfortable fact about the standard game is that it is solved. With perfect play from both sides, every single game is a draw. That is not an opinion, it is a proven result: the whole game tree is small enough to search exhaustively, and once you know the rules of good play, there is no winning line. What makes it interesting is that most people do not know those rules, which is why the game survives on playgrounds.

How to play

  1. Choose a board: 3×3 needs three in a row, 4×4 needs four.
  2. Choose an opponent: the computer, or a second player on the same device.
  3. Against the computer, pick a level. Unbeatable means what it says.
  4. X always goes first. The running score keeps count across games.

Can you actually beat the computer?

On Unbeatable, no. It searches the complete game tree with alpha-beta pruning and plays the optimal move every time, so your best possible outcome is a draw. This has been verified against every legal sequence of human moves: 569 distinct games, zero human wins. If you draw against it, you played perfectly.

Easy will block you and take an obvious win, but plays randomly the rest of the time, so it is beatable without being pointless. Medium plays optimally most of the time and deliberately slips about one move in five, which produces the most human-feeling games of the three.

How to never lose at 3×3

  • Take the centre if you go first. It sits on four of the eight winning lines, more than any other square.
  • If they take the centre, take a corner. Taking an edge here is the most common losing move.
  • Play corners, not edges. Corners belong to three winning lines, edges to only two.
  • Look for a fork. The only way to beat an imperfect opponent is to create two threats at once, since they can only block one.
  • Block before you build. Check whether they have two in a row before you look at your own line. Most losses come from missing this.

Why 4×4 is a completely different game

Four in a row on a sixteen square board is not solved the way the small version is, and it plays far more like Connect Four than like Tic Tac Toe. The board is big enough that double threats appear naturally, the centre four squares are worth far more than the corners, and games rarely end in a draw. The computer switches to a depth-limited search with a positional heuristic there, since the full tree is too large to walk, which means it is strong but genuinely beatable.

Glow mode and two player

Glow mode swaps the board to a dark surface with neon markers, which is easier on the eyes at night and considerably more satisfying to win on. Two Player passes the device back and forth with no computer involved, which is what the game was always for. Your running score is saved in your browser and no account is needed.

Frequently asked questions

Can you beat the unbeatable computer?

No. On the Unbeatable level it searches the full game tree and plays the optimal move every time, so a draw is your best possible outcome. This was checked against every legal sequence of human moves, 569 distinct games, with zero human wins.

Is there a 4x4 board?

Yes. On 4x4 you need four in a row rather than three, which plays far more like Connect Four. The computer uses a depth-limited search with a positional heuristic there, so it is strong but genuinely beatable.

Can two people play on the same device?

Yes. Switch the opponent to 2 Player and pass the phone or share the keyboard. No computer opponent is involved and no account is needed.

What is glow mode?

A dark board with neon markers instead of the light theme. Easier on the eyes at night and a bit more satisfying to win on. It is remembered between visits.

What is the best first move?

The centre, if you go first. It sits on four of the eight winning lines, more than any other square. If your opponent takes the centre, take a corner rather than an edge, since corners belong to three winning lines and edges only two.

Is tic tac toe a solved game?

Yes, on the standard 3x3 board. With perfect play from both sides every game is a draw. The full game tree is small enough to search exhaustively, which is exactly what the Unbeatable level does.

Is my score saved?

Your running win, loss and draw tally is saved in your own browser. Nothing is sent to a server.