Tic-tac-toe

You0
Draws0
Computer0

Your move. You are X.

Whoever starts takes turns, game by game. Scores are kept separately for each level, in this browser only.

The three levels

Easy plays almost at random. It sometimes takes a winning square when one is open, and never blocks you on purpose.

Medium always completes a line when it can and usually blocks yours, but it cannot see a fork coming: a move that threatens two lines at once, so that it can only block one.

Hard searches every possible game from the current position and plays the best move. Played perfectly by both sides, tic-tac-toe always ends in a draw, so a perfect opponent cannot be beaten. This one is nearly perfect: in about one game in eight it makes a single weaker move, and only a win will tell you that you caught it.

Where to start

The centre square is part of four lines and each corner is part of three, while an edge square is part of only two. That is why strong players open in the centre or a corner, and why the fork, two threats at once, is the move that wins games.

Playing a friend

Choose A friend and send the link it gives you, on WhatsApp or anywhere else. The game starts the moment your friend opens it, on a phone or a computer, and neither of you needs to sign up. Whoever sent the link is X and goes first; after that, the first move alternates, game by game.

If either of you loses the connection or switches to another app, the game waits. Open the same link again in the same browser and it carries on from where it was. Only the first two people to open a link can play in it.

Your moves go through our server only so that they reach your friend. Nothing about either of you is kept, and each game is deleted a day after its last move.