Tic Tac Toe

Tic Tac Toe vs Computer

Three in a row wins. Try Hard mode – can you at least force a draw?

Wins0
Draws0
Losses0

How to play tic tac toe

Tic tac toe (also called noughts and crosses or Xs and Os) is played on a 3Γ—3 grid. X always moves first, then players take turns placing their mark in an empty square. The first player to get three marks in a row – across, down or diagonally – wins. If all nine squares are filled and nobody has a line, the game is a draw.

Tap a square to place your mark. Choose vs Computer to play the AI or 2 Players to pass the phone to a friend. Use Who starts to let the computer open, and Undo to take back your last move. On a keyboard, the number keys 1–9 match the squares like a phone keypad turned upside down (7-8-9 on the top row), and N starts a new game.

The three difficulty levels

Easy plays a random square most of the time, so beginners and children can win often. Medium usually picks a good move but makes mistakes you can punish. Hard searches every possible continuation of the game (the full minimax game tree), so it never loses: the best you can do is a draw. Your wins, draws and losses are counted separately for each level and stored only on your device.

Strategy tips

Why a simple game is still fun

Games of three in a row are very old, and tic tac toe was one of the first games ever played by a computer program. It is quick to learn, a game takes under a minute, and it teaches planning, blocking and looking ahead. This page is free, has no sign-up and no ads inside the game, and it keeps working offline after your first visit.

FAQ

Can you beat the computer on Hard?

No. Hard mode uses a complete minimax search, so it always finds the best move. With perfect play from you, the game ends in a draw.

Who goes first in tic tac toe?

X moves first. You can choose who plays X with the Who starts option; when the computer starts, it plays X.

Is the first player at an advantage?

Slightly. X has more chances to set a trap, but with correct defense O can always force a draw.

Can I play with a friend?

Yes. Choose 2 Players and take turns tapping squares on the same phone, tablet or computer.

Does it work offline?

Yes. After the first visit the page is saved by your browser and works without internet. Scores are stored locally, never uploaded.