illuminating science

22/11/2006

Trick-tac-toe

Filed under: — Joel @ 2:31 pm

As I’ve mentioned previously, I’m also a magician and many years ago I used to perform at children’s parties, retirement homes, variety shows, etc. (Incidentally, I think those magic shows were a big part in developing my public speaking abilities and confidence - when you’re surrepticiously hiding a grapefruit in your hand you’ve got to learn to appear perfectly natural :) I highly recommend it!)

I mentioned in that post a few magic tricks which are based more on physics than magic, and I think I’ve found another one, this time based on a bit of maths and game theory.

The effect (I won’t reveal its true name) was basically that the magician plays a game of Tic-Tac-Toe with a volunteer from the audience. Then, after the game, you reveal a prediction of the game board - and it matches! I started to wonder how this might come about, as one thing I used to be interested in was tac-tac-toe strategy and winning positions (as sort of an introduction to more complex games’ stragies, like Connect 4) In particular, for Tic-Tac-Toe you don’t actually need to remember all that many “strategies”: either you’re forced to make a certain move to prevent your oponent from winning, or by rotating or flipping the board you can get back to one of a few basic positions which you know what to do with. I also thought of chess puzzles, where you must perform checkmate is 2 or 3 (or more) moves. Because of the complexity of chess, usually (but not always) the solution is to make a move to which your opponent has only has one response (or only one response that doesn’t lose immediately!) and continue that way - forcing them towards the checkmate position.

So I started to wonder: might it be possible, in fact, to force your volunteer to a certain tic-tac-toe board position? Intuitively, this seems a bit harder than just winning/drawing/losing, but it’s not overly so. We’ve got to make a few assumptions:

  1. I can rotate either my prediction or the actual board so that they match
  2. My oponent is going to play intelligently

The first condition is easily satisfied by making sure there’s no “up” direction (e.g., title at the top, footer at the bottom, etc) Then, I could either rotate the board casually while discussing it to the correct orientation, or I could just rotate my prediction when I produce it. The second assumption is a basic one of game theory, which helps us to find the best strategies for a variety of “games”, whether that’s tic-tac-toe, world economics or bargaining at the markets. The most important assumption is that if I’m about to win, they’ll try and stop me (i.e., if I’ve got two in a row, they’ll block it with one of theirs). I’m also going to play intelligently, but my “goal” is to force the board - not win!

I’m going to add one more assumption though:

  1. The magician starts first

I did a little bit of playing, and here’s the board I came up with:
OXX/XOO/OOX
The Magician plays the Naughts (O’s) and went first, in the centre. The key thing is that there are only two possible plays for the volunteer - it looks like there are 8 squares left, but by rotating the board, there’s really only two choices - either a corner or a middle. Have a play of the board yourself - can you see how to force the oponent and reach this board from those two choices?

Here’s my solution:
One pair of winning sequences

Notice that regardless of which of the two place the volunteer plays, I force them into my winning position. If they played at a different corner or middle square, I just rotate the winning sequence in my mind and continue appropriately.

Now it’s certainly not the only winning sequence. Here’s another for a “middle” play:
Another winning sequences
Play through those two middle-play games. Both arrive at the same board, but considering the piece of magic we’re trying to perform, can you see why the first board is better?

In the pair of sequences I presented initially, both player’s moves are forced after the magician’s second response. The magician makes the first move to the centre - a logical move, since we all “know” it’s the “best” position. Then, the spectator gets a completely free choice (out of 8 squares!) and hopes they made the right one. The magician then makes a good move, that threatens a win - and from then on, both players are fighting just to stay alive. The game seems fair - both players seemed to be in with a chance to win, and it was just bad luck that it ended up a draw. Most importantly, there didn’t seem to be anything but good, honest, tic-tac-toe going on.

Contrast this with the second middle-play game - now, every move by the magician is free. All the volunteer does is respond and they’ve got no choice about where to play if they want to win. Quite aside from being boring, that’s what’s going to stick in their mind is that the magician forced every move they made, and the magician had a free choice every turn. When you produce the prediction board, that feeling of being manipulated is probably going to remain.

Finally, can we get around Assumption #3? If they go first and play in the centre, then by playing in the corner I’m usually able to force the board to look either like the board above or its mirror image. If I relax Assumption #1 to allow me to flip over the game or my prediction (e.g., by drawing one of them on an OHT) then in most cases I can get by. I’ve only found one case where if they don’t play perfectly I end up winning - it sort of violates Assumption #2, but it’s no immediately obvious it’s a losing move. If anyone can verify this and/or come up with a better method, I’d be interested in hearing from you!

Anyway, this was a very long post, but I hope it was interesting - I’ve got no way of knowing if my method is the same as the original magician’s (short of buying the trick!) but I think it’s quite workable. I’m going out to dinner tonight - who knows? I might try it out!

Anonymous Says:

Hey nice post. I was actually look all over for this trick/prediction. I read somewhere a while ago about the thinking but it was something to the effect of always moving to the right of where the spectator moves. With that said if you go first in a game of tic-tac-toe in the center and only move the the right of the other person. The game with always be a cat.

 

Powered by WordPress