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 *n*x*n* 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. *

## Comments

## "lose" not "loose"

"lose" not "loose"

## Notakto

There's another interesting Tic-Tac-Toe variation called Notakto. Like this version, the object is to avoid getting 3 in a row, but in Notakto, both players are playing X. Working out a winning strategy is an interesting exercise.

## Numerical Tic Tac Toe

Numerical Tic Tac Toe is a variation invented by the mathematician Ronald Graham. The numbers 1 to 9 are used in this game. The first player plays with the odd numbers, the second player plays with the even numbers. All numbers can be used only once. The player who puts down 15 points in a line wins (sum of 3 numbers).

You can try this (free) game on android devices:

http://tinyurl.com/m5oqdkk

## How not to lose.

How not to lose when going first.

First move :

Place a cross in the centre square

Subsequent moves:

If you can complete three crosses in a line, do so. If not, place your cross in a square adjacent to your opponentâ€™s last move.

How not to lose when going second.

First move :

If opponent takes the centre square take a corner square, else take the centre square.

Subsequent moves:

If you can complete three in a line, do so.

Else, if your opponent has two crosses in an open line, block that line.

Else enter your move in an adjacent square to your opponent's last move.