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.
How to play
- Choose your opponent and whether you are X (first) or O.
- Click an empty square to place your mark.
- 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
- Win if you can: complete your own line.
- Block if you must: stop your opponent’s two in a row.
- Create a fork: a move that makes two threats at once.
- Block your opponent’s fork.
- 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.
Quiz complete
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
More worksheets calculators
Related to This Article
More math articles
- The Iowa ISASP Grade 3 Math Worksheet Pack — 49 Free Printable Pages with Solutions
- Oregon OSAS Grade 6 Math Free Worksheets: Printable Grade 6 Math Practice with Answer Keys
- Quotas, Eugenics, the Second Klan, and the Election of 1928
- Genetic Variation: How to Understand Population Diversity
- Establishment Clause
- ACT Math: Test-Taking Strategies
- Family autonomy
- Sterilization Safety and Exposure Control
- 5th Grade NYSE Math Practice Test Questions
- Words for Change and Stability


What people say about "Tic Tac Toe: Play vs an Unbeatable Computer or a Friend"?
No one replied yet.