The Unbeatable Tic-Tac-Toe AI

How does it work?

The AI calculates the score of every move and makes a move with the highest future score.
Think of it as looking at all the possible moves ("possible worlds") before making a move.