diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-25 10:08:02 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-25 10:08:02 +0100 |
| commit | 51dff333ceb5228b8de98dd621c0c2b62ed43441 (patch) | |
| tree | 3099fc04207bae157abcc593b9f7784edf83d7a6 | |
| parent | bedc3ef9af6bc54f3ede135f1ad72565a8494f84 (diff) | |
| download | nissy-51dff333ceb5228b8de98dd621c0c2b62ed43441.tar.gz nissy-51dff333ceb5228b8de98dd621c0c2b62ed43441.zip | |
Changed -s (max solutions) option to -n and -n (NISS) to -N
| -rw-r--r-- | TODO.md | 3 | ||||
| -rw-r--r-- | doc/nissy.1 | 28 | ||||
| -rwxr-xr-x | nissy | bin | 321848 -> 321848 bytes | |||
| -rw-r--r-- | nissy-2.0beta9.tar.gz | bin | 60903 -> 60949 bytes | |||
| -rwxr-xr-x | nissy.exe | bin | 782125 -> 783134 bytes | |||
| -rw-r--r-- | src/commands.c | 4 |
6 files changed, 18 insertions, 17 deletions
| @@ -26,6 +26,8 @@ It's more of a personal reminder than anything else. | |||
| 26 | * for solve -v, solving in different orientation does not give meaningful info, | 26 | * for solve -v, solving in different orientation does not give meaningful info, |
| 27 | because I need to transform the alg as I go. | 27 | because I need to transform the alg as I go. |
| 28 | * for solve -v, print certain info like average branching value | 28 | * for solve -v, print certain info like average branching value |
| 29 | * solve -O n find solutions within n moves from optimal | ||
| 30 | (-o is the same as -O 0) | ||
| 29 | 31 | ||
| 30 | ### New features | 32 | ### New features |
| 31 | * cleanup: translate an alg to the standard HTM moveset + reorient at the end | 33 | * 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. | |||
| 33 | * configure max ram to be used (via config file and/or command line option) | 35 | * configure max ram to be used (via config file and/or command line option) |
| 34 | * command to transform cube and alg | 36 | * command to transform cube and alg |
| 35 | * command notation to list available moves | 37 | * command notation to list available moves |
| 36 | * | ||
| 37 | 38 | ||
| 38 | ## Distribution | 39 | ## Distribution |
| 39 | 40 | ||
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 | |||
| 99 | .Ar MAX | 99 | .Ar MAX |
| 100 | moves long. | 100 | moves long. |
| 101 | . | 101 | . |
| 102 | .It Fl n | 102 | .It Fl n Ar N |
| 103 | Allow use of NISS. | ||
| 104 | . | ||
| 105 | .It Fl o | ||
| 106 | Only find solutions that require the minimum number of moves. | ||
| 107 | . | ||
| 108 | .It Fl p | ||
| 109 | Plain style: do not print the number of moves. | ||
| 110 | . | ||
| 111 | .It Fl s Ar n | ||
| 112 | Try to find | 103 | Try to find |
| 113 | .Ar n | 104 | .Ar N |
| 114 | solutions. By default and unless the | 105 | solutions. By default and unless the |
| 115 | .Fl M | 106 | .Fl M |
| 116 | or | 107 | or |
| @@ -124,12 +115,21 @@ is used, all the solutions found within the given bounds are returned. | |||
| 124 | The option | 115 | The option |
| 125 | .Fl s | 116 | .Fl s |
| 126 | overwrites these default behaviors and at most | 117 | overwrites these default behaviors and at most |
| 127 | .Ar n | 118 | .Ar N |
| 128 | solutions are returned, still satisfiyng the other constraints. | 119 | solutions are returned, still satisfiyng the other constraints. |
| 129 | . | 120 | . |
| 130 | .It Fl t Ar n | 121 | .It Fl N |
| 122 | Allow use of NISS. | ||
| 123 | . | ||
| 124 | .It Fl o | ||
| 125 | Only find solutions that require the minimum number of moves. | ||
| 126 | . | ||
| 127 | .It Fl p | ||
| 128 | Plain style: do not print the number of moves. | ||
| 129 | . | ||
| 130 | .It Fl t Ar N | ||
| 131 | Use | 131 | Use |
| 132 | .Ar n | 132 | .Ar N |
| 133 | CPU threads. By default nissy uses only 1 thread. Using more than one | 133 | CPU threads. By default nissy uses only 1 thread. Using more than one |
| 134 | thread will improve performance, but the optimal number depends on your | 134 | thread will improve performance, but the optimal number depends on your |
| 135 | machine and operating system. Generally, using one less than the number | 135 | machine and operating system. Generally, using one less than the number |
| Binary files differ | |||
diff --git a/nissy-2.0beta9.tar.gz b/nissy-2.0beta9.tar.gz index bc99540..a6bf4db 100644 --- a/nissy-2.0beta9.tar.gz +++ b/nissy-2.0beta9.tar.gz | |||
| Binary files differ | |||
| Binary files 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) | |||
| 163 | return a; | 163 | return a; |
| 164 | } | 164 | } |
| 165 | a->opts->nthreads = val; | 165 | a->opts->nthreads = val; |
| 166 | } else if (!strcmp(v[i], "-s") && i+1 < c) { | 166 | } else if (!strcmp(v[i], "-n") && i+1 < c) { |
| 167 | val = strtol(v[++i], NULL, 10); | 167 | val = strtol(v[++i], NULL, 10); |
| 168 | if (val < 1 || val > 1000000) { | 168 | if (val < 1 || val > 1000000) { |
| 169 | fprintf(stderr, | 169 | fprintf(stderr, |
| @@ -175,7 +175,7 @@ solve_parse_args(int c, char **v) | |||
| 175 | } else if (!strcmp(v[i], "-o")) { | 175 | } else if (!strcmp(v[i], "-o")) { |
| 176 | a->opts->optimal_only = true; | 176 | a->opts->optimal_only = true; |
| 177 | infinitesols = true; | 177 | infinitesols = true; |
| 178 | } else if (!strcmp(v[i], "-n")) { | 178 | } else if (!strcmp(v[i], "-N")) { |
| 179 | a->opts->can_niss = true; | 179 | a->opts->can_niss = true; |
| 180 | } else if (!strcmp(v[i], "-v")) { | 180 | } else if (!strcmp(v[i], "-v")) { |
| 181 | a->opts->verbose = true; | 181 | a->opts->verbose = true; |
