From 51dff333ceb5228b8de98dd621c0c2b62ed43441 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 25 Dec 2021 10:08:02 +0100 Subject: Changed -s (max solutions) option to -n and -n (NISS) to -N --- TODO.md | 3 ++- doc/nissy.1 | 28 ++++++++++++++-------------- nissy | Bin 321848 -> 321848 bytes nissy-2.0beta9.tar.gz | Bin 60903 -> 60949 bytes nissy.exe | Bin 782125 -> 783134 bytes src/commands.c | 4 ++-- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/TODO.md b/TODO.md index 1baf808..1659cd0 100644 --- a/TODO.md +++ b/TODO.md @@ -26,6 +26,8 @@ It's more of a personal reminder than anything else. * for solve -v, solving in different orientation does not give meaningful info, because I need to transform the alg as I go. * for solve -v, print certain info like average branching value +* solve -O n find solutions within n moves from optimal + (-o is the same as -O 0) ### New features * cleanup: translate an alg to the standard HTM moveset + reorient at the end @@ -33,7 +35,6 @@ It's more of a personal reminder than anything else. * configure max ram to be used (via config file and/or command line option) * command to transform cube and alg * command notation to list available moves -* ## Distribution diff --git a/doc/nissy.1 b/doc/nissy.1 index d5e11e3..12dd638 100644 --- a/doc/nissy.1 +++ b/doc/nissy.1 @@ -99,18 +99,9 @@ Only look for solution that are at most .Ar MAX moves long. . -.It Fl n -Allow use of NISS. -. -.It Fl o -Only find solutions that require the minimum number of moves. -. -.It Fl p -Plain style: do not print the number of moves. -. -.It Fl s Ar n +.It Fl n Ar N Try to find -.Ar n +.Ar N solutions. By default and unless the .Fl M or @@ -124,12 +115,21 @@ is used, all the solutions found within the given bounds are returned. The option .Fl s overwrites these default behaviors and at most -.Ar n +.Ar N solutions are returned, still satisfiyng the other constraints. . -.It Fl t Ar n +.It Fl N +Allow use of NISS. +. +.It Fl o +Only find solutions that require the minimum number of moves. +. +.It Fl p +Plain style: do not print the number of moves. +. +.It Fl t Ar N Use -.Ar n +.Ar N 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 diff --git a/nissy b/nissy index 8bb98a2..e255651 100755 Binary files a/nissy and b/nissy differ diff --git a/nissy-2.0beta9.tar.gz b/nissy-2.0beta9.tar.gz index bc99540..a6bf4db 100644 Binary files a/nissy-2.0beta9.tar.gz and b/nissy-2.0beta9.tar.gz differ diff --git a/nissy.exe b/nissy.exe index 00e3c60..665c94a 100755 Binary files a/nissy.exe and b/nissy.exe differ diff --git a/src/commands.c b/src/commands.c index d515042..85b62ac 100644 --- a/src/commands.c +++ b/src/commands.c @@ -163,7 +163,7 @@ solve_parse_args(int c, char **v) return a; } a->opts->nthreads = val; - } else if (!strcmp(v[i], "-s") && i+1 < c) { + } else if (!strcmp(v[i], "-n") && i+1 < c) { val = strtol(v[++i], NULL, 10); if (val < 1 || val > 1000000) { fprintf(stderr, @@ -175,7 +175,7 @@ solve_parse_args(int c, char **v) } else if (!strcmp(v[i], "-o")) { a->opts->optimal_only = true; infinitesols = true; - } else if (!strcmp(v[i], "-n")) { + } else if (!strcmp(v[i], "-N")) { a->opts->can_niss = true; } else if (!strcmp(v[i], "-v")) { a->opts->verbose = true; -- cgit v1.3