aboutsummaryrefslogtreecommitdiff
path: root/doc/nissy.html
blob: f39100e0145d7924c9b9227cc08adc58b34bfbf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Mon Feb 21 22:56:07 2022 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p>NISSY(1) BSD General Commands Manual NISSY(1)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:6%;"><b>nissy</b> &mdash; a
Rubik&rsquo;s cube solver and FMC assistant</p>

<p style="margin-top: 1em"><b>SYNOPSIS</b></p>

<p style="margin-left:14%;"><b>nissy</b> [<b>&minus;b</b>]
<b><br>
nissy</b> <i>command</i> [options...]</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:6%;"><b>nissy</b> is a Rubik&rsquo;s
Cube solver. It uses techniques from Herbert
Kociemba&rsquo;s Cube Explorer and Tomas Rokicki&rsquo;s
nxopt. With 4 cores at 2.5GHz and using less than 3Gb of
RAM, Nissy can find the optimal solution for a random
Rubik&rsquo;s cube position in about a minute on average.
Nissy can also solve different substeps of the
Thistlethwaite&rsquo;s algorithm and more.</p>

<p style="margin-left:6%; margin-top: 1em">When run without
any argument an interactive shell is launched, otherwise the
provided <i>command</i> is executed and nissy terminates. If
the option <b>&minus;b</b> is given, every argument after it
is ignored and the shell is launched without any prompt or
welcome message. This can be used to run nissy in batch
mode, for example writing a list of commands in a
<i>file</i> (one per line) and running <i>nissy -b &lt;
file</i></p>

<p style="margin-left:6%; margin-top: 1em">The commands
that can be run in the interactive shell are the same that
can be run non-interactively and are provided below.</p>

<p style="margin-top: 1em"><b>COMMANDS</b></p>

<p style="margin-left:6%;">The available <i>commands</i>
are the following:</p>

<p style="margin-top: 1em"><b>commands</b></p>

<p style="margin-left:17%;">List all available
commands.</p>

<p style="margin-top: 1em"><b>gen</b> [<b>&minus;t</b>
<i>N</i>]</p>

<p style="margin-left:17%;">Generate all tables used by
nissy. Run this to complete your installation. If <i>N</i>
is specified, <i>N</i> CPU threads will be used (defaults to
1).</p>

<p style="margin-top: 1em"><b>help</b> [<i>command</i>]</p>

<p style="margin-left:17%;">Display help. If no
<i>command</i> is given, a generic help message is printed,
otherwise a specific help relative to <i>command</i> is
returned.</p>

<p style="margin-top: 1em"><b>invert</b>
<i>scramble</i></p>

<p style="margin-left:17%;">Invert the given scramble.</p>

<p style="margin-top: 1em"><b>print</b> <i>scramble</i></p>

<p style="margin-left:17%;">Display a text-only description
of the cube obtained after applying <i>scramble</i>.</p>

<p style="margin-top: 1em"><b>quit</b></p>

<p style="margin-left:17%; margin-top: 1em">Quit nissy.</p>

<p style="margin-top: 1em"><b>scramble</b> [ <b><br>
&minus;n</b> <i>N</i>] [ <i><br>
type</i>]</p>

<p style="margin-left:17%;">Print a randomly-generated
(random position) scramble If <i>N</i> is given, it produces
<i>N</i> scrambles. <i>type</i> can be specified to be one
of the following:</p>

<p style="margin-top: 1em"><i>eo</i></p>

<p style="margin-left:27%; margin-top: 1em">Scramble with
solved EO on F/B axis.</p>

<p style="margin-top: 1em"><i>corners</i></p>

<p style="margin-left:27%;">Scramble with solved edges
(only cornes are scrambled).</p>

<p style="margin-top: 1em"><i>edges</i></p>

<p style="margin-left:27%; margin-top: 1em">Scramble with
solved corners (only edges are scrambled).</p>

<p style="margin-top: 1em"><b>solve</b> <i>step</i> [
<i><br>
options</i>] <i>scramble.</i></p>

<p style="margin-left:17%;">Solve the given <i>step</i> on
the given <i>scramble.</i> By default it finds only one
(shortest) solution, without using niss, and it displays the
number of moves at the end of the line. The options for the
<i>solve</i> command are the following:</p>

<p style="margin-top: 1em"><b>&minus;a</b></p>

<p style="margin-left:27%; margin-top: 1em">Print all
solutions: some solutions are filtered out by default for
some steps, for examples EOs that finish with F', with this
options they are not.</p>

<p style="margin-top: 1em"><b>&minus;c</b></p>

<p style="margin-left:27%; margin-top: 1em">Display only
the number of solutions found, not the solutions
themselves.</p>

<p style="margin-top: 1em"><b>&minus;m</b> <i>min</i></p>

<p style="margin-left:27%; margin-top: 1em">Only look for
solution that are at least <i>min</i> moves long.</p>

<p style="margin-top: 1em"><b>&minus;M</b> <i>MAX</i></p>

<p style="margin-left:27%; margin-top: 1em">Only look for
solution that are at most <i>MAX</i> moves long.</p>

<p style="margin-top: 1em"><b>&minus;n</b> <i>N</i></p>

<p style="margin-left:27%; margin-top: 1em">Try to find
<i>N</i> solutions. By default and unless the
<b>&minus;M</b> or <b>&minus;o</b> options are used, at most
one solution is returned. If at least one of <b>&minus;M</b>
and <b>&minus;o</b> is used, all the solutions found within
the given bounds are returned. The option <b>&minus;s</b>
overwrites these default behaviors and at most <i>N</i>
solutions are returned, still satisfiyng the other
constraints.</p>

<p style="margin-top: 1em"><b>&minus;N</b></p>

