Games · Tic-Tac-Toe

Tic-Tac-Toe

A 30-second game. Three in a row wins; a full board with no three wins draws. Four difficulty levels against me, or 1-on-1 with a friend over a peer-to-peer room. Expert plays the tablebase — the best you can do against it is a draw.

Controls

Play Solo
0 · 0 · 0

Tic-tac-toe board

Your move (X).

Actions

Status

Chat

About this page

The computer player is alpha-beta minimax search over the full game tree. Tic-tac-toe has a tiny state space — about 5,500 reachable positions — so even Expert depth runs in microseconds. Easy plays a random legal move; Medium looks two plies ahead; Hard four; Expert searches to the leaf and plays perfectly. The game is famously solved: perfect play by both sides always ends in a draw.

Nothing leaves your browser. The game, your move history, and your win/loss stats stay local. Per-difficulty stats are kept in your browser's localStorage; clearing site data resets them. No accounts, no leaderboards, no telemetry beyond the site-wide page-view counter.

How to play

The board. A 3×3 grid of empty cells. You play X (blue) by default; the computer plays O (rose). In Friends mode, the host plays X in game 1 and sides alternate each game.

Moving. Click any empty cell to place your mark, or press a numpad key (1–9: 1 is bottom-left, 9 is top-right, matching a standard numeric keypad). The other side responds immediately.

Winning. Get three of your marks in a row — any row, column, or diagonal. The winning line gets highlighted.

Drawing. If the board fills with no three in a row, the game is a draw. Perfect play from both sides always draws.

Difficulty. Easy plays a random legal move; Medium looks 2 plies ahead (catches immediate threats); Hard looks 4 (catches forks); Expert plays perfectly — you can only draw against it.

Hint. The Hint button pulses the cell the computer would play if it were you, at the current difficulty.

Undo. Undo backs up your last move and the computer's reply together, returning to the position before your last decision.

Scores

Easy 0 games
No games yet
0W · 0L · 0D
Medium 0 games
No games yet
0W · 0L · 0D
Hard 0 games
No games yet
0W · 0L · 0D
Expert 0 games
No games yet
0W · 0L · 0D

Expert plays perfectly. A draw is the win condition.

Room

Seats

Watching 0

No one is watching right now.