CodingTrain / Suggestion-Box

A repo to track ideas for topics
571 stars 86 forks source link

Rubik's Cube Solver Algorithm #458

Open eporat opened 7 years ago

eporat commented 7 years ago

Hi Dan, I've built my own Rubik's Cube, and I was wondering how a computer would solve it. I have no idea how to do so, or if it is suitable for a Coding Challenge (I don't know how complex the problem is). Thank you and sorry for the terrible suggestion, Eitan.

JulesLabs commented 7 years ago

I think the easiest way would be to implement either LBL, ZZ or CFOP . With beginner's you probably have to hard code some passages for making the cross, while with ZZ you can easily orient the edges, and then to F2L, which is going to be the most difficult part, and then you can also code in some ZBLL, which makes the OLL and PLL faster. CFOP is good because.... I use it to solve! No, but seriously, if you prefer a more "hard-coded" thing CFOP is the way to go, since cross is the same as LBL, pairing up edges and corners can be limited to a few cases and you can still code in COLL and then go to OLL and PLL. What do you think? @eporat