<p style="margin-left:27%; margin-top: 1em">Allow use of
NISS.</p>

<p style="margin-top: 1em"><b>&minus;o</b></p>

<p style="margin-left:27%; margin-top: 1em">Only find
solutions that require the minimum number of moves.</p>

<p style="margin-top: 1em"><b>&minus;O</b> <i>N</i></p>

<p style="margin-left:27%; margin-top: 1em">Only find
solutions that require at most <i>N</i> moves more than the
optimal solution. If <i>N</i> is 0, this is equivalent to
<b>&minus;o</b></p>

<p style="margin-top: 1em"><b>&minus;p</b></p>

<p style="margin-left:27%; margin-top: 1em">Plain style: do
not print the number of moves.</p>

<p style="margin-top: 1em"><b>&minus;t</b> <i>N</i></p>

<p style="margin-left:27%; margin-top: 1em">Use <i>N</i>
CPU threads. By default nissy uses only 1 thread. Using more
than one thread will improve performance, but the optimal
number depends on your machine and operating system.
Generally, using one less than the number of threads of your
CPU works quite well.</p>

<p style="margin-top: 1em"><b>&minus;v</b></p>

<p style="margin-left:27%; margin-top: 1em">Verbose mode:
print some information during the search and print each
solution as it is found instead of only printing them all
together at the end.</p>

<p style="margin-top: 1em"><b>steps</b></p>

<p style="margin-left:17%; margin-top: 1em">List all
available <i>steps</i> for the <i>solve</i> command.</p>

<p style="margin-top: 1em"><b>twophase</b>
<i>scramble</i></p>

<p style="margin-left:17%;">Find a solution using a
two-phase method. This does not guarantee to return an
optimal solution (and in fact most often it does not), but
it is very fast.</p>

<p style="margin-top: 1em"><b>unniss</b>
<i>scramble</i></p>

<p style="margin-left:17%;">Rewrite the scramble without
using NISS.</p>

<p style="margin-top: 1em"><b>version</b></p>

<p style="margin-left:17%;">Display version
information.</p>

<p style="margin-top: 1em"><b>SCRAMBLES</b></p>

<p style="margin-left:6%;">All the commands above that
accept a scramble also accept a <b>&minus;i</b> option with
no arguments. If this option is given, multiple scrambles
are read from standard input (one per line) until and EOF is
found, at which point stdin is cleared.</p>

<p style="margin-top: 1em"><b>ENVIRONMENT</b></p>

<p style="margin-left:6%;">Data is stored in the folder
pointed to by <b>$NISSYDATA.</b> If that variable is unset
the folder <b>$XDG_DATA_HOME/nissy</b> or
<b>$HOME/.nissy</b> is used instead. If none of this
environment variables is defined (e.g. in a non-UNIX
system), the current folder is used.</p>

<p style="margin-top: 1em"><b>EXAMPLES</b></p>

<p style="margin-left:6%;">The command:</p>

<p style="margin-left:14%;">nissy solve -v -O 1
&quot;R'U'FD2L2FR2U2R2BD2LB2D'B2L'R'BD2BU2LU2R'U'F&quot;</p>

<p style="margin-left:6%;">Returns:</p>

<p style="margin-left:14%;">Searching depth 0 <br>
Searching depth 1 <br>
(some more lines) <br>
Searching depth 16 <br>
D2 F' U2 D2 F' L2 D R2 D F B2 R' L2 F' U' D <br>
Searching depth 17 <br>
D2 F' U2 D2 F' L2 D R2 D F B2 R' L2 F' U' D (16)</p>

<p style="margin-left:6%;">Notice that the solution is
printed twice: the first time it is printed as soon as it is
found as requested by the -v option.</p>

<p style="margin-left:6%; margin-top: 1em">The command:</p>

<p style="margin-left:14%;">nissy solve eofb -m 4 -M 5 -N
-n 6 &quot;R'U'FD2L2 FR2 U2R2BD2 L B2 D' B2 L' R'&quot;</p>

<p style="margin-left:6%;">Returns:</p>

<p style="margin-left:14%;">U B U' B (4) <br>
U (B R' B) (4) <br>
(U B R' B) (4) <br>
U2 F R2 F (4) <br>
U2 B U2 B (4) <br>
(U2 B R' B) (4)</p>

<p style="margin-left:6%; margin-top: 1em">On a UNIX shell,
the composite command</p>

<p style="margin-left:14%;">nissy scramble -n 2 | nissy
solve -i &gt; file.txt</p>

<p style="margin-left:6%;">Generates two random scrambles,
solves them and saves the result to file.txt. The file will
look something like this:</p>

<p style="margin-left:14%;">&gt;&gt;&gt; Line: D U2 F D B'
F L2 D' F2 R2 L B2 L' U2 B2 R F2 L' D2 <br>
U2 R2 F2 L B2 D' R2 D' F U L2 B' U' R2 D2 R2 U (17) <br>
&gt;&gt;&gt; Line: D B R U' B' L2 U L U D2 R L B2 U2 L2 U2 R
U2 B2 L F2 <br>
D' F R' D B L2 B R2 L U L U2 B D' U R U F2 (18)</p>

<p style="margin-top: 1em"><b>AUTHORS</b></p>

<p style="margin-left:6%;">Sebastiano Tronto
&lt;<i>sebastiano.tronto@gmail.com</i>&gt;</p>

<p style="margin-top: 1em"><b>SOURCE CODE</b></p>

<p style="margin-left:6%;">Source code is available at
<b>https://github.com/sebastianotronto/nissy</b></p>

<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;21, 2022 BSD</p>
<hr>
</body>
</html>

Generated with cgit - Back to sebastiano.tronto.net