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 Best Grade 8 ELA Practice Tests for Illinois Students
- Socialization and the Self
- Scatter Plot Maker
- A Guided, Timed Response
- How to Find Transformation: Rotations, Reflections, and Translations?
- Rational-basis review
- Evaluating Variables and Expressions
- 4th Grade ACT Aspire Math FREE Sample Practice Questions
- Culture Wars and the AIDS Crisis: Evidence and Public Policy
- SAT Math vs. ACT Math: the Key Differences












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