Sunday, June 14, 2009

Games people play : 3

Strategy for a Tic-Tac-Toe

At first I thought that I'd explain the strategy in detail but then I thought that 99% of the readers would already know that. For the rest 1%, I'd humbly tell them to google it and they can find many such articles. The game is very simple in the sense that because of its limted moves (only 9 moves), the various combinations for a winning strategy can be easily chalked out. As long as you are playing intelligently, which means that not only you're concentrating on your current move but also on the possible future moves your opponent may play, you can never lose a game. Similarly, the opponent will never lose a game if he knows the game properly and plays it with sufficient intelligence. With two such intelligent players, a game of Tic-Tac-Toe will always result in a draw.

Tic-Tac-Toe problem

Therefore, rather than elaborating on the game and its strategy, let's venture into the world of a puzzle and then we will see how we can use our knowledge of game strategy in solving the puzzle.

Consider the following diagram:

Assume that two intelligent players, both of whom are aware of the game strategies, were playing this game. As is seen from the board, they played up to the sixth move and after that, both of them went out to the garden for a smoke. You enter the room at this time. Looking at the board, can you tell what was the first move in the game? Who played last and what was the last move. In short, can you trace back each moves of the game?

Puzzling? Well...that's the idea :) But because all things are difficult before they are easy, let's try our retrograde logic.

For the sake of convenience, I have watermarked each square with a number.

  • Can it be X's move now? If it were so, X will win by acquiring X4. O, being sufficiently intelligent, wouldn't allow that. So, this is not X's move now - it's O's move and X played last..
  • There are 3 Xs and 3 Os on the board. We have also proved that X played last. Therefore, we can conclude that O must have played first when the game started.
  • O's starting move could have been O2, O3 or O9. From the Game Strategy, we know that X must have played X5 to block the centre had O started with O3 or O9. As the centre square is blank, we conclude that X didn't feel threatened and blocked the centre, which means, O didn't play O3 or O9 and therefore, O played O2. Therefore, the first move of the game was O2.
  • dih-dah-dah-dah-dih-dih....What? Surprised? Don't worry...just wanted to find out if you are still reading or not :)
  • After O started the game with O2, the following sequences could have led the game to the current position (remember, we are assuming that both sides are intelligent, trying to win and ensuring that the opponent isn't winning):
Sequence 1 O2 X8
O3 X1
O9 X6
Sequence 2 O2 X8
O9 X1
O3 X6
Sequence 3 O2 X1
O9 X8
O3 X6
  • Whichever sequence the game is played through, all we needed to know is right there - the last move was X6!!

This concludes my series on Games Theory. The whole idea was not to delve deep into the theories but inculcating enough interest in Roshni (if you don't know who she is, you haven't read my first part of the series!) so that she googles it out in her spare time.

No comments:

Post a Comment