My wife plays a 3d "shanghi" variant which has an annoying feature, that sometimes the game becomes blocked and has to "reshuffle" which is a totally computerish solution to keep the game going.
It works like this; the game pieces are little cubes which are arranged in a bigger cube (or other 3d shape) which can be viewed from any angle. Each cube has the same symbol on each of it's faces, and there are 4 of each type of cube. The game is a speed/dexterity/memory exercise where you identify pairs of cubes, which disappear and reveal the cubes underneath. The goal on each level is to "eat" the entire formation. But sometimes there are no pairs anywhere on the surface of the formation, so the game is blocked. So the challenge is to design the cube layout algorithm so that blockage is impossible, or lacking that less likely. Here are two trivial but unsatisfactory solutions. (1) always place all four instances of a symbol together. This might not be quite enough to guarantee no blocks, but it would guarantee a completely boring game. (2) when removing a pair results in a blocked position, secretly reorder the cubes that are about to be revealed so there is no blockage. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.