Skip to content

Tic-Tac-Toe

Noughts and crosses, done properly: play against an easy computer, an unbeatable one, or a friend on the same device. Three in a row wins, and the score board keeps count for the session.

Plays in your browser Solo or two players Keyboard TouchNo account

How to play Tic-Tac-Toe

  1. Choose a mode. Against the computer you are X; in two-player mode you take turns as X and O.
  2. Click or tap an empty square to place your mark. Squares are buttons, so the keyboard works too: Tab to a square and press Enter.
  3. Line up three of your marks horizontally, vertically or diagonally to win. If all nine squares fill with no line, it is a draw.
  4. Press Next round to play again. The starting player alternates each round.

Tips

  • Take the centre if it is free; it belongs to four winning lines. Corners belong to three, edges to only two.
  • Against an opponent who opens in a corner, answer in the centre; against a centre opening, answer in a corner.
  • Look for a fork: a move that creates two winning threats at once. Your opponent can only block one.
  • The unbeatable computer never loses. Every game against it is a draw at best, which makes it a good way to learn perfect play.

About Tic-Tac-Toe

Grids for three-in-a-row games appear in Roman ruins, and the modern game was one of the first ever programmed on a computer: OXO, written for the EDSAC in 1952. With only 255,168 possible games, it is fully solved, and two perfect players always draw.

The unbeatable mode here uses a complete minimax search, so it sees every possible continuation. The easy mode takes obvious wins and blocks, but otherwise plays randomly.

Scores and preferences for this game are stored only in your browser's local storage. Nothing is sent to a server and no account is needed. Browse all games.

Frequently asked questions

Can I win against the unbeatable computer?

No. It plays perfectly, so the best possible outcome is a draw. Switch to easy mode for winnable games.

Who starts?

X starts the first round. After each round the starting player alternates, so against the computer you will sometimes move second.

Does it keep score?

Wins and draws are counted for the current session. Reset clears them; nothing is stored or uploaded.

Does it work with a keyboard?

Yes. Move between squares with Tab and place a mark with Enter or Space.

Finished a round? These play well next.

All games

You might also like

Something useful from another corner of VoltKit.