How it works

The board is three by three. You are X and move first in the single-player mode; the computer is O. Click any empty square. The first side to complete a row, column, or diagonal wins, and a full board with no line is a draw.

Switch between Play the computer and Two players at any time. In two-player mode the same device alternates X and O until someone wins or the board fills. The scoreboard counts wins for each side and draws, and Reset score clears it without touching the settings.

The computer is not bluffing

The single-player opponent uses minimax with a depth preference: it assumes you will also play your best move, so it never loses. If you play perfectly, the result is a draw. If you make one mistake, it will take the win. There is no difficulty slider because a "sometimes careless" AI teaches the wrong lesson: you would learn to wait for a blunder instead of building a fork.

A fork is the only way to beat a perfect player, and a perfect player does not allow one. The practical lesson is defensive: take the center when it is free, block a two-in-a-row immediately, and create two threats at once only if the position allows it.

What the scoreboard means

The scoreboard is per session and is not saved. It counts completed games, not attempts, so a refresh starts from zero. Against the computer, a rising draw count is a good sign; it means you are not losing. Against a person, the first player has an advantage, which is why the single-player mode gives the first move to you.

What this page does not do

It does not upload moves, keep a history, or learn from your play. The opponent is deterministic, so the same sequence of moves always produces the same reply.