|
1 | 1 | # MINDCUB3R |
2 | 2 |
|
3 | 3 | ### Installation |
4 | | -This can take a minute on an EV3 |
5 | | -* cd ~/ev3dev-lang-python/demo/MINDCUB3R/kociemba/ckociemba/ |
6 | | -* sudo apt-get update |
7 | | -* sudo apt-get install build-essential |
8 | | -* make |
9 | | -* sudo make install |
10 | | - |
11 | | -The first time you run this it creates a cache directory, this takes about 30s on an EV3 |
12 | | - |
13 | | -* cd ~/ev3dev-lang-python/demo/MINDCUB3R/ |
14 | | -* kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD |
15 | | - |
| 4 | +This can take several minutes on an EV3 |
| 5 | +``` |
| 6 | +sudo apt-get install build-essential python3-pip libffi-dev |
| 7 | +sudo pip3 install git+https://github.com/dwalton76/kociemba.git |
| 8 | +sudo pip3 install git+https://github.com/dwalton76/rubiks-color-resolver.git |
| 9 | +kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD |
| 10 | +``` |
16 | 11 |
|
17 | 12 | ### Running |
18 | 13 | ./rubiks.py |
19 | 14 |
|
20 | | - |
21 | | -### Credit |
22 | | -Much of rubiks.py and rubiks_rgb_solver.py were ported from |
23 | | -https://github.com/cavenel/ev3dev_examples |
24 | | - |
25 | | -The kociemba code is from |
26 | | -https://github.com/muodov/kociemba |
| 15 | +### About kociemba |
| 16 | +You may have noticed that the |
| 17 | +`kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD` |
| 18 | +step of the install looks a little odd. The "DRLUU..." string is a |
| 19 | +representation of the colors of each of the 54 squares of a 3x3x3 cube. So |
| 20 | +the D at the beginning means that square `#1` is the same color as the middle |
| 21 | +square of the Down side (the bottom), the R means that square `#2` is the same |
| 22 | +color as the middle square of the Right side, etc. The kociemba program takes |
| 23 | +that color data and returns a sequence of moves that can be used to solve the |
| 24 | +cube. |
| 25 | + |
| 26 | +``` |
| 27 | +robot@beaglebone[lego-crane-cuber]# kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD |
| 28 | +D2 R' D' F2 B D R2 D2 R' F2 D' F2 U' B2 L2 U2 D R2 U |
| 29 | +robot@beaglebone[lego-crane-cuber]# |
| 30 | +``` |
| 31 | + |
| 32 | +Running the kociemba program is part of the install process because the first |
| 33 | +time you run it, it takes about 30 seconds to build a series of tables that |
| 34 | +it caches to the filesystem. After that first run it is nice and fast. |
0 commit comments