|
| 1 | +# three-style |
| 2 | + |
| 3 | +[](https://github.com/luckasRanarison/three-style/actions/workflows/ci.yml) |
| 4 | +[](https://crates.io/crates/three-style) |
| 5 | + |
| 6 | +three-style is a program that searches 3x3 commutators used in 3-style, an advanced method for solving the Rubik's cube blindfolded by swapping 3 pieces at a time without affecting the rest of the cube. |
| 7 | + |
| 8 | +## Contents |
| 9 | + |
| 10 | +- [Installation](#installation) |
| 11 | +- [Usage](#usage) |
| 12 | +- [Concept](#concept) |
| 13 | +- [References](#concept) |
| 14 | +- [Contributing](#contributing) |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +You can use three-style by downloading the prebuilt binary for your system from the [releases](https://github.com/luckasRanarison/three-style/releases) or by installing it using cargo: |
| 19 | + |
| 20 | +```bash |
| 21 | +cargo install three-style |
| 22 | +``` |
| 23 | + |
| 24 | +## Usage |
| 25 | + |
| 26 | +three-style uses layers for describing pieces or more precisely sticker targets. Example: `UF` (edge), `UBL` (corner). Currently, it only exposes one main command `search` and is used in the following way: |
| 27 | + |
| 28 | +```bash |
| 29 | +three-style search --gen RUD --corners UFR UBL RFD --depth 4 |
| 30 | +three-style search -g RUD -c UFR UBL RFD -d 4 |
| 31 | +three-style search --gen RUE --edges UF UB LF --depth 4 |
| 32 | +three-style search -g RUD -e UF UB LF -d 4 |
| 33 | +``` |
| 34 | + |
| 35 | +> [!NOTE] |
| 36 | +> Depth is relative to the length of the commutator in its notation form. |
| 37 | +
|
| 38 | +## Concept |
| 39 | + |
| 40 | +A commutator is an algorithm of the form: `A B A' B'` which allows us to swap 3 pieces at once without affecting the rest of the cube. It's commonly described in the following notation: `[A, B]`. |
| 41 | + |
| 42 | +It consists of two basic parts: |
| 43 | + |
| 44 | +- An **interchange** is a single move that swaps two pieces without affecting the third one |
| 45 | +- An **insertion** are three moves that insert the third piece into one of the two pieces spot without affecting the other one. |
| 46 | + |
| 47 | +But not all cases can be solved using pure commutators, some cases require using setup moves. A **setup move** is a sequence of moves that turn the case into a case that can be solved using pure commutators. Commutators that use setup moves are of the form `S A B A' B' S'` and are more commonly written as `[S: [A, B]]` |
| 48 | + |
| 49 | +> [!NOTE] |
| 50 | +> Edges has a special case called **4 movers** which don't use the normal 3 moves insertion. Example: `[M', U2]` |
| 51 | +
|
| 52 | +The program basically does an interative DFS and applies these rules to find commutators. Because these rules allow efficient prunning, search is decently fast. |
| 53 | + |
| 54 | +## References |
| 55 | + |
| 56 | +- [3-style tutorial by Timothy Goh](https://youtu.be/Bq9oz1k5wP4?si=fC3Xi_7j0ehMaepG) |
| 57 | + |
| 58 | +- [Cube explorer](http://kociemba.org/cube.htm) |
| 59 | + |
| 60 | +## Contributing |
| 61 | + |
| 62 | +Bug reports, Pull requests and feature requests are all welcome! |
0 commit comments