The Whitman's Algorithm

Today I thought I would offer a little idea based on one of the most popular posts in the history of this site. That post is Variations on the Konami Code which features a trick by Tomas Blomberg and some ideas of how you could use it and how I had used it in the past.

The Konami Code takes a little time to wrap your head around, but basically it's just a way of forcing any position in a grid. And once you understand it, you'll find yourself looking for grids in everyday life that you can apply this concept to. 

With Valentine's Day coming up, I've decided to use the technique with a box of chocolates. 


You bring your friend or loved one a box of chocolates and ask if they've heard of this thing called The Whitman's Algorithm.

"I read about it on BoingBoing or somewhere. Apparently it's the series of moves that can... predict... or find... I don't even really know how to put it. But it can locate your favorite chocolate in a box of assorted chocolates. It just kind of narrows in on it somehow."

"I wanted to try it with you." You give your friend a bunch of paper squares or index cards cut in half with different directions on them and ask her to mix them up. "Those are the moves it gave me for you. They calibrate it based on your birthdate and it gives you a custom series of moves.  I'm not quite sure of the science behind it...." you trail off.

You then lay a little paper "map" on top of the box of chocolates. Similar to the one below. It should match up with the position of the chocolates in the box. You place a coin or some other marker where it says Start.

You then have her go through the moves in the random order she mixed the cards in. Going forward, backwards, left and right as the cards tell her to. If she can't make a move because it would take her off the map, have her place that card on the bottom of the unused stack, and you'll come back around to it later in the procedure.

Eventually she'll land on one space on the map. You push the papers aside and draw her attention to where she ended up. 

"Okay, your favorite kind is the pecan cluster, right? And you ended up right here... one up and one to the right of center. Open the box."

When she does, she finds that right in the location she landed on is her favorite piece.

"That wasn't a fluke. I'll show you," you say. "I'll move it to a different location." Behind the cover of the box you mix the chocolates around then cover them back up.

You tell her to pick up the direction slips up and mix them into a completely new order. This time you tell her to take one out at random, don't look at it, and put it in her pocket. She does. 

You go through the process again with the coin and the map, moving around based on the slips of paper. 

At the end of the procedure you have her remove the cover from the box and find out how close she was to her favorite piece. She's two pieces in front of it.

"But remember," you say, "You put one slip in your pocket without looking at it. Pull it out. What does it say?"

She pulls it out and it says, "Move 2 Spaces Backward," landing her right on her favorite piece.

The algorithm works!


This is a good introductory effect to familiarize yourself with the Konami Code. Tomas has more complicated ways to hide the method, but it's best if you first understand what is going on. 

Here's a PDF of the map, and here's a PDF of the move cards (to be cut out). You probably wouldn't use this exact layout, but you can practice with it and see how you can apply it to your own box of chocolates (or anything else in a grid). 

Print the move cards, cut them out, and set the last two aside for now (1 to the right & 3 backward). Now put a coin in the middle, shuffle up the moves, and then go through them and see how it plays out. You will always end up one forward and one to the right of where you started, unless you screw it up, which I wouldn't put past you.

So, assuming you know what your friend or girlfriend/boyfriend or spouse's favorite type of chocolate is, you just put it in that location to start and you're good to go. 

Before the next round you will place her target piece two to the right and two down from center. The diagram below indicates where the marker will wind up at the end of the first and second round.

But Andy, if the directions always bring you to the same spot regardless of the order, how do they end up in a new spot for the second round.

Well, remember, you have those two extra move cards. As she goes through the cards the first time, have her turn them over and set them aside. At some point get the two additional ones palmed in your hand. When she's done you will push the paper slips aside, dropping off the two other pieces. It's a completely invisible move. She thinks you're done with the pieces and you're just getting them out of the way. Now the moves in the pile will always lead to position #2 no matter the order.

The bit about hiding one of the slips in her pocket without looking at it doesn't change the workings of the trick at all. (Well, it does in one small way. You may have to move "off" the map temporarily in this 2nd go around, due to the fact that you're holding out one specific piece until the end. Just pay attention to where you are and move as if you're going into spaces that exist off the map. Of course if you have a bigger box of chocolate (and bigger map) you won't have that issue.) Essentially, that's just the last slip in the pile, except it's not in the pile, it's in her pocket. Well, that doesn't change anything. But it feels like it does. So she ends up two spaces ahead (or whatever) of her favorite piece of chocolate. But wait! There's one more direction to read... Go back two spaces! Well, that's the only direction that would have landed her on her piece and she just so happened to set it aside ahead of time. Crazy!

If you're still not following what's going on, just print out those pdfs and try it. 

There's no magic or even any math to coming up with these series of movies. If you want to come up with your own, just write down a list of moves and see where it lands you. That's position two. Now remove one horizontal move and one vertical move (those will be the ones you palm in) and see where that lands you. That's position one. 

You need a big square-ish box of chocolates. It doesn't have to be 5 by 5 like in the example above it can be bigger. You can make up a map for whatever size you find.

People will argue this trick is too procedural. "It would be a better trick if they just named any position and her favorite chocolate was there." And that's likely true. It might be a better trick. But as I said at the beginning of this year. I'm no longer thinking in terms of tricks, I'm thinking in terms of experience. And the experience of mixing up these cards and having this coin travel around at random, like a Plinko disk, and eventually landing on the location of her favorite chocolate is arguably better than: name a position, and there it is. It all depends, of course. I'll have more to say on this soon as I will be adding a couple of new broad performing styles into the Jerx lexicon, one of which would entail tricks like these.

You could do other tricks with this technique and the box of chocolates too. I'm not quite sure what, exactly. But it's a grid found in the real world, which makes it ripe for the Konami Code. Maybe you could have your girlfriend play the game and in the exact spot she lands, instead of a chocolate is an engagement ring. 

Or maybe you print up the move cards and you talk about a game called Chocolate Roulette. "Since everyone knows there are always a few gross pieces of candy in a box of chocolates, some guys created Chocolate Roulette. You play the cards in any order and whatever you end up on, you have to eat it, even if it's a flavor that sucks." And then you play a round and she ends up on the only piece of chocolate in a box filled with nuggets of dog shit.

Or the other way around. She lands on the only nugget of dog shit in a box of chocolates. When it comes to dog shit and chocolates, you're limited only by your imagination. Your sick, twisted imagination.