diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-01-22 00:29:48 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-01-22 00:29:48 +0100 |
| commit | 49eab61d8be0d0a83f6a6c00c0a8fee73cf70992 (patch) | |
| tree | 9277fa6ff7fc7e44ba15f10a5fe6f6a075ed98f1 | |
| parent | 76e04a75b16a452c5021d6d1e499a15b44fc586d (diff) | |
| download | nissy-49eab61d8be0d0a83f6a6c00c0a8fee73cf70992.tar.gz nissy-49eab61d8be0d0a83f6a6c00c0a8fee73cf70992.zip | |
Restored doc, not sure why it was deleted
| -rw-r--r-- | doc/nissy.1 | 271 |
1 files changed, 271 insertions, 0 deletions
diff --git a/doc/nissy.1 b/doc/nissy.1 new file mode 100644 index 0000000..138d6ae --- /dev/null +++ b/doc/nissy.1 | |||
| @@ -0,0 +1,271 @@ | |||
| 1 | .Dd November 2021 | ||
| 2 | .Dt NISSY 1 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm nissy | ||
| 6 | .Nd a Rubik's cube solver and FMC assistant | ||
| 7 | . | ||
| 8 | .Sh SYNOPSIS | ||
| 9 | .Nm | ||
| 10 | .Op Fl b | ||
| 11 | .Nm | ||
| 12 | .Ar command | ||
| 13 | .Op options... | ||
| 14 | . | ||
| 15 | .Sh DESCRIPTION | ||
| 16 | .Nm | ||
| 17 | is a Rubik's Cube solver. | ||
| 18 | It uses techniques from Herbert Kociemba's Cube Explorer and | ||
| 19 | Tomas Rokicki's nxopt. With 4 cores at 2.5GHz and using about 3Gb | ||
| 20 | of RAM, Nissy can find the optimal solution for a random Rubik's cube position | ||
| 21 | in about a minute on average. | ||
| 22 | Nissy can also solve different substeps of the Thistlethwaite's algorithm and more. | ||
| 23 | .Pp | ||
| 24 | When run without any argument an interactive shell is launched, otherwise | ||
| 25 | the provided | ||
| 26 | .Ar command | ||
| 27 | is executed and nissy terminates. If the option | ||
| 28 | .Fl b | ||
| 29 | is given, every argument after it is ignored and the shell is launched without | ||
| 30 | any prompt or welcome message. This can be used to run nissy in batch mode, | ||
| 31 | for example writing a list of commands in a | ||
| 32 | .Ar file | ||
| 33 | (one per line) and running | ||
| 34 | .Ar nissy -b < file | ||
| 35 | .Pp | ||
| 36 | The commands that can be run in the interactive shell are the same that can | ||
| 37 | be run non-interactively and are provided below. | ||
| 38 | . | ||
| 39 | .Sh COMMANDS | ||
| 40 | The available | ||
| 41 | .Ar commands | ||
| 42 | are the following: | ||
| 43 | . | ||
| 44 | .Bl -tag -width Ds | ||
| 45 | . | ||
| 46 | .It Nm cleanup Ar scramble | ||
| 47 | Rewrites the given scramble using only the 18 base (HTM) moves and at most two | ||
| 48 | rotations at the end. If | ||
| 49 | Ar scramble | ||
| 50 | uses NISS, all moves done on normal scramble are written first, followed by | ||
| 51 | all moves done on inverse. | ||
| 52 | . | ||
| 53 | .It Nm commands | ||
| 54 | List all available commands. | ||
| 55 | . | ||
| 56 | .It Nm freemem | ||
| 57 | Release some large tables from memory. You can use this command in case | ||
| 58 | you want to keep nissy open without using too much RAM. | ||
| 59 | . | ||
| 60 | .It Nm gen Op Fl t Ar N | ||
| 61 | Generate all tables used by nissy. Run this to complete your installation. | ||
| 62 | If | ||
| 63 | .Ar N | ||
| 64 | is specified, | ||
| 65 | .Ar N | ||
| 66 | CPU threads will be used (defaults to 64, use less only if you don't want | ||
| 67 | nissy to use all of your CPU resources). | ||
| 68 | . | ||
| 69 | .It Nm help Op Ar command | ||
| 70 | Display help. If no | ||
| 71 | .Ar command | ||
| 72 | is given, a generic help message is printed, otherwise a specific help | ||
| 73 | relative to | ||
| 74 | .Ar command | ||
| 75 | is returned. | ||
| 76 | . | ||
| 77 | .It Nm invert Ar scramble | ||
| 78 | Invert the given scramble. | ||
| 79 | . | ||
| 80 | .It Nm print Ar scramble | ||
| 81 | Display a text-only description of the cube obtained after applying | ||
| 82 | .Ar scramble . | ||
| 83 | . | ||
| 84 | .It Nm quit | ||
| 85 | Quit nissy. | ||
| 86 | . | ||
| 87 | .It Nm scramble Oo Fl n Ar N Oc Oo Ar type Oc | ||
| 88 | Print a randomly-generated (random position) scramble | ||
| 89 | . | ||
| 90 | If | ||
| 91 | .Ar N | ||
| 92 | is given, it produces | ||
| 93 | .Ar N | ||
| 94 | scrambles. | ||
| 95 | .Ar type | ||
| 96 | can be specified to be one of the following: | ||
| 97 | .Bl -tag -width Ds | ||
| 98 | .It Ar corners | ||
| 99 | Scramble with solved edges (only cornes are scrambled). | ||
| 100 | .It Ar dr | ||
| 101 | Scramble with solved DR on U/D. | ||
| 102 | .It Ar edges | ||
| 103 | Scramble with solved corners (only edges are scrambled). | ||
| 104 | .It Ar eo | ||
| 105 | Scramble with solved EO on F/B axis. | ||
| 106 | .It Ar fmc | ||
| 107 | Scramble the full cube and the resulting scramble starts and ends with | ||
| 108 | the moves R\(aq U\(aq F. | ||
| 109 | .It Ar htr | ||
| 110 | Scramble with HTR solved. | ||
| 111 | .El | ||
| 112 | . | ||
| 113 | .It Nm solve Ar step Oo Ar options Oc Ar scramble | ||
| 114 | Solve the given | ||
| 115 | .Ar step | ||
| 116 | on the given | ||
| 117 | .Ar scramble. | ||
| 118 | By default it finds only one (shortest) solution, without using niss, and it | ||
| 119 | displays the number of moves at the end of the line. | ||
| 120 | . | ||
| 121 | The options for the | ||
| 122 | .Ar solve | ||
| 123 | command are the following: | ||
| 124 | . | ||
| 125 | .Bl -tag -width Ds | ||
| 126 | . | ||
| 127 | .It Fl a | ||
| 128 | Print all solutions: some solutions are filtered out by default for some | ||
| 129 | steps, for examples EOs that finish with F\(aq, with this options they are not. | ||
| 130 | . | ||
| 131 | .It Fl c | ||
| 132 | Display only the number of solutions found, not the solutions themselves. | ||
| 133 | . | ||
| 134 | .It Fl m Ar min | ||
| 135 | Only look for solution that are at least | ||
| 136 | .Ar min | ||
| 137 | moves long. | ||
| 138 | . | ||
| 139 | .It Fl M Ar MAX | ||
| 140 | Only look for solution that are at most | ||
| 141 | .Ar MAX | ||
| 142 | moves long. | ||
| 143 | . | ||
| 144 | .It Fl n Ar N | ||
| 145 | Try to find | ||
| 146 | .Ar N | ||
| 147 | solutions. By default and unless the | ||
| 148 | .Fl M | ||
| 149 | or | ||
| 150 | .Fl o | ||
| 151 | options are used, at most one solution is returned. | ||
| 152 | If at least one of | ||
| 153 | .Fl M | ||
| 154 | and | ||
| 155 | .Fl o | ||
| 156 | is used, all the solutions found within the given bounds are returned. | ||
| 157 | The option | ||
| 158 | .Fl s | ||
| 159 | overwrites these default behaviors and at most | ||
| 160 | .Ar N | ||
| 161 | solutions are returned, still satisfiyng the other constraints. | ||
| 162 | . | ||
| 163 | .It Fl N | ||
| 164 | Allow use of NISS. | ||
| 165 | . | ||
| 166 | .It Fl o | ||
| 167 | Only find solutions that require the minimum number of moves. | ||
| 168 | . | ||
| 169 | .It Fl O Ar N | ||
| 170 | Only find solutions that require at most | ||
| 171 | .Ar N | ||
| 172 | moves more than the optimal solution. If | ||
| 173 | .Ar N | ||
| 174 | is 0, this is equivalent to | ||
| 175 | .Fl o | ||
| 176 | . | ||
| 177 | .It Fl p | ||
| 178 | Plain style: do not print the number of moves. | ||
| 179 | . | ||
| 180 | .It Fl t Ar N | ||
| 181 | Use | ||
| 182 | .Ar N | ||
| 183 | CPU threads. By default nissy uses only 1 thread. Using more than one | ||
| 184 | thread will improve performance, but the optimal number depends on your | ||
| 185 | machine and operating system. Generally, using one less than the number | ||
| 186 | of threads of your CPU works quite well. | ||
| 187 | . | ||
| 188 | .It Fl v | ||
| 189 | Verbose mode: print some information during the search and print each solution | ||
| 190 | as it is found instead of only printing them all together at the end. | ||
| 191 | . | ||
| 192 | . | ||
| 193 | .El | ||
| 194 | . | ||
| 195 | .It Nm steps | ||
| 196 | List all available | ||
| 197 | .Ar steps | ||
| 198 | for the | ||
| 199 | .Ar solve | ||
| 200 | command. | ||
| 201 | . | ||
| 202 | .It Nm twophase Ar scramble | ||
| 203 | Find a solution using a two-phase method. This does not guarantee | ||
| 204 | to return an optimal solution (and in fact most often it does not), | ||
| 205 | but it is very fast. | ||
| 206 | . | ||
| 207 | .It Nm unniss Ar scramble | ||
| 208 | Rewrite the scramble without using NISS. | ||
| 209 | . | ||
| 210 | .It Nm version | ||
| 211 | Display version information. | ||
| 212 | . | ||
| 213 | .El | ||
| 214 | . | ||
| 215 | .Sh SCRAMBLES | ||
| 216 | All the commands above that accept a scramble also accept a | ||
| 217 | .Fl Nm i | ||
| 218 | option with no arguments. | ||
| 219 | If this option is given, multiple scrambles are read from standard | ||
| 220 | input (one per line) until and EOF is found, at which point stdin is cleared. | ||
| 221 | . | ||
| 222 | .Sh ENVIRONMENT | ||
| 223 | Data is stored in the folder pointed to by | ||
| 224 | .Nm $NISSYDATA. | ||
| 225 | If that variable is unset the folder | ||
| 226 | .Nm $XDG_DATA_HOME/nissy | ||
| 227 | or | ||
| 228 | .Nm $HOME/.nissy | ||
| 229 | is used instead. If none of this environment variables is defined | ||
| 230 | (e.g. in a non-UNIX system), the current folder is used. | ||
| 231 | . | ||
| 232 | .Sh EXAMPLES | ||
| 233 | .Pp | ||
| 234 | The command: | ||
| 235 | .Dl nissy solve -v -O 1 \(dqR\(aqU\(aqFD2L2FR2U2R2BD2LB2D\(aqB2L\(aqR\(aqBD2BU2LU2R\(aqU\(aqF\(dq | ||
| 236 | Returns: | ||
| 237 | .Dl Searching depth 0 | ||
| 238 | .Dl Searching depth 1 | ||
| 239 | .Dl (some more lines) | ||
| 240 | .Dl Searching depth 16 | ||
| 241 | .Dl D2 F\(aq U2 D2 F\(aq L2 D R2 D F B2 R\(aq L2 F\(aq U\(aq D | ||
| 242 | .Dl Searching depth 17 | ||
| 243 | .Dl D2 F\(aq U2 D2 F\(aq L2 D R2 D F B2 R\(aq L2 F\(aq U\(aq D (16) | ||
| 244 | Notice that the solution is printed twice: the first time it is printed as soon | ||
| 245 | as it is found as requested by the -v option. | ||
| 246 | .Pp | ||
| 247 | The command: | ||
| 248 | .Dl nissy solve eofb -m 4 -M 5 -N -n 6 \(dqR\(aqU\(aqFD2L2 FR2 U2R2BD2 L B2 D\(aq B2 L\(aq R\(aq\(dq | ||
| 249 | Returns: | ||
| 250 | .Dl U B U\(aq B (4) | ||
| 251 | .Dl U (B R\(aq B) (4) | ||
| 252 | .Dl (U B R\(aq B) (4) | ||
| 253 | .Dl U2 F R2 F (4) | ||
| 254 | .Dl U2 B U2 B (4) | ||
| 255 | .Dl (U2 B R\(aq B) (4) | ||
| 256 | .Pp | ||
| 257 | On a UNIX shell, the composite command | ||
| 258 | .Dl nissy scramble -n 2 | nissy solve -i > file.txt | ||
| 259 | Generates two random scrambles, solves them and saves the result to file.txt. | ||
| 260 | The file will look something like this: | ||
| 261 | .Dl >>> Line: D U2 F D B\(aq F L2 D\(aq F2 R2 L B2 L\(aq U2 B2 R F2 L\(aq D2 | ||
| 262 | .Dl U2 R2 F2 L B2 D\(aq R2 D\(aq F U L2 B\(aq U\(aq R2 D2 R2 U (17) | ||
| 263 | .Dl >>> Line: D B R U\(aq B\(aq L2 U L U D2 R L B2 U2 L2 U2 R U2 B2 L F2 | ||
| 264 | .Dl D\(aq F R\(aq D B L2 B R2 L U L U2 B D\(aq U R U F2 (18) | ||
| 265 | . | ||
| 266 | .Sh AUTHORS | ||
| 267 | .An Sebastiano Tronto Aq Mt sebastiano@tronto.net | ||
| 268 | . | ||
| 269 | .Sh SOURCE CODE | ||
| 270 | Source code is available at | ||
| 271 | .Lk https://nissy.tronto.net | ||
