## Tic-Tac-Toe X goes first

• Possible outcomes:  X Wins: 131184 O Wins: 77904 Ties: 46080

• It's easy to calculate the number of moves in a game. The first player has 9 choices. The second players has 8, followed by the first player with 7, etc.

9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 362880. Which is a very small number for a computer.

So Tic-Tac-Toe is a solved game, meaning for any starting move, we know how the game will end.

• Actually, there are a lot fewer moves then that. Because the board is symmetric, the first player really has only 3 moves (a corner, an edge, or the middle).

If you rotate the board, every other first move is the identical to one of these three moves.

You can also reflect the board (like in a mirror), and reduce the number of unique games even more.

And many games end with a winner before the grid is filled.

Taking all this into account, the total number of games is only 26,830.

• If X starts by taking a corner, O must take the center, or X can force a win.

X's first three moves are corner, center, edge touching previous two moves. O cannot win. Try it.

• Chess is much more complex. First player has 20 moves, and second player has 20 moves. So after just two moves there are 400 board positions.

There are 5362 positions after 4 moves, and 71852 after 5 moves, and 809896 after 6 moves.

Total number of moves in a game is estimated to be 1050. That is a very big number with 50 zeros.