← back to Two Players

Tic-Tac-Toe

Play noughts and crosses with a friend on one device, or against an easy or perfect AI. Turn on see how the AI thinks to reveal each move’s value.

Why can the perfect AI not be beaten?

The perfect AI uses the minimax algorithm: it plays out every possible game to the end, then picks the move whose worst outcome is best. Tic-tac-toe is small enough to search completely, and with perfect play from both sides it always ends in a draw. See how the AI thinks shows the value of each of your moves: positive can win, zero draws, negative loses.

tags: #tic tac toe #noughts and crosses #two player game #minimax

How to install the app

This browser has not offered an automatic install button yet. Install it from the browser menu:

Android (Chrome)
Tap the ⋮ menu at the top right, then choose "Install app" or "Add to Home screen".
iPhone / iPad (Safari)
Tap the Share button (the square with an up arrow), then choose "Add to Home Screen". On iOS this only works in Safari.
Computer (Chrome / Edge)
Click the install icon (a monitor with a down arrow) at the right end of the address bar, or menu ⋮ → "Install Daily Apps".