diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-26 22:42:37 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-26 22:42:37 +0100 |
| commit | 8cec37cb3e490b06639f2e05df8b947a9333d5d2 (patch) | |
| tree | dcb1039625ae9f7afca90a0348891d29497edd17 | |
| parent | 975e3eafbae15b93a1a4f160dd781d359a6c717b (diff) | |
| download | nissy-8cec37cb3e490b06639f2e05df8b947a9333d5d2.tar.gz nissy-8cec37cb3e490b06639f2e05df8b947a9333d5d2.zip | |
Added scramble command
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | TODO.md | 5 | ||||
| -rw-r--r-- | doc/nissy.1 | 21 | ||||
| -rwxr-xr-x | nissy | bin | 318160 -> 0 bytes | |||
| -rw-r--r-- | nissy-2.0beta10.tar.gz | bin | 0 -> 63768 bytes | |||
| -rw-r--r-- | nissy-2.0beta9.tar.gz | bin | 60944 -> 0 bytes | |||
| -rwxr-xr-x | nissy.exe | bin | 786001 -> 788520 bytes | |||
| -rw-r--r-- | src/commands.c | 107 | ||||
| -rw-r--r-- | src/cube.c | 95 | ||||
| -rw-r--r-- | src/cube.h | 6 | ||||
| -rw-r--r-- | src/cubetypes.h | 2 | ||||
| -rw-r--r-- | src/solve.c | 2 |
12 files changed, 204 insertions, 36 deletions
| @@ -1,6 +1,6 @@ | |||
| 1 | # See LICENSE file for copyright and license details. | 1 | # See LICENSE file for copyright and license details. |
| 2 | 2 | ||
| 3 | VERSION = 2.0beta9 | 3 | VERSION = 2.0beta10 |
| 4 | 4 | ||
| 5 | PREFIX = /usr/local | 5 | PREFIX = /usr/local |
| 6 | MANPREFIX = ${PREFIX}/share/man | 6 | MANPREFIX = ${PREFIX}/share/man |
| @@ -10,7 +10,6 @@ It's more of a personal reminder than anything else. | |||
| 10 | ### Commands that are available in nissy 1.0, but not in this version (yet): | 10 | ### Commands that are available in nissy 1.0, but not in this version (yet): |
| 11 | * drcorners (solve corners after dr) | 11 | * drcorners (solve corners after dr) |
| 12 | * search and improve non-optimal subsequences | 12 | * search and improve non-optimal subsequences |
| 13 | * **scramble [dr, corners only, edges only, htr, fmc(RUF)...]** | ||
| 14 | * save and edit algs as "variables" | 13 | * save and edit algs as "variables" |
| 15 | (or just use a "logging system" to keep info about previously run commands, | 14 | (or just use a "logging system" to keep info about previously run commands, |
| 16 | including e.g. solutions that were not shown because -c) | 15 | including e.g. solutions that were not shown because -c) |
| @@ -21,7 +20,8 @@ including e.g. solutions that were not shown because -c) | |||
| 21 | * Other common steps (LSE, ...) | 20 | * Other common steps (LSE, ...) |
| 22 | 21 | ||
| 23 | ### Improvements to currently implemented commands | 22 | ### Improvements to currently implemented commands |
| 24 | * **solve should re-orient first if needed and not just give up if centers are off** | 23 | * solve should re-orient first if needed and not just give up if centers are off |
| 24 | * more scramble types (dr, htr, fmc(rufify)...) | ||
| 25 | * solve should try up to a small bound without loading the large pruning table | 25 | * solve should try up to a small bound without loading the large pruning table |
| 26 | 26 | ||
| 27 | ### New features | 27 | ### New features |
| @@ -29,7 +29,6 @@ including e.g. solutions that were not shown because -c) | |||
| 29 | * configurability: add an `alias` command, run config file at startup | 29 | * configurability: add an `alias` command, run config file at startup |
| 30 | * configure max ram to be used (via config file and/or command line option) | 30 | * configure max ram to be used (via config file and/or command line option) |
| 31 | * transform alg, rufify etc... | 31 | * transform alg, rufify etc... |
| 32 | * more scramble stuff (scramble FMC with rufify...) | ||
| 33 | * command notation to list available moves | 32 | * command notation to list available moves |
| 34 | * make multi-step solve much more general and create command | 33 | * make multi-step solve much more general and create command |
| 35 | 34 | ||
diff --git a/doc/nissy.1 b/doc/nissy.1 index 643674a..c725c0a 100644 --- a/doc/nissy.1 +++ b/doc/nissy.1 | |||
| @@ -71,7 +71,26 @@ Display a text-only description of the cube obtained after applying | |||
| 71 | .It Nm quit | 71 | .It Nm quit |
| 72 | Quit nissy. | 72 | Quit nissy. |
| 73 | . | 73 | . |
| 74 | .It Nm solve Ar step Oo Ar options Oc Ar scramble | 74 | .It Nm scramble Oo Fl n Ar N Oc Oo Ar type Oc |
| 75 | Print a randomly-generated (random position) scramble | ||
| 76 | . | ||
| 77 | If | ||
| 78 | .Ar N | ||
| 79 | is given, it produces | ||
| 80 | .Ar N | ||
| 81 | scrambles. | ||
| 82 | .Ar type | ||
| 83 | can be specified to be one of the following: | ||
| 84 | .Bl -tag -width Ds | ||
| 85 | .It Ar eo | ||
| 86 | Scramble with solved EO on F/B axis. | ||
| 87 | .It Ar corners | ||
| 88 | Scramble with solved edges (only cornes are scrambled). | ||
| 89 | .It Ar edges | ||
| 90 | Scramble with solved corners (only edges are scrambled). | ||
| 91 | .El | ||
| 92 | . | ||
| 93 | .It Nm solve Ar step Oo Ar options Oc Ar scramble. | ||
| 75 | Solve the given | 94 | Solve the given |
| 76 | .Ar step | 95 | .Ar step |
| 77 | on the given | 96 | on the given |
| Binary files differ | |||
diff --git a/nissy-2.0beta10.tar.gz b/nissy-2.0beta10.tar.gz new file mode 100644 index 0000000..b3b9766 --- /dev/null +++ b/nissy-2.0beta10.tar.gz | |||
| Binary files differ | |||
diff --git a/nissy-2.0beta9.tar.gz b/nissy-2.0beta9.tar.gz deleted file mode 100644 index 17b905f..0000000 --- a/nissy-2.0beta9.tar.gz +++ /dev/null | |||
| Binary files differ | |||
| Binary files differ | |||
diff --git a/src/commands.c b/src/commands.c index 02af19f..fc63e7c 100644 --- a/src/commands.c +++ b/src/commands.c | |||
| @@ -8,12 +8,14 @@ CommandArgs * print_parse_args(int c, char **v); | |||
| 8 | CommandArgs * parse_only_scramble(int c, char **v); | 8 | CommandArgs * parse_only_scramble(int c, char **v); |
| 9 | CommandArgs * parse_no_arg(int c, char **v); | 9 | CommandArgs * parse_no_arg(int c, char **v); |
| 10 | CommandArgs * solve_parse_args(int c, char **v); | 10 | CommandArgs * solve_parse_args(int c, char **v); |
| 11 | CommandArgs * scramble_parse_args(int c, char **v); | ||
| 11 | 12 | ||
| 12 | /* Exec functions ************************************************************/ | 13 | /* Exec functions ************************************************************/ |
| 13 | 14 | ||
| 14 | static void gen_exec(CommandArgs *args); | 15 | static void gen_exec(CommandArgs *args); |
| 15 | static void invert_exec(CommandArgs *args); | 16 | static void invert_exec(CommandArgs *args); |
| 16 | static void solve_exec(CommandArgs *args); | 17 | static void solve_exec(CommandArgs *args); |
| 18 | static void scramble_exec(CommandArgs *args); | ||
| 17 | static void steps_exec(CommandArgs *args); | 19 | static void steps_exec(CommandArgs *args); |
| 18 | static void commands_exec(CommandArgs *args); | 20 | static void commands_exec(CommandArgs *args); |
| 19 | static void print_exec(CommandArgs *args); | 21 | static void print_exec(CommandArgs *args); |
| @@ -26,6 +28,7 @@ static void version_exec(CommandArgs *args); | |||
| 26 | /* Local functions ***********************************************************/ | 28 | /* Local functions ***********************************************************/ |
| 27 | 29 | ||
| 28 | static bool read_step(CommandArgs *args, char *str); | 30 | static bool read_step(CommandArgs *args, char *str); |
| 31 | static bool read_scrtype(CommandArgs *args, char *str); | ||
| 29 | static bool read_scramble(int c, char **v, CommandArgs *args); | 32 | static bool read_scramble(int c, char **v, CommandArgs *args); |
| 30 | 33 | ||
| 31 | /* Commands ******************************************************************/ | 34 | /* Commands ******************************************************************/ |
| @@ -40,6 +43,15 @@ solve_cmd = { | |||
| 40 | }; | 43 | }; |
| 41 | 44 | ||
| 42 | Command | 45 | Command |
| 46 | scramble_cmd = { | ||
| 47 | .name = "scramble", | ||
| 48 | .usage = "scramble [TYPE] [-n N]", | ||
| 49 | .description = "Get a random-position scramble", | ||
| 50 | .parse_args = scramble_parse_args, | ||
| 51 | .exec = scramble_exec, | ||
| 52 | }; | ||
| 53 | |||
| 54 | Command | ||
| 43 | gen_cmd = { | 55 | gen_cmd = { |
| 44 | .name = "gen", | 56 | .name = "gen", |
| 45 | .usage = "gen [-t N]", | 57 | .usage = "gen [-t N]", |
| @@ -137,6 +149,7 @@ Command *commands[NCOMMANDS] = { | |||
| 137 | &print_cmd, | 149 | &print_cmd, |
| 138 | &quit_cmd, | 150 | &quit_cmd, |
| 139 | &solve_cmd, | 151 | &solve_cmd, |
| 152 | &scramble_cmd, | ||
| 140 | &steps_cmd, | 153 | &steps_cmd, |
| 141 | &twophase_cmd, | 154 | &twophase_cmd, |
| 142 | &unniss_cmd, | 155 | &unniss_cmd, |
| @@ -243,6 +256,37 @@ solve_parse_args(int c, char **v) | |||
| 243 | } | 256 | } |
| 244 | 257 | ||
| 245 | CommandArgs * | 258 | CommandArgs * |
| 259 | scramble_parse_args(int c, char **v) | ||
| 260 | { | ||
| 261 | int i; | ||
| 262 | long val; | ||
| 263 | |||
| 264 | CommandArgs *a = new_args(); | ||
| 265 | |||
| 266 | a->success = true; | ||
| 267 | a->n = 1; | ||
| 268 | a->scrt = -1; | ||
| 269 | |||
| 270 | for (i = 0; i < c; i++) { | ||
| 271 | if (!strcmp(v[i], "-n") && i+1 < c) { | ||
| 272 | val = strtol(v[++i], NULL, 10); | ||
| 273 | if (val < 1 || val > 1000000) { | ||
| 274 | fprintf(stderr, | ||
| 275 | "Invalid number of scrambles.\n"); | ||
| 276 | a->success = false; | ||
| 277 | return a; | ||
| 278 | } | ||
| 279 | a->n = val; | ||
| 280 | } else if (!read_scrtype(a, v[i])) { | ||
| 281 | a->success = false; | ||
| 282 | return a; | ||
| 283 | } | ||
| 284 | } | ||
| 285 | |||
| 286 | return a; | ||
| 287 | } | ||
| 288 | |||
| 289 | CommandArgs * | ||
| 246 | gen_parse_args(int c, char **v) | 290 | gen_parse_args(int c, char **v) |
| 247 | { | 291 | { |
| 248 | int val; | 292 | int val; |
| @@ -342,6 +386,26 @@ solve_exec(CommandArgs *args) | |||
| 342 | } | 386 | } |
| 343 | 387 | ||
| 344 | static void | 388 | static void |
| 389 | scramble_exec(CommandArgs *args) | ||
| 390 | { | ||
| 391 | Cube cube; | ||
| 392 | Alg *scr; | ||
| 393 | int i; | ||
| 394 | |||
| 395 | init_movesets(); | ||
| 396 | init_symcoord(); | ||
| 397 | |||
| 398 | srand(time(NULL)); | ||
| 399 | |||
| 400 | for (i = 0; i < args->n; i++) { | ||
| 401 | cube = random_cube(args->scrt); | ||
| 402 | scr = solve_2phase(cube, 1); | ||
| 403 | print_alg(scr, false); | ||
| 404 | free_alg(scr); | ||
| 405 | } | ||
| 406 | } | ||
| 407 | |||
| 408 | static void | ||
| 345 | gen_exec(CommandArgs *args) | 409 | gen_exec(CommandArgs *args) |
| 346 | { | 410 | { |
| 347 | int i; | 411 | int i; |
| @@ -454,21 +518,6 @@ version_exec(CommandArgs *args) | |||
| 454 | /* Local functions implementation ********************************************/ | 518 | /* Local functions implementation ********************************************/ |
| 455 | 519 | ||
| 456 | static bool | 520 | static bool |
| 457 | read_step(CommandArgs *args, char *str) | ||
| 458 | { | ||
| 459 | int i; | ||
| 460 | |||
| 461 | for (i = 0; i < NSTEPS; i++) { | ||
| 462 | if (steps[i] != NULL && !strcmp(steps[i]->shortname, str)) { | ||
| 463 | args->step = steps[i]; | ||
| 464 | return true; | ||
| 465 | } | ||
| 466 | } | ||
| 467 | |||
| 468 | return false; | ||
| 469 | } | ||
| 470 | |||
| 471 | static bool | ||
| 472 | read_scramble(int c, char **v, CommandArgs *args) | 521 | read_scramble(int c, char **v, CommandArgs *args) |
| 473 | { | 522 | { |
| 474 | int i, k, n; | 523 | int i, k, n; |
| @@ -510,6 +559,34 @@ read_scramble(int c, char **v, CommandArgs *args) | |||
| 510 | return args->scramble->len > 0; | 559 | return args->scramble->len > 0; |
| 511 | } | 560 | } |
| 512 | 561 | ||
| 562 | static bool | ||
| 563 | read_scrtype(CommandArgs *args, char *str) | ||
| 564 | { | ||
| 565 | int i; | ||
| 566 | |||
| 567 | args->scrt = -1; | ||
| 568 | for (i = 0; i < NSCRTYPES; i++) | ||
| 569 | if (!strcmp(scrtypes[i], str)) | ||
| 570 | args->scrt = i; | ||
| 571 | |||
| 572 | return args->scrt != -1; | ||
| 573 | } | ||
| 574 | |||
| 575 | static bool | ||
| 576 | read_step(CommandArgs *args, char *str) | ||
| 577 | { | ||
| 578 | int i; | ||
| 579 | |||
| 580 | for (i = 0; i < NSTEPS; i++) { | ||
| 581 | if (steps[i] != NULL && !strcmp(steps[i]->shortname, str)) { | ||
| 582 | args->step = steps[i]; | ||
| 583 | return true; | ||
| 584 | } | ||
| 585 | } | ||
| 586 | |||
| 587 | return false; | ||
| 588 | } | ||
| 589 | |||
| 513 | /* Public functions implementation *******************************************/ | 590 | /* Public functions implementation *******************************************/ |
| 514 | 591 | ||
| 515 | void | 592 | void |
| @@ -2,6 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | /* Local functions ***********************************************************/ | 3 | /* Local functions ***********************************************************/ |
| 4 | 4 | ||
| 5 | static void fix_eorleoud(CubeArray *arr); | ||
| 6 | static void fix_cofbcorl(CubeArray *arr); | ||
| 7 | static Cube fourval_to_cube(int eofb, int ep, int coud, int cp); | ||
| 5 | static void init_inverse(); | 8 | static void init_inverse(); |
| 6 | static bool read_invtables_file(); | 9 | static bool read_invtables_file(); |
| 7 | static bool write_invtables_file(); | 10 | static bool write_invtables_file(); |
| @@ -15,6 +18,8 @@ static uint16_t co_invtable[POW3TO7][FACTORIAL8]; | |||
| 15 | static uint16_t cp_invtable[FACTORIAL8]; | 18 | static uint16_t cp_invtable[FACTORIAL8]; |
| 16 | static uint16_t cpos_invtable[FACTORIAL6]; | 19 | static uint16_t cpos_invtable[FACTORIAL6]; |
| 17 | 20 | ||
| 21 | char *scrtypes[NSCRTYPES] = { "eo", "corners", "edges" }; | ||
| 22 | |||
| 18 | /* Functions implementation **************************************************/ | 23 | /* Functions implementation **************************************************/ |
| 19 | 24 | ||
| 20 | int | 25 | int |
| @@ -139,6 +144,71 @@ epos_to_partial_ep(int epos, int *ep, int *ss) | |||
| 139 | ep[i] = ss[eps[is++]]; | 144 | ep[i] = ss[eps[is++]]; |
| 140 | } | 145 | } |
| 141 | 146 | ||
| 147 | static void | ||
| 148 | fix_eorleoud(CubeArray *arr) | ||
| 149 | { | ||
| 150 | int i; | ||
| 151 | |||
| 152 | for (i = 0; i < 12; i++) { | ||
| 153 | if ((edge_slice(i) == 0 && edge_slice(arr->ep[i]) != 0) || | ||
| 154 | (edge_slice(i) != 0 && edge_slice(arr->ep[i]) == 0)) { | ||
| 155 | arr->eorl[i] = 1 - arr->eofb[i]; | ||
| 156 | } else { | ||
| 157 | arr->eorl[i] = arr->eofb[i]; | ||
| 158 | } | ||
| 159 | |||
| 160 | if ((edge_slice(i) == 2 && edge_slice(arr->ep[i]) != 2) || | ||
| 161 | (edge_slice(i) != 2 && edge_slice(arr->ep[i]) == 2)) { | ||
| 162 | arr->eoud[i] = 1 - arr->eofb[i]; | ||
| 163 | } else { | ||
| 164 | arr->eoud[i] = arr->eofb[i]; | ||
| 165 | } | ||
| 166 | } | ||
| 167 | } | ||
| 168 | |||
| 169 | static void | ||
| 170 | fix_cofbcorl(CubeArray *arr) | ||
| 171 | { | ||
| 172 | int i; | ||
| 173 | |||
| 174 | for (i = 0; i < 8; i++) { | ||
| 175 | if (i % 2 == arr->cp[i] % 2) { | ||
| 176 | arr->cofb[i] = arr->coud[i]; | ||
| 177 | arr->corl[i] = arr->coud[i]; | ||
| 178 | } else { | ||
| 179 | if (arr->cp[i] % 2 == 0) { | ||
| 180 | arr->cofb[i] = (arr->coud[i]+1)%3; | ||
| 181 | arr->corl[i] = (arr->coud[i]+2)%3; | ||
| 182 | } else { | ||
| 183 | arr->cofb[i] = (arr->coud[i]+2)%3; | ||
| 184 | arr->corl[i] = (arr->coud[i]+1)%3; | ||
| 185 | } | ||
| 186 | } | ||
| 187 | } | ||
| 188 | } | ||
| 189 | |||
| 190 | static Cube | ||
| 191 | fourval_to_cube(int eofb, int ep, int coud, int cp) | ||
| 192 | { | ||
| 193 | CubeArray *arr; | ||
| 194 | |||
| 195 | arr = new_cubearray((Cube){0}, pf_all); | ||
| 196 | |||
| 197 | index_to_perm(ep, 12, arr->ep); | ||
| 198 | index_to_perm(cp, 8, arr->cp); | ||
| 199 | int_to_sum_zero_array(eofb, 2, 12, arr->eofb); | ||
| 200 | int_to_sum_zero_array(coud, 3, 8, arr->coud); | ||
| 201 | |||
| 202 | /* fix parity */ | ||
| 203 | if (perm_sign(arr->ep, 12) != perm_sign(arr->cp, 8)) | ||
| 204 | swap(&(arr->ep[0]), &(arr->ep[1])); | ||
| 205 | |||
| 206 | fix_eorleoud(arr); | ||
| 207 | fix_cofbcorl(arr); | ||
| 208 | |||
| 209 | return arrays_to_cube(arr, pf_all); | ||
| 210 | } | ||
| 211 | |||
| 142 | void | 212 | void |
| 143 | free_cubearray(CubeArray *arr, PieceFilter f) | 213 | free_cubearray(CubeArray *arr, PieceFilter f) |
| 144 | { | 214 | { |
| @@ -475,10 +545,8 @@ print_cube(Cube cube) | |||
| 475 | } | 545 | } |
| 476 | 546 | ||
| 477 | Cube | 547 | Cube |
| 478 | random_cube() | 548 | random_cube(int scrt) |
| 479 | { | 549 | { |
| 480 | CubeArray *arr = new_cubearray((Cube){0}, pf_4val); | ||
| 481 | Cube ret; | ||
| 482 | int ep, cp, eo, co; | 550 | int ep, cp, eo, co; |
| 483 | 551 | ||
| 484 | ep = rand() % FACTORIAL12; | 552 | ep = rand() % FACTORIAL12; |
| @@ -486,18 +554,17 @@ random_cube() | |||
| 486 | eo = rand() % POW2TO11; | 554 | eo = rand() % POW2TO11; |
| 487 | co = rand() % POW3TO7; | 555 | co = rand() % POW3TO7; |
| 488 | 556 | ||
| 489 | index_to_perm(ep, 12, arr->ep); | 557 | if (scrt == 0) { /* EO */ |
| 490 | index_to_perm(cp, 8, arr->cp); | 558 | eo = 0; |
| 491 | int_to_sum_zero_array(eo, 2, 12, arr->eofb); | 559 | } else if (scrt == 1) { /* corners */ |
| 492 | int_to_sum_zero_array(co, 3, 8, arr->coud); | 560 | eo = 0; |
| 493 | 561 | ep = 0; | |
| 494 | if (perm_sign(arr->ep, 12) != perm_sign(arr->cp, 8)) | 562 | } else if (scrt == 2) { /* edges */ |
| 495 | swap(&(arr->ep[0]), &(arr->ep[1])); | 563 | co = 0; |
| 496 | 564 | cp = 0; | |
| 497 | ret = arrays_to_cube(arr, pf_4val); | 565 | } |
| 498 | free_cubearray(arr, pf_4val); | ||
| 499 | 566 | ||
| 500 | return ret; | 567 | return fourval_to_cube(eo, ep, co, cp); |
| 501 | } | 568 | } |
| 502 | 569 | ||
| 503 | Center | 570 | Center |
| @@ -8,6 +8,10 @@ | |||
| 8 | #include "pf.h" | 8 | #include "pf.h" |
| 9 | #include "utils.h" | 9 | #include "utils.h" |
| 10 | 10 | ||
| 11 | #define NSCRTYPES 3 | ||
| 12 | |||
| 13 | extern char *scrtypes[NSCRTYPES]; | ||
| 14 | |||
| 11 | Cube admissible_ep(Cube cube, PieceFilter f); | 15 | Cube admissible_ep(Cube cube, PieceFilter f); |
| 12 | int array_ep_to_epos(int *ep, int *eps_solved); | 16 | int array_ep_to_epos(int *ep, int *eps_solved); |
| 13 | Cube arrays_to_cube(CubeArray *arr, PieceFilter f); | 17 | Cube arrays_to_cube(CubeArray *arr, PieceFilter f); |
| @@ -28,7 +32,7 @@ void free_cubearray(CubeArray *arr, PieceFilter f); | |||
| 28 | Cube move_via_arrays(CubeArray *arr, Cube c, PieceFilter pf); | 32 | Cube move_via_arrays(CubeArray *arr, Cube c, PieceFilter pf); |
| 29 | CubeArray * new_cubearray(Cube cube, PieceFilter f); | 33 | CubeArray * new_cubearray(Cube cube, PieceFilter f); |
| 30 | void print_cube(Cube cube); | 34 | void print_cube(Cube cube); |
| 31 | Cube random_cube(); | 35 | Cube random_cube(int scrt); |
| 32 | Center what_center_at(Cube cube, Center c); | 36 | Center what_center_at(Cube cube, Center c); |
| 33 | Corner what_corner_at(Cube cube, Corner c); | 37 | Corner what_corner_at(Cube cube, Corner c); |
| 34 | Edge what_edge_at(Cube cube, Edge e); | 38 | Edge what_edge_at(Cube cube, Edge e); |
diff --git a/src/cubetypes.h b/src/cubetypes.h index b002e8b..20e028b 100644 --- a/src/cubetypes.h +++ b/src/cubetypes.h | |||
| @@ -156,6 +156,8 @@ commandargs | |||
| 156 | SolveOptions * opts; | 156 | SolveOptions * opts; |
| 157 | Step * step; | 157 | Step * step; |
| 158 | Command * command; /* For help */ | 158 | Command * command; /* For help */ |
| 159 | int n; | ||
| 160 | int scrt; | ||
| 159 | }; | 161 | }; |
| 160 | 162 | ||
| 161 | struct | 163 | struct |
diff --git a/src/solve.c b/src/solve.c index cfb2bd3..0bd1de7 100644 --- a/src/solve.c +++ b/src/solve.c | |||
| @@ -452,7 +452,7 @@ solve_2phase(Cube cube, int nthreads) | |||
| 452 | 452 | ||
| 453 | opts1.min_moves = 0; | 453 | opts1.min_moves = 0; |
| 454 | opts1.max_moves = 13; | 454 | opts1.max_moves = 13; |
| 455 | opts1.max_solutions = 100; | 455 | opts1.max_solutions = 20; |
| 456 | opts1.nthreads = nthreads; | 456 | opts1.nthreads = nthreads; |
| 457 | opts1.optimal = 3; | 457 | opts1.optimal = 3; |
| 458 | opts1.can_niss = false; | 458 | opts1.can_niss = false; |
