1Two things to know first
"Perfect play" and "a slip"
You need two small ideas. Watch each one happen:
Perfect play
A player who never makes a mistake always blocks your three-in-a-row and grabs every winning spot. A computer can do this every single game.
A slip
A slip is one bad move — leaving a spot open that lets the other player line up three. Real people slip sometimes. Perfect players never do.
2It depends on the other player
Same first move — two very different games
Both play perfectly 🤖
Neither one ever slips. Every threat gets blocked. Keep this case in mind…
The other player slips 🙋
X plays well, but O leaves a spot open. Now does X's head start turn into a win? That's the test.
3Watch one game
Make O sloppy, then play it out
Here's one game: X plays smart, O's care is up to you. Set how careful O is, then hit play and watch the board fill in. Does X punch through, or does O hold the tie?
4Now predict the big test
Let the computer play BOTH sides, perfectly, thousands of times 🤖🤖
One game is luck. So we'll race thousands of games with both players perfect — and tally every result into three bars: X wins, draws, O wins.
Guess before you run it
If BOTH players play their very best, who wins tic-tac-toe?