Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Solving Rubik's cube from scratch, in python (fulmicoton.com)
86 points by niels_olson on Sept 8, 2013 | hide | past | favorite | 4 comments


If you're trying to figure this out by hand, without software, here is the general technique:

1. figure out how to swap two corners on the top layer, leaving the rest of the top layer intact, completely screwing up the bottom. 2. rotate the top layer. 3. do the exact opposite of step 1. This will repair the bottom two layers and swap two other corners of the top, leaving you with a 3-cycle or a double swap.

Figure out the same thing with edge pieces.

You can now get all of the pieces in the right location.

Now figure out how to rotate a corner clockwise (only screwing up the bottom two layers), then turn the top and undo it.

You can now rotate all of the corners to the correct position. (For every rotate, you have to un-rotate something.)

Do the same with flipping an edge piece. (You can flip an edge, but you have to unflip another edge.)

NB. With the 3-cycle you developed in the beginning, you will may have to turn an edge to get the three pieces you want to rotate in the right position relative to each other, and then turn it back when you're done with your transformation.

This technique can be applied to similar puzzles.


from a pure math point of view:

You can solve the cube – with commutators! http://lamington.wordpress.com/2013/08/24/you-can-solve-the-...



The link indicated in the comments is how I learned how to solve the Rubik's cube: http://beust.com/rubik




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: