aboutsummaryrefslogtreecommitdiff
path: root/old/2021-02-06/solve.h
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-02-06/solve.h
parent3568412f8f230774d0d11d7ed1c897424f95d3ef (diff)
downloadnissy-4fb67201414169a2687f41c4056b2e284b4938cb.tar.gz
nissy-4fb67201414169a2687f41c4056b2e284b4938cb.zip
Removed old files
Diffstat (limited to 'old/2021-02-06/solve.h')
-rw-r--r--old/2021-02-06/solve.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/old/2021-02-06/solve.h b/old/2021-02-06/solve.h
deleted file mode 100644
index 6479e14..0000000
--- a/old/2021-02-06/solve.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef SOLVE_H
2#define SOLVE_H
3
4#include <stdlib.h>
5#include "cube.h"
6
7/* Maximum number of moves per solution and of solutions */
8#define MAXM 30
9#define MAXS 999
10
11/* Data for solving a step:
12 - can_niss is true niss can be used, false otherwise.
13 - optimal_only if true, dynamically updates max_moves so non-optimal
14 solutions are discarded.
15 - cleanup determines whether the cleaunup() function should be used on
16 the found solutions before returning.
17 - available[m] is true if the move m can be used, false otherwise.
18 - min_moves and max_moves are the minimum and maximum number of moves that
19 can be used.
20 - max_solution is the maximum number of solutions that can be returned.
21 - precondition can be used to check wheter the step can actually be applied
22 to the cube. If it returns false, solve() stops immediately returning -1.
23 - f must return 0 if and only if the step is solve, otherwise it must return
24 a lower bound for the number of moves required (without niss).
25 - sorted_moves[] can be used to specify in which order moves are tried
26 by the solving algorithm (for example if one wants to always try F' before
27 F). If sorted_moves[0] == NULLMOVE, the list is generated automatically.
28 It is advised to list first all the moves that actually influence the
29 solved state of the step (this is the default choice). This is in order to
30 avoid cases like B2 F for EO and to NISS only when it makes sense.
31 - start_moves [Currently unused, REMOVE]
32 are the moves that will be used as first moves of all
33 solutions. For example giving R' U' F (F' U R) will generate FMC scrambles
34 and y (y) will solve the step on another axis.
35 - pre_rotation are the rotations to apply before the scamble to solve
36 the step wrt a different orientation
37 - pre_rotation are the rotations to apply before the scamble to solve
38 the step wth respect to a different orientation.
39 - solutions[][] is the array where to store the found solutions. */
40typedef struct {
41 bool can_niss, optimal_only, cleanup, *available;
42 int min_moves, max_moves;
43 uint64_t max_solutions;
44 bool (*precondition)(Cube);
45 uint16_t (*f)(Cube);
46 Move sorted_moves[NMOVES];
47 NissMove pre_rotation[3], solutions[MAXS][MAXM];
48} SolveData;
49
50int solve(Cube cube, SolveData *data); /* Returns the number of solutions. */
51
52/* Steps */
53uint16_t f_eofb(Cube cube);
54
55#endif

Generated with cgit - Back to sebastiano.tronto.net