Jump to content
  • Advertisement
Sign in to follow this  
harmeht

rubiks cube AI in this program?

This topic is 5412 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i am trying to write a rubiks cube program and I came along this freeware http://www.atmansoftware.com/webfiles/coda.htm i was wondering if anybody knew how they are doing this? is it actually using an algorithm to solve the cube or is it some hack? it looks convincing to me. i havent checked with a real cube though. any pointers on how to solve the cube in the shortest possible time would be helpful. out of curiousity, is there an opengl for dos? i think i will post this in a diff forum. thank you harmeth

Share this post


Link to post
Share on other sites
Advertisement
Oddly enough, I was talking about a program solving a rubik's cube with a friend just today. What he suggested (that a program might do), is it starts with a solved cube, then messes it all up, but you could easily record the moves it made, including those of the user, then when "solved" is pressed, it simply does those moves in reverse order. Sorry I don't have time to check your link, but this would be an easy way to do it.

Share this post


Link to post
Share on other sites
check out:
http://jeays.net/rubiks.htm

And there is some sort of opengl for dos, but then you don't have hardware support, so it's software only....

Share this post


Link to post
Share on other sites
There was a guy that held a rubicks cube programming contest awhile ago. Here is the link to the site (you can download the submitted source code, and there are some REALLY smart and efficient algorithms).

http://tomas.rokicki.com/cubecontest/winners.html

Share this post


Link to post
Share on other sites
Isn't it supposed to be able to be solved with 14 turns from any position? If this is true then you could just brute force try each way until you get it right. This would be the fastest to solve as far as number of turns to get it to completion.

There is also the systematic way to solve it. Thats how I solve them (In real life) but it will require many more turns, and will probably be a little more involved to program (especially if you cant do a real one). This would be the fastest way for the computer to solve it, but not efficient as far as the number of turns you have to make.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster


rixter, I did think of the backtracking solution. (i.e storing all the moves used for jumbling the cube and then just tracking it backwards.)

but the cube in the link I had forwarded earlier allows you to paint the cube the way you prefer and lets the computer solve it for you. that is what I find interesting.

i have been looking around.

hmm..

- harmeht

Share this post


Link to post
Share on other sites
If you buy an actual cube it comes with the "solution/algorithm" with how to solve it. It should be no problem coding it up from there...also if you google rubik's cube algorithm you can see all kinds of solutions...I guess there is 40+ different ways. Here is one that my brother uses to solve them.
Good Luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!