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

Generated with cgit - Back to sebastiano.tronto.net