Visual Basic 2010 (Console) Guide
Pocket Cube - Extensions

The program you have is good enough to produce outright solutions. There are some fairly obvious things that can be done to take the program forwards.

Tidying Up

This program needs a menu and a loop that allows you to keep using it. That way, you only generate the tables once.


You don't need to make the big table to find solutions to the puzzle. Jaap's Puzzle Page outlines an approach in the section on pruning tables.


The difficult part of using this program is getting the input right. There are lots of ways of making this easier. If you take the references to the Console out of the program, you can copy the whole thing into a Windows Forms projects.

You can represent the entire puzzle visually if you use a flat representation of the puzzle. Mouse clicks can be used to swap and twist pieces. A 3D representation isn't too tricky if you keep it still - you would need two images to show all part of the puzzle.


A program like this can be used to develop a memorable solution to the puzzle. This means breaking the problem down into stages. The Ortega method is a nice place to start.

First Stage - Orient One Layer

You shouldn't need a computer program to do this. It means you make one face have 4 stickers of the same colour without worrying about whether the pieces are in the correct position.

Second Stage - Orient Last Layer

With the oriented face pointed downwards, you are left with the following situations,

pocket cube

The orientations are shown below each image. To make the program work well here, you really need a way of ignoring the permutation of the top layer pieces. It makes sense to a cuber not to move the bottom layer around at this stage. The way I do this is to write a new function that whizzes through the tables looking for which permutations are the shortest distance from solved with the given orientation. I then use the solving procedure to find the solution to that. The result is a shorter sequence than if I needlessly try to preserve the top layer permutation.

Third Stage - Permute Both Layers

For this stage, the program is ready to go. In each of the cases shown, all of the pieces are oriented - 0. Any sequences found will solve the cube outright from these positions.

pocket cube


A really cool thing to do is to use a web cam and get the program to read the state of the cube this way. It's a big project in itself but it is something that has been done by lots of people and many have documented the methods that they used.