aboutsummaryrefslogtreecommitdiff
path: root/tools/300_solve_small
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-10-18 16:35:17 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-10-18 16:35:17 +0200
commit5216fb4be01e88f5b4928a69287e8f7ee3b3af5b (patch)
tree24aa57a0e34c49e0e6307caf8cf830f8dd26ed49 /tools/300_solve_small
parent3d6c73c33276ecedba86cb871b4b5a089571629b (diff)
downloadnissy-core-5216fb4be01e88f5b4928a69287e8f7ee3b3af5b.tar.gz
nissy-core-5216fb4be01e88f5b4928a69287e8f7ee3b3af5b.zip
Add node and fallback benchmarking
Diffstat (limited to 'tools/300_solve_small')
-rw-r--r--tools/300_solve_small/solve_small.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/300_solve_small/solve_small.c b/tools/300_solve_small/solve_small.c
index 60d1bd8..09ca85a 100644
--- a/tools/300_solve_small/solve_small.c
+++ b/tools/300_solve_small/solve_small.c
@@ -7,16 +7,24 @@ int64_t size = 0;
7char *buf; 7char *buf;
8 8
9char *scrambles[] = { 9char *scrambles[] = {
10 "R D' R2 D R U2 R' D' R U2 R D R'", /* 12 optimal */ 10 /* 12 optimal */
11 "RLUD RLUD RLUD", /* 12 optimal */ 11 "R D' R2 D R U2 R' D' R U2 R D R'",
12 "R' U' F D2 L2 F R2 U2 R2 B D2 L B2 D' B2 L' R' B D2 B U2 L U2 R' U' F", /* FMC2019 A1 - 16 optimal */ 12
13 // "R' U' F D R F2 D L F D2 F2 L' U R' L2 D' R2 F2 R2 D L2 U2 R' U' F", /* FMC2024 A1 - 19 optimal */ 13 /* 12 optimal */
14 "RLUD RLUD RLUD",
15
16 /* FMC2019 A1 - 16 optimal */
17 "R' U' F D2 L2 F R2 U2 R2 B D2 L B2 D' B2 L' R' B D2 B U2 L U2 R' U' F",
18
19 /* FMC2024 A1 - 19 optimal */
20 "R' U' F D R F2 D L F D2 F2 L' U R' L2 D' R2 F2 R2 D L2 U2 R' U' F",
14 NULL 21 NULL
15}; 22};
16 23
17void run(void) { 24void run(void) {
18 int i; 25 int i;
19 int64_t n; 26 int64_t n;
27 long long stats[NISSY_SIZE_SOLVE_STATS];
20 char sol[SOL_BUFFER_LEN], cube[22]; 28 char sol[SOL_BUFFER_LEN], cube[22];
21 29
22 printf("Solved the following scrambles:\n\n"); 30 printf("Solved the following scrambles:\n\n");
@@ -29,7 +37,7 @@ void run(void) {
29 continue; 37 continue;
30 } 38 }
31 n = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL, 39 n = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL,
32 0, 20, 1, -1, size, buf, SOL_BUFFER_LEN, sol); 40 0, 20, 1, -1, size, buf, SOL_BUFFER_LEN, sol, stats);
33 if (n == 0) 41 if (n == 0)
34 printf("No solution found\n"); 42 printf("No solution found\n");
35 else 43 else

Generated with cgit - Back to sebastiano.tronto.net