Tic Tac Toe

WorksheetsFreeNo sign-up

Get three of your marks in a row, column or diagonal before your opponent does. Choose the easy computer, the unbeatable one (it uses the minimax algorithm to check every possible game), or play a friend on the same screen.

FreeUnbeatable AI2 players

How to play

  1. Choose your opponent and whether you are X (first) or O.
  2. Click an empty square to place your mark.
  3. The first player with three in a row, column or diagonal wins. If all nine squares fill with no line, it is a draw.

Why the computer cannot lose

The unbeatable mode uses minimax: it imagines every possible continuation of the game, assumes both players play their best, scores each ending (win, draw or loss) and picks the move with the best guaranteed result. Tic tac toe is small enough to search completely: there are 255,168 possible games. With perfect play from both sides, every game is a draw.

Strategy that never loses

  1. Win if you can: complete your own line.
  2. Block if you must: stop your opponent’s two in a row.
  3. Create a fork: a move that makes two threats at once.
  4. Block your opponent’s fork.
  5. Take the center, then a corner opposite your opponent, then any corner, then a side.

Tic tac toe strategy quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. How many winning lines are on a tic tac toe board?

Found a mistake? Let us know!

2. With perfect play from both players, the result is…

Found a mistake? Let us know!

3. How many squares does the board have?

Found a mistake? Let us know!

4. A fork is a move that…

Found a mistake? Let us know!

5. The center square belongs to how many winning lines?

Found a mistake? Let us know!

6. A corner square belongs to how many lines?

Found a mistake? Let us know!

7. A side (edge) square belongs to how many lines?

Found a mistake? Let us know!

8. Minimax assumes the opponent…

Found a mistake? Let us know!

9. What is the most marks a game can last?

Found a mistake? Let us know!

10. If you have two in a row and the opponent has two in a row, you should…

Found a mistake? Let us know!

Frequently asked questions

Can you beat the unbeatable computer?

No. The best you can do is draw. If you lose, you made a mistake the computer could punish.

Who has the advantage, X or O?

X, because X moves first. But with perfect play O can always hold a draw.

What is the best first move?

A corner or the center. Both draw with perfect play, and a corner sets more traps for a beginner opponent.

What does “positions searched” mean?

The number of board positions the minimax algorithm looked at before choosing its move. It drops quickly as the board fills.

Can two people play on one device?

Yes. Choose Two players and take turns.

Sources

Related calculators

Browse all calculators

More worksheets calculators

Browse all 456 calculators

Related to This Article

What people say about "Tic Tac Toe: Play vs an Unbeatable Computer or a Friend"?

No one replied yet.

Leave a Reply