Magic Cube 4D
screenshot

MagicCube4D is a fully functional four-dimensional analog of Rubik's cube. The image above shows the puzzle in its solved state. Click on it for a simple resizable applet version that you can interact with to get a feeling for how it works. Download the full-featured application below and try to solve it. Please read the FAQ for a more complete description of the puzzle. If the Java applet or application fail to start you may need to install a Java virtual machine. Click here for a current one.

Don Hatch and Melinda Green have developed it on and off over several years. Jay Berkenbilt has recently joined us to help with Linux support and source control. Don and Jay were the first to have solved the puzzle making extensive use of the move macro facility in the UNIX version. Roice Nelson became the first person to solve the puzzle without using macros. For his solution, he extended Philip Marshall's 3D  "Ultimate Solution to Rubik's Cube". You can learn Roice's solution if you don't feel like trying to solve it yourself first. Using his techniques, Roice and others have continued to find ever shorter solutions so that the record currently recovered by Roice required only 334 twists! You can find documentation of these and other milestones on the MagicCube4D Hall Of Fame page. If you solve it with or without reading the solution, send us your log file and we'll list you in the MagicCube4D hall of fame too!

The mathematically inclined may be interested to know that the number of possible states for the 4D cube is exactly

 (24!x32!)/2 x 16!/2 x 2^23 x (3!)^31 x 3 x(4!/2)^15 x 4

which can also be expressed as
32! 24! 16! 2^22 6^32 12^15
or in decimal as
1 756 772 880 709 135 843 168 526

079 081 025 059 614 484 630 149

557 651 477 156 021 733 236 798

970 168 550 600 274 887 650 082

354 207 129 600 000 000 000 000

For comparison, the normal 3D Rubik's Cube has only 432 520 032 274 489 856 000 unique positions which is still huge. On the other hand, the 4D cube has more potential positions than the total number of atoms in the universe! Far more. Click the following link to learn how to calculate 4D cube permutations. Surprisingly, even though the number of 4D cube positions is frighteningly large this doesn't mean this puzzle is that many times harder to solve. If you can already solve the 3D cube, then you're more than half way to solving this one. All the techniques you already know will apply here as well. We maintain a 4D cube mailing list for discussing these and other related topics. Please feel free to read the archives and post your own thoughts and questions.

New! Remigiusz Durka recently took the record for shortest 34 but Roice Nelson who seems to believe that prize belongs to him alone took it right back with a sub-300 twist solution! Read about this and other drama here and in the mailing list archives.

Believe it or not, Roice wrote a 5D version of this puzzle that he and some others have even solved! After you get into the 4D hall-of-fame you may want to try for the 5D Hall-Of-Insanity!

Also of interest: David Vanderschel wrote a 3D Rubik's cube simulator using the 3D equivalent of the 4D projection and user interface to the 4D puzzle which he naturally calls Magic Cube 3D. It may seem odd to create a 3D analog of a 4D analog of a 3D puzzle but there is a logic to it as it helps to make clear the meaning of the working and user interface of the 4D puzzle.

Just for fun, to see what the equivalent 2D puzzle would look like, click the following link to see MagicCube2D!

Download your package of choice
 
Java
or right click here
Linux
or right click here
Linux
or right click here
UNIX
or right click here
UNIX
or right click here

Note:  Interne tExplorer may truncate the file name. You can right-click the above links to save with the full name.

Java
The Java version is packaged in an executable jar file which should run on any system with a Java virtual machine installed. The source code is included.
Linux
The RPM version will work on RedHat 6.0 and 6.1 Intel systems.
The statically linked Linux version (built on a RedHat 6.1 system) should work on any recent Linux distribution.
Source Code
Programmers are welcome to download the complete source code to MagicCube4D. You are free to use and modify the code for non-commercial purposes as long as obvious credit for the source of the code and the designs it embodies are clearly made, and ports and derived versions of 4D Magic Cube programs are not distributed without the express written permission of the authors.
License
We don't much care what you do with MagicCube4D. We simply hope you enjoy it and would love your feedback. Give it to your friends, post it on the net, whatever you like. We only require that if you want to use it for some commercial purpose such as adding it to a game pack, or using it as a demo to help sell your product, that you get our written approval first. Feel free to link to this page to always have access to the current versions.
Log File Utilities
  • A small Perl program by Jay Berkenbilt that counts the twists in a log file ignoring marks, scramble twists, and rotation moves.
  • A large Perl program by Don Hatch which implements a complete solution algorithm. Feed it either a complete log file or just the first part which describes a scrambled cube state and it outputs a complete log file containing a set of twists that will return a scrambled state to the solved state.
Other 4D Cube Puzzle Implementations
Web Pages Linking to this one (found using google link lookup)


Back to the Superliminal home page.