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

Enhance schema description in readme #32

Closed spaceone closed 6 years ago

spaceone commented 6 years ago

Hello,

the schema for the cube is not perfectly clear:

             |************|
             |*U1**U2**U3*|
             |************|
             |*U4**U5**U6*|
             |************|
             |*U7**U8**U9*|
             |************|
 ************|************|************|************
 *L1**L2**L3*|*F1**F2**F3*|*R1**R2**R3*|*B1**B2**B3*
 ************|************|************|************
 *L4**L5**L6*|*F4**F5**F6*|*R4**R5**R6*|*B4**B5**B6*
 ************|************|************|************
 *L7**L8**L9*|*F7**F8**F9*|*R7**R8**R9*|*B7**B8**B9*
 ************|************|************|************
             |************|
             |*D1**D2**D3*|
             |************|
             |*D4**D5**D6*|
             |************|
             |*D7**D8**D9*|
             |************|

What are the corners? From which perspective is one viewing on it? Is F7 left bottom? Is L3 left bottom? Better than "L1" numbering would be:

             |************|
             |*BLU*BU*BRU*|
             |************|
             |*BLM*BM*BRM*|
             |************|
             |*BLD*BD*BRD*|
             |************|
 ************|************|************|************
 *LLU*LU*LRU*|*F1**F2**F3*|*R1**R2**R3*|*B1**B2**B3*
 ************|************|************|************
 *LLM*LM*LRM*|*F4**F5**F6*|*R4**R5**R6*|*B4**B5**B6*
 ************|************|************|************
 *LLD*LD*LRD*|*F7**F8**F9*|*R7**R8**R9*|*B7**B8**B9*
 ************|************|************|************
             |************|
             |*D1**D2**D3*|
             |************|
             |*D4**D5**D6*|
             |************|
             |*D7**D8**D9*|
             |************|

Why does a solved cube still generate output?

$ kociemba UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB
R L U2 R L' B2 U2 R2 F2 L2 D2 L2 F2
muodov commented 6 years ago

Hi! The scheme represents an "unfolding" of the cube. If you take into account that letters stand for Left, Right, Up, Down, Back and Front sides, then there is only one possible way to "fold" the cube. So I think it is clear enough. Note that this notation is also common in cubing community.

The solved cube still generates an output due to the algorithm itself. It is designed to give sub-optimal solutions, i.e. not necessary the shortest ones. The beauty of it is that it produces "good enough" solutions in a very short time, that's why it is better suited for practical applications.

muodov commented 6 years ago

I have added a note to the readme

spaceone commented 6 years ago

Thank you very much!