From f8d247c53c3c3bd94fed645b5b47a9096cadc123 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 10 Oct 2024 14:30:39 +0200 Subject: Removed "options" from solver selection Now the solver name fully determines the solver (and options) to be used. For example, now one must specify "h48h0k4" as the name of the solver. This PR also fixes a couple of things in tools. --- tools/300_solve_small/solve_small.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tools/300_solve_small') diff --git a/tools/300_solve_small/solve_small.c b/tools/300_solve_small/solve_small.c index b572cf5..ade949a 100644 --- a/tools/300_solve_small/solve_small.c +++ b/tools/300_solve_small/solve_small.c @@ -1,8 +1,6 @@ #include "../tool.h" -const char *solver = "h48"; -const char *options = "0;4;20"; -const char *filename = "tables/h48h0k4"; +const char *solver = "h48h0k4"; char *buf; char *scrambles[] = { @@ -28,7 +26,7 @@ void run(void) { continue; } n = nissy_solve( - cube, "h48", options, "", 0, 20, 1, -1, buf, sol); + cube, solver, "", 0, 20, 1, -1, buf, sol); if (n == 0) { printf("No solution\n"); fprintf(stderr, "No solution found\n"); @@ -39,10 +37,13 @@ void run(void) { } int main(void) { + char filename[255]; + srand(time(NULL)); nissy_setlogger(log_stderr); - if (getdata(solver, options, &buf, filename) != 0) + sprintf(filename, "tables/%s", solver); + if (getdata(solver, &buf, filename) != 0) return 1; timerun(run); -- cgit v1.3