Snake Cube 4 x 4

What is it about ?

The snake cube is a puzzle for children and adults. It is the next level of known 3 x 3 cubes. The puzzle can hardly be solved without the delivered instructions. Some solutions and other 4 x 4 cube types can be found in the internet. However it is a nice application to simulate it on the computer and try to find the solution(s).
Snake Cube 4 x 4
The picture shows the snake cube 4 x 4.

How does is work ?

C++ was used to write a little program. It is a nice application for recursive coding. The C++ compiler of Microsoft Visual Studio was used. The program simulates all relevant start positions (0,0,0), (1,0,0), (1,1,0), (1,1,1) and relevant start directions. It needs about 3 millions tries and takes about 5 seconds to calculate it on my machine (Win 10, i5 processor). Symmetric solutions are waived manually. The project can be found here.
VS project
The picture shows the snake in a line.

How many solutions ?

There is exactly one real solution. The simulation on the computer gives some more symmetric solutions. As you can see on the picture after step 1, 5, 30 you can chose two possible ways. This creates 7 more symmetric solutions. Symmetric start positions gives another 12 possibilities. So in total there are 96 (!) symmetric solutions.
Snake Cube Solution
The picture shows a solution for the snake cube 4 x 4.

More information ?

Philip Strauß
It has nicely animated instructions. It gives C# code for VS too.
Jürgen Köller
It shows the search algorithm which can be applied recursively.

© F.K. 05|05|16