Guest Posted August 17, 2010 Report Share Posted August 17, 2010 your goal is to write a program that solves a mixed-up rubix cube. (3x3x3) Quote Link to comment Share on other sites More sharing options...
0 Guest Posted August 17, 2010 Report Share Posted August 17, 2010 So my goal is to do your programming homework for you? Quote Link to comment Share on other sites More sharing options...
0 Guest Posted August 17, 2010 Report Share Posted August 17, 2010 So my goal is to do your programming homework for you? Dude, if you'd been around this forum for a while you'd know that dude doesn't need anyone doing his homework, he's one of the top riddlers here... What kind of school would give out homework to make an algorithm as nasty as that anyways? Back on topic: I've been trying to crack the rubic cube since I was 10, I have about 3 or 4 laying around the house and one of them I'm using as a cupholder, once I figure out how to actually solve one myself I'll start thinking about teaching a comp to do it... Quote Link to comment Share on other sites More sharing options...
0 Guest Posted August 18, 2010 Report Share Posted August 18, 2010 There are a lot of ways to do this. But the best solution is to use an parallel distributed genetic algorithm.. Then you don't need to know how to solve one yourself, and you don't need to worry if it is 3 X 3 X 3 or if it is a n X n X N. Actually built the thing as homework for at my faculty , it was fun. Go do your own homework Quote Link to comment Share on other sites More sharing options...
0 Guest Posted August 18, 2010 Report Share Posted August 18, 2010 This a method to solve them but I don't know it. If I did I would have a go turning it into an algorithm. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted August 20, 2010 Report Share Posted August 20, 2010 A 3x3 rubix cube can always be solved in 20 steps. There are 17 possible moves each step (18 for the first move), yielding: 17^20 = 4,064,231,406,647,572,522,401,601 possible combinations. I don't think brute force is going to cut it here. As long as we're not concerned about execution time, you could do a semi-brute force method, re-syncing at known checkpoints (you'd have to keep the steps between checkpoints <=7 i think) you may be able to reach checkpoints. http://www.alchemistmatt.com/cube/Denny3x3/topedges/topedges.html breaks down solving the rubix cube down into steps that are small enough that BFM between steps is possible. This would be the approach I would take. I'm sure there is a much more elegant (and exponentially more complicated) way of doing it Quote Link to comment Share on other sites More sharing options...
0 EventHorizon Posted September 13, 2010 Report Share Posted September 13, 2010 Use (possibly bidirectional) breadth-first search to find the shortest solution. If you want a fast-to-find solution, code up the "fastest rubik's cube solution" on the web. Then it isn't really a search task, just following steps. Removing searching will speed it up immensely, but you won't get the shortest solution. As for rubik's cubes, I'm not fast at all but I can solve any size. I've got a 7x7x7 vcube and it takes me an hour and a half to solve it. I use a method that combines my solutions (including parts of algorithms I looked up on the web and memorized) for the 4 and 5, but does so quite slowly. How can people solve that thing in 5 minutes.... Quote Link to comment Share on other sites More sharing options...
0 Guest Posted September 20, 2010 Report Share Posted September 20, 2010 I can solve a 3x3 in about 2 minutes, but there are machines that can do it for about 30 seconds(if they were as mobile as humans it will probably take them 10), but the point is that machines seem to randomly play with the cube and then tah-dah-solved while most people use formulas and you can actually see their progress.I'm not in programming' but I bet it will take some time to make a program that always works and shows it's working(step by step). Quote Link to comment Share on other sites More sharing options...
0 Molly Mae Posted September 20, 2010 Report Share Posted September 20, 2010 I need something to generate an array representing the unsolved cube. I'll be writing an interface in which you can input the "unsolved cube." It will solve it, output the number of steps, and detail each move. It's not brute force, though, and doesn't solve it in the fewest moves. It follows the pattern I know for solving a 3x3x3, checking itself after each step. Alternatively (and as a joke), I'll write up one that simply renames one side to an appropriate color (or number) making the cube appear solved. This would be the program-equivalent of removing the stickers and placing them on their respective sides. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted September 20, 2010 Report Share Posted September 20, 2010 (edited) how about, up, up, down, down, left, right, left, right, a, b, select, start Edited September 20, 2010 by verymoody Quote Link to comment Share on other sites More sharing options...
0 Guest Posted September 20, 2010 Report Share Posted September 20, 2010 how about, up, up, down, down, left, right, left, right, a, b, select, start what does that mean Quote Link to comment Share on other sites More sharing options...
0 Guest Posted September 20, 2010 Report Share Posted September 20, 2010 by the way if you people need help with formulas and stuff-ask, I can do pretty much everything Quote Link to comment Share on other sites More sharing options...
0 Molly Mae Posted September 21, 2010 Report Share Posted September 21, 2010 That's actually the funniest thing I've heard in awhile. It's a reference to the NES console--the button sequence for many cheats. --- I'm taking this rubik's challenge to a new level. I'm going to write a windows batch file to scramble and solve it. It's actually not nearly as daunting as I had originally imagined. Quote Link to comment Share on other sites More sharing options...
Question
Guest
your goal is to write a program that solves a mixed-up rubix cube. (3x3x3)
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.