aboutsummaryrefslogtreecommitdiff
path: root/old/2021-07-02-genptable-dfs/main.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 22:05:00 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 22:05:00 +0100
commit4fb67201414169a2687f41c4056b2e284b4938cb (patch)
treea68246e3e21435229541f83f485ab41cfb2ba08a /old/2021-07-02-genptable-dfs/main.c
parent3568412f8f230774d0d11d7ed1c897424f95d3ef (diff)
downloadnissy-4fb67201414169a2687f41c4056b2e284b4938cb.tar.gz
nissy-4fb67201414169a2687f41c4056b2e284b4938cb.zip
Removed old files
Diffstat (limited to '')
-rw-r--r--old/2021-07-02-genptable-dfs/main.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/old/2021-07-02-genptable-dfs/main.c b/old/2021-07-02-genptable-dfs/main.c
deleted file mode 100644
index 1ebd917..0000000
--- a/old/2021-07-02-genptable-dfs/main.c
+++ /dev/null
@@ -1,80 +0,0 @@
1#include <stdio.h>
2#include "cube.h"
3#include "steps.h"
4
5int main() {
6 Alg *algo;
7 AlgList *sols;
8 Cube cube;
9 SolveOptions opts;
10 char line[1000];
11 int i, ns = 2;
12/* Move m;*/
13/* int nrand = 10000, sum1, sum2, sum3;*/
14
15 Step *stps[20] = {&drud_HTM, &optimal_HTM};
16 char sss[30][30] = {"DR on UD", "Optimal solve"};
17
18 opts = (SolveOptions) {
19 .min_moves = 0,
20 .max_moves = 20,
21 .optimal_only = true,
22 .max_solutions = 1,
23 .can_niss = false,
24 .feedback = true,
25 };
26
27 init();
28
29/*
30 srand(time(NULL));
31 sum1 = 0;
32 sum2 = 0;
33 sum3 = 0;
34 for (i = 0; i < nrand; i++) {
35 cube = random_cube();
36 sum1 += drud_HTM.check(cube, 20);
37 sum2 += optimal_HTM.check(cube, 20);
38 sum3 += cornershtreofb_HTM.check(cube, 20);
39 }
40 printf("Average drud pruning: %lf\n", ((double)sum1) / ((double) nrand));
41 printf("Average corners htr pruning: %lf\n", ((double)sum2) / ((double) nrand));
42 printf("Average corners htr + eofb pruning: %lf\n", ((double)sum3) / ((double) nrand));
43*/
44
45/*
46 for (m = U; m <= B3; m++) {
47 printf("Class eofbepos after %d: ", m);
48 printf("%lu\n", coord_khuge.index(apply_move(m,(Cube){0})));
49 }
50*/
51
52 printf("Welcome to nissy 2.0! Insert a scramble:\n");
53
54 if (fgets(line, 1000, stdin) != NULL) {
55 algo = new_alg(line);
56 cube = apply_alg(algo, (Cube){0});
57
58 print_alg(inverse_alg(algo), false);
59/*
60 printf("After rb_mirror:\n");
61 cube = apply_trans(rb_mirror, cube);
62 print_cube(cube);
63 printf("Going back:\n");
64 cube = apply_trans(inverse_trans(rb_mirror), cube);
65*/
66
67 print_cube(cube);
68
69 for (i = 0; i < ns; i++) {
70 sols = solve(cube, *stps[i], &opts);
71 printf("%s: %d solutions found:\n", sss[i], sols->len);
72 print_alglist(sols, true);
73 free_alglist(sols);
74 }
75 free_alg(algo);
76 }
77
78 return 0;
79}
80

Generated with cgit - Back to sebastiano.tronto.net