This program and it's associated files are (C) Copyright 1991 by Martin Gitelson. It is to be distributed as shareware. No commercial use may be made other than a reasonable fee for reproduction. Please feel free to distribute by any means, but please keep all the files together. Use at your own risk. I take no responsibility for any damages that may be caused by the use of this program. ----------------------------------------------------------------------------- OVERVIEW ----------------------------------------------------------------------------- The Electronic Cube is an animated Rubik's Cube simulator, solver and tutorial, for anyone interested in learning the workings of the Rubik's cube. It contains two solving algorithms; the one that I and most people use for solving; plus another using more processes than most people can possibly remember just to see how few moves it will take to solve any cube. It doen't start out as a Rubik's Cube program. It started out just playing around with the drawing commands on my new computer. It started out drawing circles and elipses and squares and then cubes and then something that looked like a Rubik's cube and eventually ended up as what you see here. This program is the result of almost two years work. It didn't take nearly that long to write, but it took that long to find, catalog and apply over 400 processes for the solving algorithm. It also took some time to learn the c128 and the Amiga. Most of the processes were discovered with the help of my c128 computer which is still running a search for new and better processes. It can check about 6,000,000 per day. That means it can check all the six move processes in less than a day. The seven move processes take about 2 days. the eight move processes take about 31 days. For nine moves, 480 days. Ten moves would take almost 20 years; and eleven moves 310 years. Then I have to wade through the data to see what can be used. It is now finding about 1 or 2 usable processes per week. Currently, it will solve any cube in under 56 moves with an average of 50 or 51. I am shooting for an average in the high 40's. I think the maximum should be about 50 to 52 or lower when I find enough good strings. ----------------------------------------------------------------------------- HOW TO USE THE PROGRAM ----------------------------------------------------------------------------- KEYBOARD: Typing "u","f","b","r","l","d" will cause any of the six sides; up, front, back, right, left, down to turn in a clockwise direction. Prefixing with an "a" will cause an anticlockwise turn. Prefixing with a "2" causes a half turn. To orient the cube type "ol","or","ou","od","oc","oa" to orient the cube left, right, up, down, clockwise, or anticlockwise. Pressing w before starting to solve causes the solve algorithm to wait after each piece is placed for a key to be pressed. Pressing 1 before starting to solve causes the solve algorithm to wait after each move allowing you to follow along with your cube. All other keypresses are ignored by the program, except for menu shortcuts. MENU Palette: Enables you to change colors to suit your preferences. Enables you to paint each separate piece to match any scrambled cube you wish to solve. Select one of the six colors by clicking on it; then move the pointer to the cube and click again. The color will appear in that area. In order for the program to work correctly, the cube must be painted to match a real world cube. It must have the correct number of red, blue, yellow etc. squares in a pattern that a regular real cube would have. Delay sets the speed of the animation. Mouse Select: Enables turning and orienting the cube with the use of the mouse. Click on the arrow for the direction you want the cube to move. Colors are keyed to the color of the center spot on each surface. When the cube is oriented, the colors change. If you leave this window open, it greatly slows down the Best of 24 solve. Clear Screen: Clears the bottom portion of the screen. Solve: Restores the cube who's picture appears on the screen to it's store-bought condition before you got it all confused using a method I learned from a book many years ago. It takes each piece in turn, conducts a search to find out where that piece happens to be, then selects one of the strings to put that piece back in place. First the upper edges. Second the upper corners. Third the four middle layer pieces. Fourth it places the last corners. Fifth it twists the last corners. Sixth it places the last 4 edges. Seventh it twists the last 4 edges. This solution takes about 60 to 110 moves. Fast Solve: It solves the upper layer one piece at a time. It selects the cheapest first. The original program solved them in order. Selecting the cheapest first saved about 3-4 moves. Next it solves the middle layer, two at a time. It attempts to combine steps 4-7 at one time if the string is available. (There are 15,552 possible configurations of the last layer alone.) If the string is not available it combines steps 4 and 5 and sometimes 7, if that string is available. If not it solves steps 4, 5 and 6 leaving 7 for later. This method takes between 35 and 80 moves. 80 only when one of the strings is missing. Only 37 out of 456 are currently missing. Best of 24: Best of 24 is the same as Fast Solve except it solves the cube, records the number of moves, then orients and solves it again using the same method. There are 24 ways to hold a cube. Starting from a different point can dramatically reduce the number of turns required. Best of 48: There is a fourth method. I wrote a function which chooses the cheapest string for the first pair of pieces in the middle layer. Most of the time it does the same or better than Best of 24 but sometimes it is worse. You can see this method by pushing key #6 with or without the Amiga key. It just seems to take too long to wait while it solves 48 times and then selects the best on an A500; about 40 seconds. You can also see worst of 24 by pressing the 5 key. This was to help find errors. Print: The P key will print the configuration of the upper layer. It's only useful if the lower two layers are intact. Recall: Each time at the beginning of the solve, the configuration of the cube is saved in an array. Recall will get this position back. After Best of 24, Recall brings back the best starting position. Info: Please send donations. After two years of twisting that cube, I'm starting to get sick of it. If you like the program, and would like to see me continue to improve it, for a donation of $15.00 I will send any future revisions within the next year to those interested. I'll also send the source in C. I would also like to hear any constructive criticisms or bug reports anyone might have. If these figures sound too high, send what you think it may be worth. I also have a version that runs on the c64 if anyone happens to be interested. It has everything but the Best of 24 and Recall. This program is actually a port of the c64 version. Also, if anyone is interested in conducting their own search for new processes, I'll send you my search programs which only run on the c128. If enough of us search, maybe we can chop some time off the 4495 year estimate for searching 12 moves. Any or all of the above will be sent for the same donation. I'm not trying to charge by the program; but remember, it takes time to make copies. My address is: Martin Gitelson 511 W. Evergreen Blvd. Vancouver, Wa., 98660 USA