From 5216fb4be01e88f5b4928a69287e8f7ee3b3af5b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 18 Oct 2024 16:35:17 +0200 Subject: Add node and fallback benchmarking --- tools/200_stats_tables_h48/stats_tables_h48.c | 4 ++-- tools/300_solve_small/solve_small.c | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/200_stats_tables_h48/stats_tables_h48.c b/tools/200_stats_tables_h48/stats_tables_h48.c index 8e80269..bdf6329 100644 --- a/tools/200_stats_tables_h48/stats_tables_h48.c +++ b/tools/200_stats_tables_h48/stats_tables_h48.c @@ -30,7 +30,7 @@ static void * run_thread(void *arg) { char s[12], cube[22]; - long long int ep, eo, cp, co; + long long int ep, eo, cp, co, stats[NISSY_SIZE_SOLVE_STATS]; int i, j; thread_arg_t *a = (thread_arg_t *)arg; @@ -42,7 +42,7 @@ run_thread(void *arg) co = randll(); nissy_getcube(ep, eo, cp, co, "fix", cube); nissy_solve(cube, "h48stats", NISSY_NISSFLAG_NORMAL, - 0, MAXMOVES, 1, -1, size, buf, 12, s); + 0, MAXMOVES, 1, -1, size, buf, 12, s, stats); for (j = 0; j < 12; j++) a->v[j][(int)s[j]]++; if ((i+1) % LOG_EVERY == 0) 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; char *buf; char *scrambles[] = { - "R D' R2 D R U2 R' D' R U2 R D R'", /* 12 optimal */ - "RLUD RLUD RLUD", /* 12 optimal */ - "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 */ - // "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 */ + /* 12 optimal */ + "R D' R2 D R U2 R' D' R U2 R D R'", + + /* 12 optimal */ + "RLUD RLUD RLUD", + + /* FMC2019 A1 - 16 optimal */ + "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", + + /* FMC2024 A1 - 19 optimal */ + "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", NULL }; void run(void) { int i; int64_t n; + long long stats[NISSY_SIZE_SOLVE_STATS]; char sol[SOL_BUFFER_LEN], cube[22]; printf("Solved the following scrambles:\n\n"); @@ -29,7 +37,7 @@ void run(void) { continue; } n = nissy_solve(cube, solver, NISSY_NISSFLAG_NORMAL, - 0, 20, 1, -1, size, buf, SOL_BUFFER_LEN, sol); + 0, 20, 1, -1, size, buf, SOL_BUFFER_LEN, sol, stats); if (n == 0) printf("No solution found\n"); else -- cgit v1.3