diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-11-23 16:16:31 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-11-24 16:32:11 +0100 |
| commit | 147b0c3c4615c32478a4923242909b8ae5a30d03 (patch) | |
| tree | 5294d9b3655031535085a5163c2c5b5cbe7413b1 /tools/420_solvetest_h48_symmetric | |
| parent | 78ec0d22d927bc4287aa090469d5ba5f84e8780b (diff) | |
| download | nissy-core-147b0c3c4615c32478a4923242909b8ae5a30d03.tar.gz nissy-core-147b0c3c4615c32478a4923242909b8ae5a30d03.zip | |
Fix duplicate solutions, overflow in maxsols and improve symmetry reduction for H48.
This commit fixes two bugs:
- A bug that caused duplicates solutions for symmetric scrambles.
- An overflow in the maxsols parameter for the H48 solver, which
caused it to find much fewer solutions than existed.
Moreover, the H48 solvers has been improved by reducing by symmetry not
only from the starting position, but also up to the first 4 moves.
Diffstat (limited to 'tools/420_solvetest_h48_symmetric')
| -rw-r--r-- | tools/420_solvetest_h48_symmetric/scrambles.h | 18 | ||||
| -rw-r--r-- | tools/420_solvetest_h48_symmetric/solvetest.c | 9 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tools/420_solvetest_h48_symmetric/scrambles.h b/tools/420_solvetest_h48_symmetric/scrambles.h new file mode 100644 index 0000000..33f1643 --- /dev/null +++ b/tools/420_solvetest_h48_symmetric/scrambles.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | struct { | ||
| 2 | char *scramble; | ||
| 3 | char *solutions; | ||
| 4 | } s[] = { | ||
| 5 | [0] = { | ||
| 6 | .scramble = "M2 E2 S2", | ||
| 7 | .solutions = | ||
| 8 | "U2 D2 F2 B2 R2 L2\n" | ||
| 9 | "U2 D2 R2 L2 F2 B2\n" | ||
| 10 | "R2 L2 U2 D2 F2 B2\n" | ||
| 11 | "R2 L2 F2 B2 U2 D2\n" | ||
| 12 | "F2 B2 U2 D2 R2 L2\n" | ||
| 13 | "F2 B2 R2 L2 U2 D2\n" | ||
| 14 | }, | ||
| 15 | { | ||
| 16 | .scramble = "", /* End-of-list signal */ | ||
| 17 | } | ||
| 18 | }; | ||
diff --git a/tools/420_solvetest_h48_symmetric/solvetest.c b/tools/420_solvetest_h48_symmetric/solvetest.c new file mode 100644 index 0000000..245b7fe --- /dev/null +++ b/tools/420_solvetest_h48_symmetric/solvetest.c | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #define SOLVER "h48h3k2" | ||
| 2 | #define NISSFLAG NISSY_NISSFLAG_NORMAL | ||
| 3 | #define MINMOVES 0 | ||
| 4 | #define MAXMOVES 20 | ||
| 5 | #define MAXSOLUTIONS 500 | ||
| 6 | #define OPTIMAL 0 | ||
| 7 | |||
| 8 | #include "scrambles.h" | ||
| 9 | #include "../solvetest.h" | ||
