Help with Cube solver (plz)

This is the place for queries that don't fit in any of the other categories.

Help with Cube solver (plz)

Postby dxxanthony » Fri Jun 14, 2013 4:02 pm

Hello guys I am new to this forum, and I need help programming a simple app that will generate w solution for the rubiks cube to use with my cube solver robot.

I can get the colors of every face of the cube using a webcam, but I can't find any python program that can generate the solution in form of a string :( I searched a lot using google but found nothing, most solvers are java or C++ with GUI.

And I don't have the knowledge yet to program it myself, so if anyone can help please let me know .

Thank you .
dxxanthony
 
Posts: 5
Joined: Fri Jun 14, 2013 3:45 pm

Re: Help with Cube solver (plz)

Postby micseydel » Fri Jun 14, 2013 4:36 pm

"Do it for me" posts usually go here. We do like to help though.

When I Googled "rubik's cube solver python" the first result was an unfriendly pastebin link that a little bit of knowledge of Python would probably let you use. That said, if you're not willing to go that far, you'd have to at the very least tell us what you have, such as what your input data looks like, and someone might feel generous enough to help you interface the pastebin code with yours.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1355
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Help with Cube solver (plz)

Postby dxxanthony » Fri Jun 14, 2013 4:44 pm

I am not asking for a pastbin code , I wanted to know if anyone can tell me the method or algorithms used and I will code it myself.

And my input for the code isn't ready yet, I just can tell the colors of every face of the cube that is why I didn't post it .

Sorry for any misunderstanding, I am ready to go even further that is only one piece of the robot...
dxxanthony
 
Posts: 5
Joined: Fri Jun 14, 2013 3:45 pm

Re: Help with Cube solver (plz)

Postby micseydel » Fri Jun 14, 2013 4:50 pm

There are a plethora of Rubiks' Cube solving algorithm websites. Google is your friend. If you have a specific question about how to turn a specific part of the algorithm you find into code, feel free to post again with as specific of a question as possible.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1355
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Help with Cube solver (plz)

Postby Yoriz » Fri Jun 14, 2013 5:02 pm

This might have some useful code in it
https://launchpad.net/pybik/
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 832
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: Help with Cube solver (plz)

Postby dxxanthony » Fri Jun 14, 2013 5:07 pm

hmmm I will try pybik before deciding to code my own solver, thank you.
dxxanthony
 
Posts: 5
Joined: Fri Jun 14, 2013 3:45 pm

Re: Help with Cube solver (plz)

Postby dxxanthony » Fri Jun 21, 2013 4:01 pm

I DONE IT :D :D :D :D :D :D
All by myself from scratch ....
I used my the basic F2L method and algorithms, I input the colors of every face (w : White | y : Yellow | b : Blue | g : Green | r : Red | o : Orange) in the order shown in the picture below and the program will generate the solution :D. I know it is not an advanced solver (it solves the cube in about 125 moves) but it is good enough for me, being new to programming (I am still a school student) and it took me only 5 days of work :D

Image

Here is the download link for the code if anyone is interested :

http://rapidshare.com/files/3303586435/cube-solver.py
dxxanthony
 
Posts: 5
Joined: Fri Jun 14, 2013 3:45 pm

Re: Help with Cube solver (plz)

Postby hansn » Fri Jun 21, 2013 6:33 pm

Well done :)

Btw you can post code directly on the forum with code tags.
hansn
 
Posts: 87
Joined: Thu Feb 21, 2013 8:46 pm

Re: Help with Cube solver (plz)

Postby Yoriz » Fri Jun 21, 2013 6:41 pm

hansn wrote:Well done :)

Btw you can post code directly on the forum with code tags.

I tried to edit his post to add the code in code tags but its way to large to fit in one post.
Your message contains 94118 characters. The maximum number of allowed characters is 60000.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 832
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: Help with Cube solver (plz)

Postby dxxanthony » Sat Jun 22, 2013 5:49 am

:P I know.. the code is massive. But I am sure it can be reduced to half it size, I repeated several lines while I could have used a function. Anyway I am not planning to make it better right now, because I am busy with the robot's mechanics and electronics.

But thank you guys, I wouldn't have made this project if no one had encouraged me :D
dxxanthony
 
Posts: 5
Joined: Fri Jun 14, 2013 3:45 pm


Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot], MSN [Bot], W3C [Linkcheck] and 2 guests