How to play Tic-Tac-Toe
You play as X and the computer plays O. Tap any empty square to place your mark, then the computer takes its turn. The first player to line up three of their marks in a row โ across, down, or diagonally โ wins the round. If all nine squares fill up with no line of three, the game is a draw.
Can you beat the AI?
Short answer: no โ and that's the challenge. The computer uses the minimax algorithm, which looks ahead through every possible sequence of moves and always chooses a perfect one. Against flawless play the best result available to you is a draw, so forcing that tie is the real victory. A few things that help:
- Open in a corner. Corners belong to the most possible winning lines.
- Block immediately. The moment the AI has two in a row with an open third square, you must close it.
- Watch for forks. The dangerous positions create two threats at once, because you can only block one.
About the game
Tic-Tac-Toe โ also known as noughts and crosses โ is an ancient pencil-and-paper game with relatives dating back to the Roman Empire. Mathematically it is a "solved" game: with correct play from both sides it always ends in a draw. That property is exactly what makes playing a perfect computer such a satisfying test of concentration.