We have just learnt a really nice fact about the game of tic-tac-toe. As you may know, tic-tac-toe always results in a draw if both players make the best moves possible at every step of the game. To force a draw you need to follow a particular strategy, which isn't too hard, but tedious to write down (see here).

But now imagine you play tic-tac-toe the other way around, so that the first person to get three in a row loses the game. Again the game will end in a draw if both players play optimally. But this time the strategy for the first player is really easy: at your first move, choose the central square, and after that simply mirror your opponent's moves. By "mirror" we mean that you choose the square that is diametrically opposite the last square the opponent chose: if the opponent chose the top right corner, you choose the bottom left one, if they chose the middle top one, you choose the middle bottom one, and so on.

The same works in a version of tic-tac-toe that has, not 3x3, but nxn squares, where n is an odd number (if n is even there is no central square). Again we play the version in which the player who first gets n in a row loses. If the first player adopts the strategy above, they will never lose.

It's not too difficult to see why this strategy works. Let's call the player who goes first A and the other one B. After A takes the central square at the first move, B goes next and A mirrors B from then on. This means that whatever configuration of squares A has taken, B has taken the mirror image of the same configuration first. In particular, if A was forced to take n squares in a row, then B must have taken n squares in a row at the previous move, so B would have lost before A even got to make the supposed losing move. Nice!

About this article

This article was inspired by content on our sister site Wild Maths, which encourages students to explore maths beyond the classroom and designed to nurture mathematical creativity. The site is aimed at 7 to 16 year-olds, but open to all. It provides games, investigations, stories and spaces to explore, where discoveries are to be made. Some have starting points, some a big question and others offer you a free space to investigate.