solvers.md (6753B)
1 # Solvers 2 3 This document contains a list cube solvers supported by this library. 4 Some solvers require the cube to be in a certain state before they can 5 be used - see below for details. 6 7 ## The H48 optimal solver 8 9 An HTM-optimal solver using fully-symmetric pruning tables. For details 10 about how this solver works, see [h48.md](./h48.md). For benchmarks see 11 [benchmarks/benchmarks.md](../benchmarks/benchmarks.md). 12 13 * Name: of the form `h8hX` for `X` from 0 to 11. The name `optimal` is 14 an alias for `h48h7`. 15 * Requisites: none. 16 * Moveset: HTM (all 18 basic moves). 17 * From 115MB to 59GB (roughly 2<sup>X</sup>*56MB). 18 19 *Note: for better performance, the solver's data should be 64-byte 20 aligned. To achieve this, one can use 21 [`aligned_alloc(64, size)`](https://en.cppreference.com/w/c/memory/aligned_alloc) 22 in C11 or later, 23 [`_aligned_malloc(size, 64)`](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/aligned-malloc) 24 on Windows platforms, or the 25 [aligned `new` operator](https://cppreference.com/w/cpp/memory/new/operator_new.html) 26 in C++17 or later.* 27 28 ## Coordinate solvers 29 30 Various solvers to solve different substeps, commonly used for Fewest 31 Moves solving. 32 33 The names start either with `coord_` or with `mcoord_`, and the last two 34 letters denote a transformation to adjust the starting orientation. For 35 example, `coord_EO_UR` solves the edge orientation on the RL axis. 36 37 For simplicity and for compatibility with nissy-classic, some aliases 38 are provided. 39 40 ### Edge orientation 41 42 Solve the edge orientation on the FB axis. NISS can be used. 43 44 * Name: `coord_EO_xx`, where `xx` denotes the rotation. 45 Provided aliases are: 46 * `eofb` for `coord_EO_UF` (EO on FB) 47 * `eorl` for `coord_EO_UR` (EO on RL) 48 * `eoud` for `coord_EO_FD` (EO on UD) 49 * Requisites: none. 50 * Moveset: HTM (all 18 basic moves). The ending quarter turns are 51 always clockwise. 52 * Data size: 1.5KB. 53 54 ### Domino reduction 55 56 Solve the domino reduction on the UD axis. NISS can be used. 57 58 * Name: `coord_DR_xx`, where `xx` denotes the rotation. 59 Provided aliases are: 60 * `drud` for `coord_DR_UF` (DR on UD) 61 * `drrl` for `coord_DR_RF` (DR on RL) 62 * `drfb` for `coord_DR_FD` (DR on FB) 63 * Requisites: none. 64 * Moveset: HTM (all 18 basic moves). The ending quarter turns are 65 always clockwise. 66 * Data size: 72MB. 67 68 ### Domino reduction from edge orientation 69 70 Solve the domino reduction on UD from edge orientation on FB. 71 NISS can be used. 72 73 * Name: `coord_DREO_xx`, where `xx` denotes the rotation. 74 Provided aliases are: 75 * `drud-eofb` for `coord_DREO_UF` (DR on UD from EO on FB) 76 * `drrl-eofb` for `coord_DREO_RF` (DR on RL from EO on FB) 77 * `drud-eorl` for `coord_DREO_UR` (DR on UD from EO on RL) 78 * `drfb-eorl` for `coord_DREO_RU` (DR on FB from EO on RL) 79 * `drrl-eoud` for `coord_DREO_FR` (DR on RL from EO on UD) 80 * `drfb-eoud` for `coord_DREO_FD` (DR on FB from EO on UD) 81 * Requisites: edge orientation must be solved on FB. 82 * Moveset: {U, U', U2, D, D', D2, R2, L2, F2, B2}. 83 The ending quarter turns are always clockwise. 84 * Data size: 91KB. 85 86 ### HTR from domino reduction 87 88 Solve the half turn reduction from domino reduction on UD. 89 NISS can be used. 90 91 * Name: `coord_HTR_xx`, where `xx` denotes the rotation. 92 Provided aliases are: 93 * `htr-drud` for `coord_DR_UF` (HTR from DR on UD) 94 * `htr-drrl` for `coord_DR_LF` (HTR from DR on RL) 95 * `htr-drfb` for `coord_DR_BU` (HTR from DR on FB) 96 * Requisites: domino reduction is solved on UD. 97 * Moveset: {U, U', U2, D, R2, L2, F2, B2}. The ending quarter turns are 98 always clockwise. Moreover, solutions are filtered so that at most 99 one D move is used, and it will always appear before any U or U' move. 100 Solutions with consecutive U / U2 / U' / D moves are also filtered out. 101 This solver will produce therefore fewer solutions than nissy-classic. 102 * Data size: 265KB. 103 104 ### Leave slice from domino reduction 105 106 Solve all but the E-layer from domino reduction on UD. 107 The E-layer centers may not be solved. NISS will not be used. 108 109 * Name: `coord_DRSLICE_xx`, where `xx` denotes the rotation. 110 Provided aliases are: 111 * `drudslice` for `coord_DRSLICE_UF` (Leave slice from DR on UD) 112 * `drrlslice` for `coord_DRSLICE_LF` (Leave slice from DR on RL) 113 * `drfbslice` for `coord_DRSLICE_BU` (Leave slice from DR on FB) 114 * Requisites: domino reduction is solved on UD. 115 * Moveset: {U, U', U2, R2, L2, F2, B2}. 116 * Data size: 54MB. 117 118 ### Solve all from domino reduction 119 120 Solve the whole cube from domino reduction on UD. 121 NISS will not be used. 122 123 * Name: `coord_DRFIN_xx`, where `xx` denotes the rotation. 124 Provided aliases are: 125 * `drudfin` for `coord_DRSLICE_UF` (Solve from DR on UD) 126 * `drrlfin` for `coord_DRSLICE_LF` (Solve from DR on RL) 127 * `drfbfin` for `coord_DRSLICE_BU` (Solve from DR on FB) 128 * Requisites: domino reduction is solved on UD. 129 * Moveset: {U, U', U2, D, D', D2, R2, L2, F2, B2}. 130 * Data size: 54MB. 131 132 ### Solve corners (fixed centers) 133 134 Solve the corners of the cube. The centers are considered fixed, 135 this is not the same as solving a 2x2x2 cube. 136 137 * Name: `coord_CORNERS_UF`. Other rotations in place of `UF` are allowed, 138 but they are irrelevant to the solver. Provided alias: `corners`. 139 * Requisites: none. 140 * Moveset: HTM (all 18 basic moves). 141 * Data size: 1.2MB. 142 143 ### Solve corners (ignoring centers) 144 145 Solve the corners of the cube relative to each other, ignoring centers. 146 This is the same as solving a 2x2x2 cube. 147 148 * Name: `coord_CORNERSX_UF`. Other rotations in place of `UF` are allowed, 149 but they are irrelevant to the solver. Provided alias: `cornersx`. 150 * Requisites: none. 151 * Moveset: {U, U', U2, R, R', R2, F, F', F2}. Note: if the given cube 152 has an orientation different from the standard `UF` orientation, the 153 solution will use a different moves. The solution will always only use 154 at most 3 different types of moves (as in U, R, F). 155 * Data size: 1.2MB. 156 157 ### Undocumented coordinate solvers 158 159 There are some coordinate solvers that have not been listed above. These 160 are generally not very useful on their own, but instead they are combined 161 to produce some of the more complex coordinate solvers above. 162 163 These solvers include: 164 165 * `coord_CPEPE_xx`: solve the permutation of the corners and of the E-layer 166 edges. Requires DR to be solved on UD. 167 * `coord_DRFINNOE_xx`: like the "leave slice" solver, but the U and D 168 layers are going to be adjusted so that centers are solved. We chose 169 to use `coord_DRSLICE_xx` as described above as it may produce shorter 170 solutions, and it is easier to filter out duplicates (solutions that 171 differ only by how they affect the E-layer). 172 173 ## Planned future solvers 174 175 The following solvers are planned to be introduced in the future: 176 177 * Finish from HTR 178 * JZP / Axial reduction, from EO or direct 179 * Finish / leave double slice from JZP