muodov / kociemba

A pure Python and pure C ports of Kociemba's algorithm for solving Rubik's cube
GNU General Public License v2.0
561 stars 126 forks source link

Running with a solved cube #44

Closed jegali closed 2 years ago

jegali commented 2 years ago

When running the solver with a string for the solved cube, it returns this:

R L U2 R L' B2 U2 R2 F2 L2 D2 L2 F2

Why is that so? I would expect to print the solver "solved cube"

muodov commented 2 years ago

Hi @jegali , kociemba is the implementation of the Two-Phase algorithm, which doesn't check for special cases, it just gives you a technically possible solution. Detecting a solved cube is very straightforward, you can do it before calling the solve() function.