Tic-tac-toe
Play against a computer that never loses, and see why: switch on its thinking to label every empty square with win, draw or loss. Each day also brings one position where a single move forces a win.
Today's puzzle
Play a game
How to play
Three in a row wins. X moves first. Against the computer you choose your mark and the level: Perfect never loses, and Random plays any free square. Two players share one screen.Show the computer's thinking labels every empty square with the result of best play from both sides after that move, and shows how many positions the search visited. In the daily puzzle, pick the one move that forces a win, then play it out; the computer defends as well as it can. Your tries and streak stay in this browser.
About this game
Tic-tac-toe is small enough to solve completely. From the empty board there are 5,478 positions that can be reached in legal play, and with best play from both sides every game ends in a draw. The computer searches that whole tree with the minimax rule: it assumes you will also play your best move, and picks the move whose worst case is best for it.The daily puzzle is a reachable position in which exactly one move wins against any defence. We take every such position, remove rotated and mirrored copies, and shuffle the list once, so everyone gets the same puzzle on the same day.