When I am in a somewhat brainless mood, I often occupy myself by playing Bejeweled on my exo-cortex. Although I don't generally play when I have a lot of brainpower, I have nonetheless come up with a few useful strategies. The advent of Bejeweled 2 led me to revise my strategies in ways I thought interesting enough to talk about.

First, I will discuss the original Bejeweled. For the few of you who haven't played, a quick overview: it is played on an 8 x 8 board, with each square containing a jewel in one of 7 different colors. A move is made by swapping two orthogonally adjacent jewels. Moves are only valid if at least one of the jewels, in its new position, forms a row of 3 or more of the same color. After each move, all rows of 3 or more disappear, the jewels above the empty spaces fall down to replace them, and new random jewels are seeded in from the top to fill out the board. As a result of these falling jewels, more sets may be formed, which in turn vanish and are replaced, until the board contains no more complete sets; bonus points are scored for such combos. Every so often, the player "finishes a level" and the board is randomized. Play continues until there are no more legal moves.

There are further details about scoring, but they are not relevant to actually getting very high scores. This is because the game is, at least theoretically, infinitely extensible. It doesn't matter how many points you score in a given move if you have an infinite supply of moves. In short, the way to win can be summarized as "Don't lose."

So, how, in practice, does one "not lose"? There are some simple heuristics, but they depend on some underlying theory. Let us define "Energy" as the number of available moves for a given board configuration. A boars with zero Energy is a losing position. A randomly-chosen board configuration is very unlikely to be at zero Energy, however. All moves will change the board configuration, usually to one with a different Energy, greater or lesser. A randomly chosen move will tend to drive the board towards the median Energy of a random board (about 4?). Hence, a randomly-chosen move will not generally tend towards a losing board, though a long enough drunkard's walk will eventually reach one. The trick in *choosing* a move is clearly to attempt to maximize the energy of the resulting board configuratiion. Since there is a random element, this cannot always be done perfectly, but one can still have a strong effect on those odds.

My primary heuristic for choosing moves is "Top Down". Consider two moves, A and B, where A is directly above B on the board. Any given move will create randomizing effects in the space above it, but not usually in the space below it. (On rare occasions, the newly falling blocks may make combos which "drill down" below the initial move.) Hence, choosing move B will tend to disrupt move A, while choosing move A has a very high chance of leaving B available as a move. If you always choose the "highest" available move, you are only randomizing parts of the board which are already at zero Energy, and this will tend to create more Energy in those regions. One only makes moves near the bottom of the board in desperation -- but those moves have the largest randomizing effect, and are best saved for when the board is perilously close to zero Energy.

There are further elaborations one can make when choosing between moves of roughly equal "depth", but just the Top Down principle is alreeady enough to generate impressive scores. Still, a game of basic Bejeweled will still eventually have a string of bad luck and end. Bejewled 2 turns out to be less susceptible to this...

Bejeweled 2 is very similar to the original game, adding only two new rules. These additions have a serious effect on the strategy, however! They make the game both more strategically interesting, and also much less liable to runs of bad luck -- if properly exploited, of course!

The first new rule concerns Power Gems. If you make a row of 4 (or two orthogonal rows of 3 that meet at one gem), then the gem that created that row is *not* removed from the board, but instead becomes a Power Gem. It retains its color, but has added sparklies to show its potent nature. The next time that gem is part of a row, it explodes, destroying all 8 adjacent gems. (If the Power Gem is at an edge or corner, naturally there are fewer adjacencies.)

The second rule is about Hyper Cubes. When you make a row of 5, the moving gem again is not removed, but becomes a Hyper Cube. Hyper Cubes have no color of their own (if you manage to make a row of 3 of them, nothing happens). When one is swapped with a colored gem, *all* gems of that color are destroyed. (If any of these are Power Gems, they explode at this time.)

Both Power Gems and Hyper Cubes are retained when the board position is randomized between levels. (Power Gems may end up as a new color, but this is irrelevant, since all the other gems are randomized.)

Hyper Cubes are the key point in Bejeweled 2 strategy. A HC always represents at least one available move and more typically a choice of 3 or 4 moves. No matter how unlucky the board position becomes, having an available HC means that you haven't yet lost. Moreover, you are usually able to use a HC to greatly increase the randomness of the board -- a vitally important maneuver when the board nears zero Energy. The Hyper Cube is effectively a means of storing up Energy against future needs. This makes the skilled player much less vulnerable to the sort of string of bad luck that ends a typical Bejewled 1 game.

So, two new heuristics become apparent. Never use a Hyper Cube when you have any other move available (save them for low Energy states). And, of course, Make Hyper Cubes. How much effort you should go to in making those Hyper Cubes is not immediately obvious. Since HCs cannot be used in any 'standard' moves, too many of them can clog the board (though this is an easy-to-correct problem). Personally, whenever I have less than 2 HCs, I actively try to create more, often violating the Top Down heuristic to do so.

So what about Power Gems? Though they score well, we must remember that individual move scores are not important -- only "not losing" is important. In that light, PGs are rather unattractive. When a PG is created, it is very likely to have no neighboring gems of its own color. Though it has a "high payoff" when triggered, that event is somewhat difficult to bring about. And while this explosion is a "high payoff" in terms of points, it is typically neutral in terms of its effect on Energy. Worst of all, a Power Gem explosion can cause an extremely valuable Hyper Cube to be wasted!

Given all that, we have another new heuristic: Avoid creating Power Gems. If any *are* created (as will happen occasionally by chance), it's worth some special effort to "prematurely detonate" them, before they get close to any Hyper Cubes.

I'm currently on my second-ever game of Bejeweled 2. The first one, while I was still working out the implications of the new rules, ended around level 25. This game is at level 33, and shows no signs of ending any time soon.