Unbeatable Tic-Tac-Toe
Tic-tac-toe is a solved game: with perfect play from both sides it always ends in a draw. This AI plays perfectly. Your best result is a tie.
With perfect play from here
Draw
Your move. You're X.
You won0
Draws0
AI won0
The AI runs a full minimax search over every possible continuation (there are 255,168 complete games). It takes the fastest win and, if it ever could lose, the slowest loss. It never can.
Coach
Let's learn to never lose.
Make a move. After each one I'll tell you whether it keeps the draw safe, and which rule it follows.
The perfect opponent never slips. Your goal is a draw every time.
Good moves 0Slips 0Hints used 0
The eight rules
On every turn, go down this list and play the first rule that applies. Follow it every time and you can never lose. (This is Newell and Simon's 1972 strategy.)