December 17, 2017

How to deal with Rubik's cube in Python

Coordinates of Rubik's cube in kociemba
<Coordinates of Rubik's cube in kociemba>

The kociemba Python library will help you(Link).
  * pip install kociemba

❑ U(Up), R(Right), F(Front), D(Down), L(Left), B(Back)
❑ The order of the argument is U-R-F-D-L-B.
* The solved state is  UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB
❑ The argument UUFLxxxxxxxxxx means U1, U2 are U color, U3 is F color, and U4 is L color.
❑ If input the argument in solve(), move instructions to become solved state are returned.
❑ You can use the second argument to specify the solved state.
❑ The result is U, R, F, D, L B with or without an apostrophe.

For example, it is the result of the movement instruction F that rotates F-face 90 degrees clockwise as shown below. The movement instruction F 'rotates the F-face 90 degrees counterclockwise

How to deal with Rubik's cube in Python F move
<F-face move instruction>

kociemba library usage
<kociemba library usage>