jogo-da-velha.com

Tic-Tac-Toe

0You (X)
0Draws
0CPU (O)
Level:

Your turn

Rules, levels and tips ↓

How to play tic-tac-toe

Tic-tac-toe is played on a grid of 3 by 3 squares. One player is X, the other is O, and you take turns placing your 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.

Here you can play against the computer or against a friend on the same phone or computer. Who goes first alternates every game, and the score stays on screen while you play.

The three levels

Strategy: how never to lose

Can you always win?

No. Tic-tac-toe is a solved game: if both players make no mistakes, every game ends in a draw. There are 255,168 possible games. The first player wins 131,184 of them, the second player 77,904, and 46,080 end in a draw, so going first is an advantage. That is why the Impossible level never loses: it checks every line of play from the current position before choosing a square.

Tic-tac-toe, noughts and crosses, morpion…

In the United States and Canada the game is called tic-tac-toe. In the UK, Ireland, Australia and New Zealand it is usually noughts and crosses, after the O (a nought) and the X (a cross). The rules are the same everywhere.

Other languages have their own names: tres en raya in Spanish, morpion in French, tris in Italian, jogo da velha in Brazil and jogo do galo in Portugal. The Romans played something similar called terni lapilli ("three little stones"), and in 1952 a version called OXO, written for the EDSAC computer at the University of Cambridge, became one of the very first video games.

Frequently asked questions

Is it free?

Yes. You play straight in your browser, with no sign-up and nothing to download.

Does it work on my phone?

Yes. You can also add it to your home screen from the browser menu to open it like an app, even offline.

Can you beat the computer?

On Easy and Hard, yes. On Impossible, the best result you can get is a draw.

Who goes first?

You start the first game as X. After that, who goes first alternates every game.