From 4fb67201414169a2687f41c4056b2e284b4938cb Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 11 Nov 2021 22:05:00 +0100 Subject: Removed old files --- old/2021-06-14-oldalg/main.c | 56 -------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 old/2021-06-14-oldalg/main.c (limited to 'old/2021-06-14-oldalg/main.c') diff --git a/old/2021-06-14-oldalg/main.c b/old/2021-06-14-oldalg/main.c deleted file mode 100644 index 445eefc..0000000 --- a/old/2021-06-14-oldalg/main.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include "cube.h" - -int main() { - Alg *algo; - AlgList *sols; - Cube cube; - SolveOptions opts; - char line[1000]; - int i, ns = 2, nrand = 100000, sum; - - Step *stps[20] = {&drud_HTM, &optimal_HTM}; - char sss[30][30] = {"DR on U/D", "Optimal solution"}; - - opts = (SolveOptions) { - .min_moves = 0, - .max_moves = 20, - .optimal_only = true, - .max_solutions = 1, - .can_niss = false, - .feedback = true - }; - - init(); - -/* - print_ptable(&pd_drud_HTM); - print_ptable(&pd_ep_HTM); - print_ptable(&pd_corners_HTM); -*/ - - srand(time(NULL)); - sum = 0; - for (i = 0; i < nrand; i++) - sum += optimal_HTM.check(random_cube()); - printf("Average pruning value: %lf\n", ((double)sum) / ((double) nrand)); - - printf("Welcome to nissy 2.0! Insert a scramble:\n"); - - if (fgets(line, 1000, stdin) != NULL) { - algo = new_alg(line); - cube = apply_alg(algo, (Cube){0}); - - for (i = 0; i < ns; i++) { - if (stps[i]->check == NULL) - fprintf(stderr, "Check function for step %d is null\n", i); - sols = solve(cube, *stps[i], &opts); - printf("%s: %d solutions found:\n", sss[i], sols->len); - print_alglist(sols, true); - free_alglist(sols); - } - free(algo); - } - - return 0; -} -- cgit v1.3