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

Generated with cgit - Back to sebastiano.tronto.net