I recently bought a Gear Shift from Oskar's Shapeways shop http://www.shapeways.com/model/139482/gear_shift.html
and I am very happy with it. It is very fun to play with, and it looks really cool when scrambled, but it is difficult to solve, as you have to constantly keep track of the orientation of all the gears.
Luckily, I have a good friend who is a computer science major here at the University of Colorado, and yesterday he wrote a python program to solve the Gear Shift by brute force. Don't worry. No sledge hammers were used.
It does it by doing a breadth-first search of the solution tree. It starts at the scrambled state, and then checks every possible move from there. The beauty is that this puzzle has few enough possible positions that it is not too costly to brute-force the solution.
Actually, we figured out that the puzzle has exactly 1.28 million possible states, which is half the number of possible orientations in which you can place the gears simply by removing them and putting them in however you want. It is possible to end up with it all solved except for a small gear out of place by 1 tooth, but it is impossible to end up with only a big gear turned by 1 tooth, or by any odd number of teeth.
If you have python, feel free to try it out. To run the program, simply scramble your gear-shift, orient the cube with a big gear in the UBL corner, and count the offset of each gear (i.e. how many teeth counter-clockwise is the gear rotated away from the solved orientation). Then open the terminal or command line, navigate to the right folder, and type "python gearshift.py 0 0 0 0 0 0 0 0 ", where you replace each 0 by the counter-clockwise offsets of the scrambled state (look at the source file for an ASCII picture of the cube with the corners labeled). The program will list out the state tree (this should take about 1 to 2 minutes, as it is listing out hundreds of thousands of states), and then it will give you something like:
U x 17
F x 5
L x -15
Again, these are counter-clockwise
gear-tooth turns for a large gear
on the face that it references. Since this puzzle is linear, these moves can be applied in any order! I don't know of any other puzzle with that property!
The idea behind the program is as follows:
- There are 8 gears. 4 of them have 5 teeth, and 4 of them have 8 teeth.
- A particular state of the puzzle is represented by 8 numbers, corresponding to the counter-clockwise displacement of each gear from its solved orientation. Small gears have orientation 0 through 4, and big gears have orientation 0 through 7. (Orientation state 8 is the same as 0 for a big gear, just as orientation state 5 is the same as 0 for as small gear).
- When you turn a gear on one face by 1 tooth, the similarly sized gear on the diagonal corner turns by 1 tooth in the same clock direction, and the two gears of the other size each turn by 1 tooth in the opposite clock direction.
- For example, if you turn one of the big gears a full revolution counter-clockwise (+8 teeth), the small gears on the face will turn -8 teeth. Now the big gears will be at position 0, and the small gears will be at position -8, which simplifies to position 2 (2 teeth counterclockwise from the starting position).
- Using these rules, the program builds a tree from the scrambled state you give it, and expands the tree until it reaches the state 0 0 0 0 0 0 0 0, where all the gears are in the solved position.
I have attached the file. Since the .py extension is not allowed, I changed the extension to .txt to upload it. Change it back to .py when you download it and it should work fine.
I think that the only impossible states on this puzzle are all equivalent to having the entire puzzle solved except for a big gear rotated by an odd number of teeth. Let me know if you find any more.
This program is by DJ Sutton. Feel free to modify it as you see fit. If you make anything interesting out of it, let us know!