3

Possible Duplicate:
Solving Rubik’s cube programmatically

i would like to create an application to solve rubik's cube. I read that a computer can solve it in max 20 moves. However searching on internet I can't find how to implement that. So i think about the Fridrich method ( http://en.wikipedia.org/wiki/Fridrich_Method ). But it's hard to teach to the pc all the algorithms. Any suggestions? p.s. Sorry for my english :)

Community
  • 1
  • 1
  • 1
    What techniques/technology have you tried using with the Fridrich method? – itsbruce Nov 01 '12 at 18:21
  • I'd just start out with solving it the human way. Add in some pattern recognition and work through the cross, corner pieces, second layer and then the three steps for the last layer. – Blender Nov 01 '12 at 18:24

2 Answers2

2

The proof that any position can be solved in 20 moves required 35 CPU-years to compute.

It was, however, a constructive proof: for each position (modulo symmetry) it computed an actual solution of 20 moves or less (though not necessarily the optimal solution for that position).

The source code they used to do this is available. It's written in C but using literate programming through CWeb, so it's fairly self-documenting.

Thomas
  • 174,939
  • 50
  • 355
  • 478
1

You can use the Korf's Algorithm

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331