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
Multiplayer lobby
Codes are 4–32 characters: A–Z, 0–9, and dashes.
4–32 characters: A–Z, 0–9, and dashes.
Room ---- is locked.
Ask the host to let you in. They can unlock the door from their lobby.
You were removed from this room.
The host can let you back in. Try a different code or a different name if you'd rather move on.
Connecting…
Still trying to reach the room — your previous connection may need a moment to release. If this persists, refresh this tab.
How does this work?
One player opens a room and shares the 4-letter code or QR. The other player types the code (or scans the QR, or opens the share link). Direct WebRTC peer connection — no servers between you. School Wi-Fi sometimes blocks peer connections; if it does, switch to cellular. No accounts, no signup — just a display name.
Room code
Seats
Watching 0
No spectators yet. Anyone with the code can watch.
Banned (0)
Match starts the moment a friend joins.
Seats
Room: ----
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
Current match
Your record vs. the computer
Expert plays perfectly. A draw is the win condition.
Stat tracking is unavailable in this browsing mode (private browsing or storage disabled). Gameplay still works for this session.
Room
Seats
Watching 0
No one is watching right now.