Here’s something fun from my latest programming assignment, a Rubik’s Cube (sort of) with auto-solver. It was my first attempt at C++ language, a more powerful version of the C language. Personally, I prefer it over C because of the powerful built-in data structures and their equally-efficient member functions. Also, it’s much easier to do object oriented programming on it. Praise the guy who invented it!
Today, I’m giving away the source code for [2D]RubikSolve because it’s not easy to plagiarised and experienced coder probably won’t use my messy code.

As you can see from the screenshot above, it’s not the conventional Rubik’s Cube that we see everyday. It’s more of a number puzzle where you have to arrange the numbers into ascending order using a set of predefined moves. Nonetheless it’s still challenging to do, particularly the GUI and AI subsystems.

There are some command line arguments that you can use. Just type “rubik.exe -help” in the command line console to see them. Note that the programme requires a text file with the numbers in it to run the puzzle. There are no specific format for typing the numbers. Just remember to leave a space between each number.
The AI algorithm for the automated mode isn’t optimized in this version. As such it’ll need to run up to an hour on a modern computer to complete a 10-step puzzle, which is the hardest difficulty. 6 steps will probably need less than one minute though. Keep in mind that the AI searches for the shortest solutions which in academic study is more important. I can do a brute force hit-and-run method that saves a lot of time but also produces redundant moves. So is this only what I can do? Of course not. Guess what, I produced another algorithm that can solve even the hardest puzzles under one second!
From one hour to one second.
The problem with my AI algorithm is efficiency. There are a lot of redundant instructions and dependent data to go through. Not satisfied with that, I redo the code in my spare time for two weeks, going through several versions. Each faster than before. The speedbreaker that did it in 0.5 second? Did it in half hour. It was a brain fart cum eureka moment.
You must run the programme in command line console. You have to include the file’s name as command line argument, ie. “rubikdevcpp2 filename.txt“. No source code is include because it’s easy to be plagiarised.
Download turbo auto-solver (no name for it) here.
Download [2D]RubikSolve here.
2 responses to “[2D]RubikSolve v1.1 and turbo auto-solver.”
-
Buy:Zocor.Acomplia.Aricept.Prozac.Benicar.Zetia.Seroquel.Lipothin.Ventolin.Amoxicillin.Buspar.Lipitor.Female Cialis.Advair.Lasix.SleepWell.Female Pink Viagra.Cozaar.Wellbutrin SR.Nymphomax….
© 2009 Powered by tehCpeng.net & WordPress. Contents provided in this website are absolute properties of Piaw unless stated otherwise.


Buy:Zovirax.Petcam (Metacam) Oral Suspension.Mega Hoodia.Zyban.Nexium.Valtrex.Human Growth Hormone.Actos.Accutane.Prevacid.Prednisolone.Lumigan.Synthroid.Retin-A.100% Pure Okinawan Coral Calcium.Arimidex….