* Shuffle the Rubik's Cube then try to solve it. ** Drag the Mouse to twist the cube! (new in version 2) (Only drag within a big face of the Rubik's Cube). ** Click Toolbox for faster speed & arrows for twists. * If you solve the Rubik's Cube, a Save Code will be displayed. You can copy the whole Save Code including your username into the project comments. ** It is easiest to "See inside" to copy the whole code which may be quite large. Other Scratchers can then Load your code and watch. * Use the Auto Solve button to watch the project solve the cube using the Highest Order AXis algorithm written by Scratch-Minion and described below. When using Auto Solve, you will not get a Save Code. * A very short example Save/Load Code (include the whole name Scratch-Minion below): Scratch-Minion#OEQVLIOAWJAKAPFLZL1Q#DUJKL3RH6LXSRZJ1UN1M7V6MRV * A "normal" Save/Load Code which was the first time I solved the Rubik's Cube using this project: Scratch-Minion#LHNXFMWBXL1DRCMCZHTG#PDM5BGU6KINIJI4MPH45B3A1LX1R7ML5XXNAWSKFFBVYD7R7CNSAFMKHNMGT1J7YK8BLD8N6CSQUZVGYFYR7T8ASQ8EA4G5588DDADRUZ64A5L8OBAC3C3XG6JLG8OMUJQWAFAJFK1I5GUJQF8EAEUHSGZMMJMNM8PGS5A1H43535S8PGSFUIXB35353T6WAZCYF653Q How The Highest Order AXis algorithm Works -------------------------------------------------------------- When you press the "Auto Solve" button, the Rubik's Cube is solved using the Highest Order AXis algorithm that I created and wrote myself. There are 27 possible moves/twists that you can make to the Rubiks Cube. For each of the X, Y, Z axes there are 3 layers each of which can be turned, 90, -90 or 180 degrees. The Highest Order AXis algorithm tries each of these 27 moves from the current cube position and gives each of these 27 moves a score depending on how well the small cube faces of each colour "align". The algorithm then chooses the move with the highest score. Faces "align" not only if they are on the face of the Rubiks Cube which has that colour as the central colour of the face but also if there are an equal number of steps that would bring many of the other faces of that colour onto that Rubiks Cube face. Faces with "perfect alignment" have their other coloured faces also correctly aligned with the centre face of the Rubiks Cube that they would be rotated to when the steps are executed to bring them to the correct face. These are called "orientation points" which are combined with the "alignment points" to calculate the overall score for a move. The algorithm gives up if more than 20 best scoring moves are required.
Version 2 Updates ------------------------- * Adjust animation speed - click Toolbox at top right. up to 3x faster (I like the default slowest speed). * "How to Solve the Rubik's Cube" * Tutorial * Switch in and out of the tutorial as you work. * Combo buttons that do a sequence of moves See the tutorial. * Drag the Mouse to twist layers (Only drag within a big face of the Rubik's Cube). ** If you try this project on a tablet or cellphone, please let me know how it goes with a touch screen! ** Several Scratchers said Version 1 was laggy. It ran ok on my 8 year old second-hand PC, but I have now provided faster animation via the Toolbox. Link to my original Rubik's Cube Project: https://scratch.mit.edu/projects/298745575/ * I have a real Rubik's Cube at home that has been in a drawer unsolved for about 40 years. I got it out and carefully followed the instructions on the following web page to solve it for the first time: "How to solve the Rubik's Cube? Beginner's Solution" https://ruwix.com/the-rubiks-cube/how-to-solve-the-rubiks-cube-beginners-method/ The project tutorial is taken from this web page. There are 43,252,003,274,489,856,000 possible configurations for a Rubik's Cube. Every position of a Rubik's Cube can be solved in 20 moves or less. A move may be a quarter or half twist. Alternatively, every position of a Rubik's Cube can be solved in 26 quarter turns or less. https://en.wikipedia.org/wiki/Rubik%27s_Cube Huge thanks to @TheLogFather for his "Triangle Filler" https://scratch.mit.edu/projects/24828481/ See 3D Tutorial Studio to draw and rotate 3D objects: https://scratch.mit.edu/studios/5040029/ game games animation animations tutorial tutorials #Rubik #Rubiks #Rubik's