aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2022-06-01 20:30:16 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2022-06-01 20:30:16 +0200
commit2feaa43610b63c190762ad4b233ad648e30636d6 (patch)
tree795b481a73e55c5d742c45aca31888d79d171170
parent2b1b1970f774aa451f4fae197c0b1177118f3570 (diff)
downloadnissy-2feaa43610b63c190762ad4b233ad648e30636d6.tar.gz
nissy-2feaa43610b63c190762ad4b233ad648e30636d6.zip
Version 2.0.2
-rw-r--r--.gitignore3
-rw-r--r--INSTALL93
-rw-r--r--Makefile1
-rw-r--r--TODO.md3
-rw-r--r--adhoc/README3
-rwxr-xr-xadhoc/compile.sh15
-rw-r--r--adhoc/cornersdrhtr.c128
-rwxr-xr-xadhoc/runbin322392 -> 0 bytes
-rw-r--r--doc/nissy.html314
-rw-r--r--doc/nissy.pdfbin33154 -> 0 bytes
-rwxr-xr-xnissybin327768 -> 0 bytes
-rw-r--r--src/pruning.c4
-rw-r--r--www/download/index.html73
13 files changed, 95 insertions, 542 deletions
diff --git a/.gitignore b/.gitignore
index cd57588..e8f5fdc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
1nissy 1nissy
2nissy-*
3doc/*.html
4doc/*.pdf
diff --git a/INSTALL b/INSTALL
index f0bba55..ffc461d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,57 +4,78 @@ Nissy is available at https://nissy.tronto.net
4 4
5# Requirements 5# Requirements
6 6
7A full installation of nissy requires about 3Gb of space, 7A full installation of nissy requires about 3Gb of space, of which
8of which 2.3Gb are occupied by the huge pruning table for fast optimal solving, 82.3Gb are occupied by the huge pruning table for fast optimal solving,
9and running it requires the same amount of RAM. 9and running it requires the same amount of RAM. One can choose to never
10One can choose to never use this function and not to install the relative 10use this function and not to install the relative pruning table. There
11pruning table. There is an alternative (slower) 11is an alternative (slower) optimal solving function that uses about
12optimal solving function that uses about 500Mb of RAM. 12500Mb of RAM. When generating the pruning tables automatically (see
13the section Tables below), at least 5.3Gb or RAM are required.
13 14
14# Installation 15# Installation
15 16
16## On Windows 17## On Windows
17 18
18Try downloading and executing in a terminal the file nissy.exe, then 19Try downloading and executing in a terminal the file nissy.exe, then
19follow the instructions in the Tables section below for 20follow the instructions in the Tables section below for installing the
20installing the pruning tables. 21pruning tables. If nissy.exe does not work, you can try following the
21If nissy.exe does not work, you can try following the UNIX instructions 22UNIX instructions in WSL (Windows Subsystem for Linux) or in a similar
22in WSL (Windows Subsystem for Linux) or in a similar environment. 23environment.
23
24Sorry for the inconvenience, I don't have a Windows machine to test this on.
25 24
26## On a UNIX system: 25## On a UNIX system:
27 26
28Edit the Makefile to match your local configuration (usually not necessary, but you 27Download the source archive (.tar.gz). Extract it with your favorite
29may want to change the PREFIX variable) and run make, followed by make install. 28archive program, for example with
30Follow the instructions below to install the pruning tables. 29
30 tar -xvzf nissy-VERSION.tar.gz
31
32Open a terminal in the directory just extracted. If you wish, edit the
33Makefile to match your local configuration (this is usually not necessary,
34but you may want to change the PREFIX variable to change the installation
35path) and run
36
37 make
38
39followed by
40
41 make install
42
43Then follow the instructions below to install the pruning tables.
31 44
32## Tables 45## Tables
33Nissy needs to generate certain large tables to work. These tables are by default
34generated the first time they are needed (e.g the first time you ask to solve a
35certain step) and then saved to a file. Whenever these tables are needed again,
36nissy simply loads the corresponding file from the hard disk.
37 46
38The very large table for optimal solving can take some time to generate 47Once you have installed nissy, run
39(about 1.5 hours on my fairly old but decent laptop, using 8 CPU threads).
40In order to generate it you need at least 5Gb of RAM.
41All other tables are much faster.
42 48
43You can ask nissy to generate all the tables it will ever need with the gen 49 nissy gen
44command. It is recommended to use more than one thread, if your CPU has them.
45For example, you can run:
46 50
47nissy gen -t 8 51to generate all the tables that Nissy will ever need. Running this
52command requires around 5.3Gb of RAM, and it can take some time (about
5340 minutes on my fairly old but decent laptop, with 8 CPU threads).
48 54
49to generate all tables using 8 threads. 55Some unnecessary technical detail: by default this command is going to
56use at most 64 threads. If you want you can choose to use more threads
57(if your CPU is very powerful) or fewer threads (if you for example
58want to run this command in the background while you do other stuff)
59with the -t option, for example nissy gen -t 1.
50 60
51Alternatively, you can simply download all the tables and copy them into the 61Alternatively, you can download all the tables (1.7Gb) and copy them
52correct folder (see manual page, ENVIRONMENT section). On UNIX operating 62into the correct folder (see manual page, ENVIRONMENT section). On UNIX
53systems this folder is either .nissy/tables in the user's home directory or 63operating systems this folder is either .nissy/tables in the user's
54$XDG_DATA_HOME/nissy/tables if the XDG variable is configured. On Windows 64home directory or $XDG_DATA_HOME/nissy/tables if the XDG variable
55it is the same directory as the nissy.exe executable file. 65is configured. On Windows it is the same directory as the nissy.exe
66executable file.
56 67
57You can downloads all the tables from the following link: 68You can downloads all the tables from the following link:
58 https://nissy.tronto.net/nissy-tables-2.0.zip 69
59The version 2.0 at the end of the file name is only indicative. 70 https://nissy.tronto.net/nissy-tables-2.0.2.zip
60Later versions will use the same tables, unless otherwise specified. 71
72# Upgrading
73
74If you already have nissy installed and you want to upgrade to a more
75recent version, you can simply repeat the installation process:
76* On Windows: simply replace nissy.exe with the new file with the same name.
77* On UNIX systems: download the new version of the source code, extract it
78 in a new folder and run make and make install again.
79
80Between each version new table files might have been added, or old ones
81may be not used anymore. Nissy will deal with this automatically.
diff --git a/Makefile b/Makefile
index fbed9c0..735571f 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ debug:
27 27
28clean: 28clean:
29 rm -rf nissy nissy*.exe nissy*.tar.gz 29 rm -rf nissy nissy*.exe nissy*.tar.gz
30 rm doc/nissy.html doc/nissy.pdf
30 31
31dist: clean nissy.exe 32dist: clean nissy.exe
32 mkdir -p nissy-${VERSION} 33 mkdir -p nissy-${VERSION}
diff --git a/TODO.md b/TODO.md
index b941211..2ef405d 100644
--- a/TODO.md
+++ b/TODO.md
@@ -4,6 +4,8 @@ This is a list of things that I would like to add or change at some point.
4It's more of a personal reminder than anything else. 4It's more of a personal reminder than anything else.
5 5
6## Version 2.0.2 6## Version 2.0.2
7### Website
8* now gen takes 40 minutes
7### Changelog 9### Changelog
8* Only improved table generation speed, but this required huge changes in 10* Only improved table generation speed, but this required huge changes in
9 coordinates.c and symcoord.c (+ some minor changes in other parts). 11 coordinates.c and symcoord.c (+ some minor changes in other parts).
@@ -44,6 +46,7 @@ It's more of a personal reminder than anything else.
44### Tables management 46### Tables management
45* Check files in tables directory, add command to remove old / extraneous files 47* Check files in tables directory, add command to remove old / extraneous files
46* Add checksum to check that tables are generated / downloaded correctly 48* Add checksum to check that tables are generated / downloaded correctly
49* Edit download page update instructions to tell what to do when changing tables
47 50
48## Commands 51## Commands
49 52
diff --git a/adhoc/README b/adhoc/README
deleted file mode 100644
index 8f72c6e..0000000
--- a/adhoc/README
+++ /dev/null
@@ -1,3 +0,0 @@
1This folder contains some ad-hoc code that is not included in the main nissy
2program. You probably don't need it, but it may be worth looking into if you
3are trying to extend nissy by writing your own steps or other functions.
diff --git a/adhoc/compile.sh b/adhoc/compile.sh
deleted file mode 100755
index aa541c7..0000000
--- a/adhoc/compile.sh
+++ /dev/null
@@ -1,15 +0,0 @@
1#/!bin/sh
2
3mkdir build
4cd build
5cp -R ../../src ./
6rm src/shell.c
7cp ../$1 src/
8cp ../../Makefile ./
9make
10cp nissy ../run
11rm src/*
12rmdir src
13rm *
14cd ..
15rmdir build
diff --git a/adhoc/cornersdrhtr.c b/adhoc/cornersdrhtr.c
deleted file mode 100644
index 2a5a6e6..0000000
--- a/adhoc/cornersdrhtr.c
+++ /dev/null
@@ -1,128 +0,0 @@
1#include "commands.h"
2
3/* Some of the following functions are new, some are copied from steps.c */
4bool
5allowed(Move m)
6{
7 return base_move(m) == U || m == R2 || m == F2;
8}
9
10bool
11allowed_next(Move l2, Move l1, Move m)
12{
13 return base_move(m) != base_move(l1);
14}
15
16bool
17check_cornershtr(Cube c)
18{
19 return coord_cornershtr.index(c) == 0;
20}
21
22bool
23check_coud_and_dbl(Cube c)
24{
25 return c.coud == 0 && what_corner_at(c, DBL) == DBL;
26}
27
28static int
29estimate_cornershtr_HTM(DfsArg *arg)
30{
31 return ptableval(&pd_cornershtr_HTM, arg->cube);
32}
33
34static bool
35validate_singlecw_ending(Alg *alg)
36{
37 int i;
38 bool nor, inv;
39 Move l2 = NULLMOVE, l1 = NULLMOVE, l2i = NULLMOVE, l1i = NULLMOVE;
40
41 for (i = 0; i < alg->len; i++) {
42 if (alg->inv[i]) {
43 l2i = l1i;
44 l1i = alg->move[i];
45 } else {
46 l2 = l1;
47 l1 = alg->move[i];
48 }
49 }
50
51 nor = l1 ==base_move(l1) && (!commute(l1, l2) ||l2 ==base_move(l2));
52 inv = l1i==base_move(l1i) && (!commute(l1i,l2i)||l2i==base_move(l2i));
53
54 return nor && inv;
55}
56
57int
58main()
59{
60 Moveset moveset_UR2F2 = {
61 .allowed = allowed,
62 .allowed_next = allowed_next,
63 };
64
65 init_moveset(&moveset_UR2F2);
66
67 /*
68 * This step is the same as cornershtr_HTM in steps.c, except for
69 * the ready() function (which is not relevant anyway, it is there
70 * more for testing than anything else) and the moveset.
71 */
72 Step step = {
73 .final = false,
74 .is_done = check_cornershtr,
75 .estimate = estimate_cornershtr_HTM,
76 .ready = check_coud_and_dbl,
77 .is_valid = validate_singlecw_ending,
78 .moveset = &moveset_UR2F2,
79
80 .pre_trans = uf,
81
82 .tables = {&pd_cornershtr_HTM},
83 .ntables = 1,
84 };
85
86 SolveOptions opts = {
87 .min_moves = 0,
88 .max_moves = 20,
89 .max_solutions = 1,
90 .nthreads = 4,
91 .optimal = 0,
92 .can_niss = false,
93 .verbose = false,
94 .all = false,
95 .print_number = false,
96 .count_only = false
97 };
98
99 init_symcoord();
100
101 bool cphtr_state_done[BINOM8ON4*6];
102 for (unsigned long int i = 0; i < BINOM8ON4*6; i++)
103 cphtr_state_done[i] = false;
104
105 for (unsigned long int i = 0; i < FACTORIAL8; i++) {
106 AlgList *sols;
107 Cube c = {0};
108 c.cp = i; /* inconsistent state because of side CO */
109
110 if (what_corner_at(c, DBL) != DBL ||
111 cphtr_state_done[coord_cphtr.index(c)])
112 continue;
113
114 fprintf(stderr, "Doing cp %ld (cphtr state %ld)\n",
115 i, coord_cphtr.index(c));
116
117 cphtr_state_done[coord_cphtr.index(c)] = true;
118 /* Comment next two lines to get non-reduced list */
119 Cube mirror = apply_trans(ur_mirror, c);
120 cphtr_state_done[coord_cphtr.index(mirror)] = true;
121
122 sols = solve(c, &step, &opts);
123 printf("%.2d\t", sols->first->alg->len);
124 print_alglist(sols, opts.print_number);
125 }
126
127 return 0;
128}
diff --git a/adhoc/run b/adhoc/run
deleted file mode 100755
index 27541c2..0000000
--- a/adhoc/run
+++ /dev/null
Binary files differ
diff --git a/doc/nissy.html b/doc/nissy.html
deleted file mode 100644
index f39100e..0000000
--- a/doc/nissy.html
+++ /dev/null
@@ -1,314 +0,0 @@
1<!-- Creator : groff version 1.22.4 -->
2<!-- CreationDate: Mon Feb 21 22:56:07 2022 -->
3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4"http://www.w3.org/TR/html4/loose.dtd">
5<html>
6<head>
7<meta name="generator" content="groff -Thtml, see www.gnu.org">
8<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
9<meta name="Content-Style" content="text/css">
10<style type="text/css">
11 p { margin-top: 0; margin-bottom: 0; vertical-align: top }
12 pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
13 table { margin-top: 0; margin-bottom: 0; vertical-align: top }
14 h1 { text-align: center }
15</style>
16<title></title>
17</head>
18<body>
19
20<hr>
21
22
23<p>NISSY(1) BSD General Commands Manual NISSY(1)</p>
24
25<p style="margin-top: 1em"><b>NAME</b></p>
26
27<p style="margin-left:6%;"><b>nissy</b> &mdash; a
28Rubik&rsquo;s cube solver and FMC assistant</p>
29
30<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
31
32<p style="margin-left:14%;"><b>nissy</b> [<b>&minus;b</b>]
33<b><br>
34nissy</b> <i>command</i> [options...]</p>
35
36<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
37
38<p style="margin-left:6%;"><b>nissy</b> is a Rubik&rsquo;s
39Cube solver. It uses techniques from Herbert
40Kociemba&rsquo;s Cube Explorer and Tomas Rokicki&rsquo;s
41nxopt. With 4 cores at 2.5GHz and using less than 3Gb of
42RAM, Nissy can find the optimal solution for a random
43Rubik&rsquo;s cube position in about a minute on average.
44Nissy can also solve different substeps of the
45Thistlethwaite&rsquo;s algorithm and more.</p>
46
47<p style="margin-left:6%; margin-top: 1em">When run without
48any argument an interactive shell is launched, otherwise the
49provided <i>command</i> is executed and nissy terminates. If
50the option <b>&minus;b</b> is given, every argument after it
51is ignored and the shell is launched without any prompt or
52welcome message. This can be used to run nissy in batch
53mode, for example writing a list of commands in a
54<i>file</i> (one per line) and running <i>nissy -b &lt;
55file</i></p>
56
57<p style="margin-left:6%; margin-top: 1em">The commands
58that can be run in the interactive shell are the same that
59can be run non-interactively and are provided below.</p>
60
61<p style="margin-top: 1em"><b>COMMANDS</b></p>
62
63<p style="margin-left:6%;">The available <i>commands</i>
64are the following:</p>
65
66<p style="margin-top: 1em"><b>commands</b></p>
67
68<p style="margin-left:17%;">List all available
69commands.</p>
70
71<p style="margin-top: 1em"><b>gen</b> [<b>&minus;t</b>
72<i>N</i>]</p>
73
74<p style="margin-left:17%;">Generate all tables used by
75nissy. Run this to complete your installation. If <i>N</i>
76is specified, <i>N</i> CPU threads will be used (defaults to
771).</p>
78
79<p style="margin-top: 1em"><b>help</b> [<i>command</i>]</p>
80
81<p style="margin-left:17%;">Display help. If no
82<i>command</i> is given, a generic help message is printed,
83otherwise a specific help relative to <i>command</i> is
84returned.</p>
85
86<p style="margin-top: 1em"><b>invert</b>
87<i>scramble</i></p>
88
89<p style="margin-left:17%;">Invert the given scramble.</p>
90
91<p style="margin-top: 1em"><b>print</b> <i>scramble</i></p>
92
93<p style="margin-left:17%;">Display a text-only description
94of the cube obtained after applying <i>scramble</i>.</p>
95
96<p style="margin-top: 1em"><b>quit</b></p>
97
98<p style="margin-left:17%; margin-top: 1em">Quit nissy.</p>
99
100<p style="margin-top: 1em"><b>scramble</b> [ <b><br>
101&minus;n</b> <i>N</i>] [ <i><br>
102type</i>]</p>
103
104<p style="margin-left:17%;">Print a randomly-generated
105(random position) scramble If <i>N</i> is given, it produces
106<i>N</i> scrambles. <i>type</i> can be specified to be one
107of the following:</p>
108
109<p style="margin-top: 1em"><i>eo</i></p>
110
111<p style="margin-left:27%; margin-top: 1em">Scramble with
112solved EO on F/B axis.</p>
113
114<p style="margin-top: 1em"><i>corners</i></p>
115
116<p style="margin-left:27%;">Scramble with solved edges
117(only cornes are scrambled).</p>
118
119<p style="margin-top: 1em"><i>edges</i></p>
120
121<p style="margin-left:27%; margin-top: 1em">Scramble with
122solved corners (only edges are scrambled).</p>
123
124<p style="margin-top: 1em"><b>solve</b> <i>step</i> [
125<i><br>
126options</i>] <i>scramble.</i></p>
127
128<p style="margin-left:17%;">Solve the given <i>step</i> on
129the given <i>scramble.</i> By default it finds only one
130(shortest) solution, without using niss, and it displays the
131number of moves at the end of the line. The options for the
132<i>solve</i> command are the following:</p>
133
134<p style="margin-top: 1em"><b>&minus;a</b></p>
135
136<p style="margin-left:27%; margin-top: 1em">Print all
137solutions: some solutions are filtered out by default for
138some steps, for examples EOs that finish with F', with this
139options they are not.</p>
140
141<p style="margin-top: 1em"><b>&minus;c</b></p>
142
143<p style="margin-left:27%; margin-top: 1em">Display only
144the number of solutions found, not the solutions
145themselves.</p>
146
147<p style="margin-top: 1em"><b>&minus;m</b> <i>min</i></p>
148
149<p style="margin-left:27%; margin-top: 1em">Only look for
150solution that are at least <i>min</i> moves long.</p>
151
152<p style="margin-top: 1em"><b>&minus;M</b> <i>MAX</i></p>
153
154<p style="margin-left:27%; margin-top: 1em">Only look for
155solution that are at most <i>MAX</i> moves long.</p>
156
157<p style="margin-top: 1em"><b>&minus;n</b> <i>N</i></p>
158
159<p style="margin-left:27%; margin-top: 1em">Try to find
160<i>N</i> solutions. By default and unless the
161<b>&minus;M</b> or <b>&minus;o</b> options are used, at most
162one solution is returned. If at least one of <b>&minus;M</b>
163and <b>&minus;o</b> is used, all the solutions found within
164the given bounds are returned. The option <b>&minus;s</b>
165overwrites these default behaviors and at most <i>N</i>
166solutions are returned, still satisfiyng the other
167constraints.</p>
168
169<p style="margin-top: 1em"><b>&minus;N</b></p>
170
171<p style="margin-left:27%; margin-top: 1em">Allow use of
172NISS.</p>
173
174<p style="margin-top: 1em"><b>&minus;o</b></p>
175
176<p style="margin-left:27%; margin-top: 1em">Only find
177solutions that require the minimum number of moves.</p>
178
179<p style="margin-top: 1em"><b>&minus;O</b> <i>N</i></p>
180
181<p style="margin-left:27%; margin-top: 1em">Only find
182solutions that require at most <i>N</i> moves more than the
183optimal solution. If <i>N</i> is 0, this is equivalent to
184<b>&minus;o</b></p>
185
186<p style="margin-top: 1em"><b>&minus;p</b></p>
187
188<p style="margin-left:27%; margin-top: 1em">Plain style: do
189not print the number of moves.</p>
190
191<p style="margin-top: 1em"><b>&minus;t</b> <i>N</i></p>
192
193<p style="margin-left:27%; margin-top: 1em">Use <i>N</i>
194CPU threads. By default nissy uses only 1 thread. Using more
195than one thread will improve performance, but the optimal
196number depends on your machine and operating system.
197Generally, using one less than the number of threads of your
198CPU works quite well.</p>
199
200<p style="margin-top: 1em"><b>&minus;v</b></p>
201
202<p style="margin-left:27%; margin-top: 1em">Verbose mode:
203print some information during the search and print each
204solution as it is found instead of only printing them all
205together at the end.</p>
206
207<p style="margin-top: 1em"><b>steps</b></p>
208
209<p style="margin-left:17%; margin-top: 1em">List all
210available <i>steps</i> for the <i>solve</i> command.</p>
211
212<p style="margin-top: 1em"><b>twophase</b>
213<i>scramble</i></p>
214
215<p style="margin-left:17%;">Find a solution using a
216two-phase method. This does not guarantee to return an
217optimal solution (and in fact most often it does not), but
218it is very fast.</p>
219
220<p style="margin-top: 1em"><b>unniss</b>
221<i>scramble</i></p>
222
223<p style="margin-left:17%;">Rewrite the scramble without
224using NISS.</p>
225
226<p style="margin-top: 1em"><b>version</b></p>
227
228<p style="margin-left:17%;">Display version
229information.</p>
230
231<p style="margin-top: 1em"><b>SCRAMBLES</b></p>
232
233<p style="margin-left:6%;">All the commands above that
234accept a scramble also accept a <b>&minus;i</b> option with
235no arguments. If this option is given, multiple scrambles
236are read from standard input (one per line) until and EOF is
237found, at which point stdin is cleared.</p>
238
239<p style="margin-top: 1em"><b>ENVIRONMENT</b></p>
240
241<p style="margin-left:6%;">Data is stored in the folder
242pointed to by <b>$NISSYDATA.</b> If that variable is unset
243the folder <b>$XDG_DATA_HOME/nissy</b> or
244<b>$HOME/.nissy</b> is used instead. If none of this
245environment variables is defined (e.g. in a non-UNIX
246system), the current folder is used.</p>
247
248<p style="margin-top: 1em"><b>EXAMPLES</b></p>
249
250<p style="margin-left:6%;">The command:</p>
251
252<p style="margin-left:14%;">nissy solve -v -O 1
253&quot;R'U'FD2L2FR2U2R2BD2LB2D'B2L'R'BD2BU2LU2R'U'F&quot;</p>
254
255<p style="margin-left:6%;">Returns:</p>
256
257<p style="margin-left:14%;">Searching depth 0 <br>
258Searching depth 1 <br>
259(some more lines) <br>
260Searching depth 16 <br>
261D2 F' U2 D2 F' L2 D R2 D F B2 R' L2 F' U' D <br>
262Searching depth 17 <br>
263D2 F' U2 D2 F' L2 D R2 D F B2 R' L2 F' U' D (16)</p>
264
265<p style="margin-left:6%;">Notice that the solution is
266printed twice: the first time it is printed as soon as it is
267found as requested by the -v option.</p>
268
269<p style="margin-left:6%; margin-top: 1em">The command:</p>
270
271<p style="margin-left:14%;">nissy solve eofb -m 4 -M 5 -N
272-n 6 &quot;R'U'FD2L2 FR2 U2R2BD2 L B2 D' B2 L' R'&quot;</p>
273
274<p style="margin-left:6%;">Returns:</p>
275
276<p style="margin-left:14%;">U B U' B (4) <br>
277U (B R' B) (4) <br>
278(U B R' B) (4) <br>
279U2 F R2 F (4) <br>
280U2 B U2 B (4) <br>
281(U2 B R' B) (4)</p>
282
283<p style="margin-left:6%; margin-top: 1em">On a UNIX shell,
284the composite command</p>
285
286<p style="margin-left:14%;">nissy scramble -n 2 | nissy
287solve -i &gt; file.txt</p>
288
289<p style="margin-left:6%;">Generates two random scrambles,
290solves them and saves the result to file.txt. The file will
291look something like this:</p>
292
293<p style="margin-left:14%;">&gt;&gt;&gt; Line: D U2 F D B'
294F L2 D' F2 R2 L B2 L' U2 B2 R F2 L' D2 <br>
295U2 R2 F2 L B2 D' R2 D' F U L2 B' U' R2 D2 R2 U (17) <br>
296&gt;&gt;&gt; Line: D B R U' B' L2 U L U D2 R L B2 U2 L2 U2 R
297U2 B2 L F2 <br>
298D' F R' D B L2 B R2 L U L U2 B D' U R U F2 (18)</p>
299
300<p style="margin-top: 1em"><b>AUTHORS</b></p>
301
302<p style="margin-left:6%;">Sebastiano Tronto
303&lt;<i>sebastiano.tronto@gmail.com</i>&gt;</p>
304
305<p style="margin-top: 1em"><b>SOURCE CODE</b></p>
306
307<p style="margin-left:6%;">Source code is available at
308<b>https://github.com/sebastianotronto/nissy</b></p>
309
310<p style="margin-left:6%; margin-top: 1em">BSD
311February&nbsp;21, 2022 BSD</p>
312<hr>
313</body>
314</html>
diff --git a/doc/nissy.pdf b/doc/nissy.pdf
deleted file mode 100644
index 17f8bde..0000000
--- a/doc/nissy.pdf
+++ /dev/null
Binary files differ
diff --git a/nissy b/nissy
deleted file mode 100755
index 266dc69..0000000
--- a/nissy
+++ /dev/null
Binary files differ
diff --git a/src/pruning.c b/src/pruning.c
index a5e60ce..1dba949 100644
--- a/src/pruning.c
+++ b/src/pruning.c
@@ -371,10 +371,6 @@ instance_fixnasty(void *arg)
371 if ((t = aux[j]) == uf) 371 if ((t = aux[j]) == uf)
372 continue; 372 continue;
373 ii = td->pd->coord->transform(t, i); 373 ii = td->pd->coord->transform(t, i);
374 if (ii < rmin || ii >= rmax)
375 fprintf(stderr,
376 "Error: transformed out of bound! "
377 "%lu %lu %lu\n", ii, rmin, rmax);
378 if (ptableval_index(td->pd, ii) > td->d) { 374 if (ptableval_index(td->pd, ii) > td->d) {
379 ptable_update_index(td->pd, ii, td->d); 375 ptable_update_index(td->pd, ii, td->d);
380 updated++; 376 updated++;
diff --git a/www/download/index.html b/www/download/index.html
index ff824f8..b115244 100644
--- a/www/download/index.html
+++ b/www/download/index.html
@@ -34,8 +34,8 @@
34</tr> 34</tr>
35<tr> 35<tr>
36 <td><strong>Latest version</strong></td> 36 <td><strong>Latest version</strong></td>
37 <td><a href="/nissy-2.0.1.tar.gz">nissy-2.0.1.tar.gz (63Kb)</a></td> 37 <td><a href="/nissy-2.0.2.tar.gz">nissy-2.0.2.tar.gz (67Kb)</a></td>
38 <td><a href="/nissy-2.0.1.exe">nissy-2.0.1.exe (770Kb)</a></td> 38 <td><a href="/nissy-2.0.2.exe">nissy-2.0.2.exe (780Kb)</a></td>
39</tr> 39</tr>
40</table> 40</table>
41 41
@@ -63,12 +63,15 @@ the git repository.
63<h3>System requirements</h3> 63<h3>System requirements</h3>
64 64
65<p> 65<p>
66A full installation of nissy requires about 3Gb of space, 66A full installation of nissy requires about 3.1Gb of space,
67of which 2.3Gb are occupied by the huge pruning table for fast optimal solving, 67of which 2.3Gb are occupied by the huge pruning table for fast optimal solving,
68and running it requires the same amount of RAM. 68and running it requires the same amount of RAM.
69One can choose to never use this function and not to install the relative 69One can choose to never use this function and not to install the relative
70pruning table. There is an alternative (slower) 70pruning table. There is an alternative (slower)
71optimal solving function that uses about 500Mb of RAM. 71optimal solving function that uses about 500Mb of RAM.
72
73When generating the pruning tables automatically (see the section Tables below),
74at least 5.3Gb or RAM are required.
72</p> 75</p>
73 76
74<h3>Windows</h3> 77<h3>Windows</h3>
@@ -103,55 +106,35 @@ Then follow the instructions below to install the pruning tables.
103 106
104<h3>Tables</h3> 107<h3>Tables</h3>
105 108
106<table class="dltable">
107<tr>
108 <td></td> <td><strong>Zip file</strong></td>
109</tr>
110<tr>
111 <td><strong>Tables</strong></td>
112 <td><a href="/nissy-tables-2.0.zip">nissy-tables.2.0.zip (1.6Gb)</a></td>
113</tr>
114</table>
115<p> 109<p>
116<strong>Note:</strong> the version 2.0 at the end of the file name is 110Once you have installed nissy, run
117only indicative. Later versions will use the same tables, unless
118otherwise specified.
119</p> 111</p>
120 112
121<p> 113<pre><code>nissy gen</code></pre>
122Nissy needs certain large tables to work. These tables are by default
123generated the first time they are needed (e.g the first time you ask to solve a
124certain step) and then saved to a file. Whenever these tables are needed again,
125nissy simply loads the corresponding file from the hard disk.
126</p>
127 114
128<p> 115<p>
129The very large table for optimal solving can take some time to generate 116to generate all the tables that Nissy will ever need.
130(about 1.5 hours on my fairly old but decent laptop, using 8 CPU threads). 117Running this command requires around 5.3Gb of RAM, and it can take some time
131In order to generate it you need at least 5Gb of RAM. 118(about 40 minutes on my fairly old but decent laptop, with 8 CPU threads).
132All other tables are much faster.
133</p> 119</p>
134 120
135<p> 121<p>
136You can ask nissy to generate all the tables it will ever need with the gen 122Some unnecessary technical detail: by default this command is going to use
137command. It is recommended to use more than one thread, if your CPU has them. 123at most 64 threads. If you want you can choose to use more threads (if your CPU
138For example, you can run: 124is very powerful) or fewer threads (if you for example want to run this command
125in the background while you do other stuff) with the <code>-t</code> option, for
126example <code>nissy gen -t 1</code>.
139</p> 127</p>
140 128
141<pre><code>nissy gen -t 8</code></pre>
142
143<p> 129<p>
144to generate all tables using 8 threads. You can change 8 to any number 130Alternatively, you can
145your CPU supports, up to 64. 131<a href="/nissy-tables-2.0.2.zip">download all the tables (1.7Gb)</a> and
146</p> 132copy them into the correct folder (see manual page, <code>ENVIRONMENT</code>
147 133section). On UNIX operating systems this folder is either
148<p> 134<code>.nissy/tables</code> in the user's home directory or
149Alternatively, you can simply download all the tables and copy them into the 135<code>$XDG_DATA_HOME/nissy/tables</code> if the XDG variable is configured.
150correct folder (see manual page, <code>ENVIRONMENT</code> section). On UNIX 136On Windows it is the same directory as the <code>nissy.exe</code> executable
151operating systems this folder is either <code>.nissy/tables</code> in the 137file.
152user's home directory or <code>$XDG_DATA_HOME/nissy/tables</code> if the
153XDG variable is configured. On Windows it is the same directory as the
154<code>nissy.exe</code> executable file.
155</p> 138</p>
156 139
157<h2 id="Upgrade">Upgrading</h2> 140<h2 id="Upgrade">Upgrading</h2>
@@ -169,7 +152,8 @@ a new folder and run <code>make</code> and <code>make install</code> again.
169</li> 152</li>
170</ul> 153</ul>
171<p> 154<p>
172In all cases the table files do not need to be upgraded. 155Between each version new table files might have been added, or old ones
156may be not used anymore. Nissy will deal with this automatically.
173</p> 157</p>
174 158
175<h2>Version history</h2> 159<h2>Version history</h2>
@@ -183,6 +167,11 @@ In all cases the table files do not need to be upgraded.
183 <td><strong>Comment</strong></td> 167 <td><strong>Comment</strong></td>
184</tr> 168</tr>
185<tr> 169<tr>
170 <td><a href="/nissy-2.0.2.tar.gz">2.0.2</a></td>
171 <td>2022-06-01</td>
172 <td>Improved table generation speed</td>
173</tr>
174<tr>
186 <td><a href="/nissy-2.0.1.tar.gz">2.0.1</a></td> 175 <td><a href="/nissy-2.0.1.tar.gz">2.0.1</a></td>
187 <td>2022-02-22</td> 176 <td>2022-02-22</td>
188 <td>Bugfix release</td> 177 <td>Bugfix release</td>

Generated with cgit - Back to sebastiano.tronto.net