Qm

Can the first player force a win at tic-tac-toe?

Two players alternate placing X and O on a three-by-three board; three in a row, column or diagonal wins.

With perfect play from both sides, does the first player win, does the second player win, or is it a draw? Give the second player's key responses to the first player's three kinds of opening (centre, corner, edge) and explain the one trap that the second player must avoid.

Show a hint

The first player's most dangerous opening is a corner. Try responding in the centre and see whether the first player can ever build a "fork", a move that creates two winning threats at once.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Twenty coins in a circleGuess each other's coinPlacing knights so that none attackNim where the last stone losesRacing a rook to the corner
All questions →