h48

A prototype for an optimal Rubik's cube solver, work in progress.
git clone https://git.tronto.net/h48
Download | Log | Files | Refs | README | LICENSE

commit 067ba55add258ab03db328234168af66c4ad87c3
parent af1399f223e3857a3d2690337e84430cdbeff16a
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Fri, 10 Nov 2023 17:07:42 +0100

Towards a definitve API

Diffstat:
MTODO.txt | 62+++++++++++++++++++++++++++-----------------------------------
Mcube.c | 6------
Mcube.h | 68++++++++++++++++++++++++++++++++------------------------------------
Rtest/061_coord_eo/00_solved.in -> old/061_coord_eo/00_solved.in | 0
Rtest/061_coord_eo/00_solved.out -> old/061_coord_eo/00_solved.out | 0
Rtest/061_coord_eo/01_U.in -> old/061_coord_eo/01_U.in | 0
Rtest/061_coord_eo/01_U.out -> old/061_coord_eo/01_U.out | 0
Rtest/061_coord_eo/02_U2.in -> old/061_coord_eo/02_U2.in | 0
Rtest/061_coord_eo/02_U2.out -> old/061_coord_eo/02_U2.out | 0
Rtest/061_coord_eo/03_U3.in -> old/061_coord_eo/03_U3.in | 0
Rtest/061_coord_eo/03_U3.out -> old/061_coord_eo/03_U3.out | 0
Rtest/061_coord_eo/04_D.in -> old/061_coord_eo/04_D.in | 0
Rtest/061_coord_eo/04_D.out -> old/061_coord_eo/04_D.out | 0
Rtest/061_coord_eo/07_R.in -> old/061_coord_eo/07_R.in | 0
Rtest/061_coord_eo/07_R.out -> old/061_coord_eo/07_R.out | 0
Rtest/061_coord_eo/08_R2.in -> old/061_coord_eo/08_R2.in | 0
Rtest/061_coord_eo/08_R2.out -> old/061_coord_eo/08_R2.out | 0
Rtest/061_coord_eo/10_L.in -> old/061_coord_eo/10_L.in | 0
Rtest/061_coord_eo/10_L.out -> old/061_coord_eo/10_L.out | 0
Rtest/061_coord_eo/13_F.in -> old/061_coord_eo/13_F.in | 0
Rtest/061_coord_eo/13_F.out -> old/061_coord_eo/13_F.out | 0
Rtest/061_coord_eo/14_F2.in -> old/061_coord_eo/14_F2.in | 0
Rtest/061_coord_eo/14_F2.out -> old/061_coord_eo/14_F2.out | 0
Rtest/061_coord_eo/15_F3.in -> old/061_coord_eo/15_F3.in | 0
Rtest/061_coord_eo/15_F3.out -> old/061_coord_eo/15_F3.out | 0
Rtest/061_coord_eo/16_B.in -> old/061_coord_eo/16_B.in | 0
Rtest/061_coord_eo/16_B.out -> old/061_coord_eo/16_B.out | 0
Rtest/061_coord_eo/17_B2.in -> old/061_coord_eo/17_B2.in | 0
Rtest/061_coord_eo/17_B2.out -> old/061_coord_eo/17_B2.out | 0
Rtest/061_coord_eo/18_B3.in -> old/061_coord_eo/18_B3.in | 0
Rtest/061_coord_eo/18_B3.out -> old/061_coord_eo/18_B3.out | 0
Rtest/061_coord_eo/20_scrambled.in -> old/061_coord_eo/20_scrambled.in | 0
Rtest/061_coord_eo/20_scrambled.out -> old/061_coord_eo/20_scrambled.out | 0
Rtest/061_coord_eo/coord_eo_tests.c -> old/061_coord_eo/coord_eo_tests.c | 0
Rbenchmark/bench.c -> old/benchmark/bench.c | 0
Rbenchmark/bench.sh -> old/benchmark/bench.sh | 0
Rbenchmark/cube-bench.c -> old/benchmark/cube-bench.c | 0
Aold/benchmark/results/results-2023-10-31-18-54-37.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-10-31-19-13-49.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-01-20-55-21.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-03-23-08-50.txt | 18++++++++++++++++++
Aold/benchmark/results/results-2023-11-03-23-10-40.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-04-10-22-43.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-04-10-23-11.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-04-10-23-43.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-04-10-24-08.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-04-10-52-05.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-04-10-53-06.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-04-10-57-46.txt | 32++++++++++++++++++++++++++++++++
Aold/benchmark/results/results-2023-11-10-15-49-45.txt | 28++++++++++++++++++++++++++++
Aold/benchmark/results/results.txt | 28++++++++++++++++++++++++++++
Atest/020_move/300_multimove_solved.in | 2++
Atest/020_move/300_multimove_solved.out | 1+
Atest/020_move/301_multimove_scrambled.in | 2++
Atest/020_move/301_multimove_scrambled.out | 1+
55 files changed, 491 insertions(+), 77 deletions(-)

diff --git a/TODO.txt b/TODO.txt @@ -1,43 +1,30 @@ -## Big change - -* Add tests for multiple moves - -### More for moves - -* define macro to loop over moves e.g. #define FOREACHMOVE(action) - -### API goals: - -* manipulate move sequences (invert, unniss, cleanup, mirror / transform...) -* solvers (optimal, generic, coordinates) -* print cube (in various formats) -* print ptables (or layout data in such a way that can be printed - easily, e.g. first bytes are null-terminated strig and can be - printed by user) - -### Solvers - -* Actually do A*, no fixed depth -* Use threading (see below) -* Return strings, newline separated (see nissy_ffi) -* Instead of depth, I need the following parameters: - int minmoves - int maxmoves - a parameter for all solutions / nmax / optimal / -O n -* How to make the above nicer? can it be done with a minimal - amount of parameters (e.g. at most 2)? - -### Rename to libnissy - -* prefix public functions with libnissy_ or something similar -* move() that takes a string (alg) as input +## Roadmap + +See the sections below for details + +* Implement some simple solver +* Extend cube and moves to include centers +* More complex optimal solvers, pruning tables +* Benchmarks +* Multithreading (build-time option number of threads) +* Other optimizations +* NISS +* Move manipulation utilities +* Coordinate solvers and other steps +* More output formats +* Adapters for other languages (at least python) +* More documentation (or keep all in cube.h?) +* Rename to libnissy +* Release 1.0 ## Solving -### Generic solver +### Simple (slow, light) solver +* Decide on API for solve() (see above) +* solve generic becomes private, use cube_fast_t instead of cube_t +* write simple solver based on generic * tests: solve full cube (max 7-8 moves?) -* more tests: eo and other stuff * benchmarks ### Coordinates @@ -110,8 +97,10 @@ What about symcoord? ## Improvements and other things +* Rename to libnissy (prefix public functions with nissy_?) * add centers (and moves...) * for CO: move to bits 5 and 6, no need for padding bit +* manipulate move sequences (invert, unniss, cleanup, mirror / transform...) * NISS: Add mask to moves (e.g. U | NISS where NISS = 32 or something); adapt readmoves and writemoves. * Consider adding centers and other moves (for avx2: centers in the @@ -121,6 +110,9 @@ What about symcoord? ascii art (color = 1 letter) twizzle binary https://www.experiments.cubing.net/cubing.js/spec/binary/ reid? +* print ptables (or layout data in such a way that can be printed + easily, e.g. first bytes are null-terminated strig and can be + printed by user) ## "Front-end" diff --git a/cube.c b/cube.c @@ -3619,12 +3619,6 @@ applytrans(cube_t cube, char *buf) return fasttocube(fast); } -int64_t -coord_eo(cube_t cube) -{ - return coord_fast_eo(cubetofast(cube)); -} - /****************************************************************************** Section: solvers diff --git a/cube.h b/cube.h @@ -106,50 +106,46 @@ cube_t readcube(char *format, char *buf); void writecube(char *format, cube_t cube, char *buf); /****************************************************************************** -Coordinates - -TODO description -******************************************************************************/ - -int64_t coord_eo(cube_t); - -/****************************************************************************** Solvers -The solutions are returned as a newline-separated list of characters. +The solutions are returned as a newline-separated list of characters. Moves +are separated by single spaces. Unless specified otherwise, all the solutions are not trivially simplifiable. This means that sequences like U U2 or R L R will not appear in any solution. Moreover, two consecutive parallel moves are always going to be sorted in increasing order. For example, L R2 may never appear in a solution, but R2 L could. - -Solvers return -1 in case of error, the number of solutions found otherwise. - -TODO NISS / INVERSE / LINEAR as a mask? - -All solvers take at least the following parameters, satisfying the conditions -in square brackets: -TODO more! - - cube_t cube [issolvable(cube)]: The cube to solve. - - uint8_t depth [depth <= 20]: The lenght of the solution. - - int maxsols: The maximum number of solutions to find. The solver - stops when the limit is reached. If set to a negative number, all - the solutions are found. - - move_t *ret: The array where the moves of the solutions are stored. - There is no separator between different solutions; to read the - solutions, use the fact that all solutions has the same length: the - i-th move of the j-th solution is ret[j*depth + i]. - -Some solvers take other parameters. See below for details. ******************************************************************************/ -/* TODO -int solve_generic( - cube_t cube, - uint8_t depth, - int maxsols, - uint8_t *ret, // TODO change to char - int (*estimate)(cube_t) +int64_t solve( + cube_t cube, /* The cube to solve. Must be solvable. */ + char *solver, /* The solver. Supported solvers: TODO. */ + char *options, /* Some solvers accept extra options, + * like "!filter". + */ + char *nisstype, /* Can be "normal", "inverse", "mixed" or "linear". */ + int8_t minmoves, /* The minimum number of moves. Must be >= 0. */ + int8_t maxmoves, /* The maximum number of moves. If negative, the + * maximum length is unlimited. + */ + int64_t maxsols, /* The maximum number of solutions. */ + int64_t optimal, /* All solutions at most "optimal" moves from the + * shortest solution (respecting minmoves) are found. + * If negative, this parameter is ignored. + */ + void *data, /* Some solvers require extra data to function + * properly (for example, pruning tables). This data + * can be generated with gendata(), see below. + */ + char *solutions /* The solutions (return parameter) */ ); -*/ + +/* Solving n cubes optimally, one solutions per cube. Options are similar + * to solve(). + */ +void multisolve(int n, cube_t *cube, char *solver, void *data, char *sols); + +/* Returns the number of bytes written to data, -1 in case of error. + * TODO: write down how much memory every solver requires. */ +int64_t gendata(char *solver, void *data); diff --git a/test/061_coord_eo/00_solved.in b/old/061_coord_eo/00_solved.in diff --git a/test/061_coord_eo/00_solved.out b/old/061_coord_eo/00_solved.out diff --git a/test/061_coord_eo/01_U.in b/old/061_coord_eo/01_U.in diff --git a/test/061_coord_eo/01_U.out b/old/061_coord_eo/01_U.out diff --git a/test/061_coord_eo/02_U2.in b/old/061_coord_eo/02_U2.in diff --git a/test/061_coord_eo/02_U2.out b/old/061_coord_eo/02_U2.out diff --git a/test/061_coord_eo/03_U3.in b/old/061_coord_eo/03_U3.in diff --git a/test/061_coord_eo/03_U3.out b/old/061_coord_eo/03_U3.out diff --git a/test/061_coord_eo/04_D.in b/old/061_coord_eo/04_D.in diff --git a/test/061_coord_eo/04_D.out b/old/061_coord_eo/04_D.out diff --git a/test/061_coord_eo/07_R.in b/old/061_coord_eo/07_R.in diff --git a/test/061_coord_eo/07_R.out b/old/061_coord_eo/07_R.out diff --git a/test/061_coord_eo/08_R2.in b/old/061_coord_eo/08_R2.in diff --git a/test/061_coord_eo/08_R2.out b/old/061_coord_eo/08_R2.out diff --git a/test/061_coord_eo/10_L.in b/old/061_coord_eo/10_L.in diff --git a/test/061_coord_eo/10_L.out b/old/061_coord_eo/10_L.out diff --git a/test/061_coord_eo/13_F.in b/old/061_coord_eo/13_F.in diff --git a/test/061_coord_eo/13_F.out b/old/061_coord_eo/13_F.out diff --git a/test/061_coord_eo/14_F2.in b/old/061_coord_eo/14_F2.in diff --git a/test/061_coord_eo/14_F2.out b/old/061_coord_eo/14_F2.out diff --git a/test/061_coord_eo/15_F3.in b/old/061_coord_eo/15_F3.in diff --git a/test/061_coord_eo/15_F3.out b/old/061_coord_eo/15_F3.out diff --git a/test/061_coord_eo/16_B.in b/old/061_coord_eo/16_B.in diff --git a/test/061_coord_eo/16_B.out b/old/061_coord_eo/16_B.out diff --git a/test/061_coord_eo/17_B2.in b/old/061_coord_eo/17_B2.in diff --git a/test/061_coord_eo/17_B2.out b/old/061_coord_eo/17_B2.out diff --git a/test/061_coord_eo/18_B3.in b/old/061_coord_eo/18_B3.in diff --git a/test/061_coord_eo/18_B3.out b/old/061_coord_eo/18_B3.out diff --git a/test/061_coord_eo/20_scrambled.in b/old/061_coord_eo/20_scrambled.in diff --git a/test/061_coord_eo/20_scrambled.out b/old/061_coord_eo/20_scrambled.out diff --git a/test/061_coord_eo/coord_eo_tests.c b/old/061_coord_eo/coord_eo_tests.c diff --git a/benchmark/bench.c b/old/benchmark/bench.c diff --git a/benchmark/bench.sh b/old/benchmark/bench.sh diff --git a/benchmark/cube-bench.c b/old/benchmark/cube-bench.c diff --git a/old/benchmark/results/results-2023-10-31-18-54-37.txt b/old/benchmark/results/results-2023-10-31-18-54-37.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UR0 +> moves: 3.5626s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 9.9028s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 2.9944s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: DB0 +> inv: 2.6475s + +Benchmark summary: +moves: 100000000 moves in 3.5626s (28.0697 MTPS) +trans: 100000000 trans in 9.9028s (10.0981 MTPS) +comp: 100000000 comps in 2.9944s (33.3956 MCPS) +inv: 100000000 invs in 2.6475s (37.7714 MIPS) +Total time: 19.1073 diff --git a/old/benchmark/results/results-2023-10-31-19-13-49.txt b/old/benchmark/results/results-2023-10-31-19-13-49.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UF0 +> moves: 3.5096s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 9.8367s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 2.9693s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: FL0 +> inv: 2.6227s + +Benchmark summary: +moves: 100000000 moves in 3.5096s (28.4930 MTPS) +trans: 100000000 trans in 9.8367s (10.1660 MTPS) +comp: 100000000 comps in 2.9693s (33.6784 MCPS) +inv: 100000000 invs in 2.6227s (38.1283 MIPS) +Total time: 18.9383 diff --git a/old/benchmark/results/results-2023-11-01-20-55-21.txt b/old/benchmark/results/results-2023-11-01-20-55-21.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: BL1 +> moves: 3.6556s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 7.5844s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 3.0103s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: DL0 +> inv: 2.6601s + +Benchmark summary: +moves: 100000000 moves in 3.6556s (27.3556 MTPS) +trans: 100000000 trans in 7.5844s (13.1850 MTPS) +comp: 100000000 comps in 3.0103s (33.2191 MCPS) +inv: 100000000 invs in 2.6601s (37.5929 MIPS) +Total time: 16.9103 diff --git a/old/benchmark/results/results-2023-11-03-23-08-50.txt b/old/benchmark/results/results-2023-11-03-23-08-50.txt @@ -0,0 +1,18 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: ERR +> moves: 6.6791s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: ERR +> trans: 6.6844s + +> comp: setting up benchmark... +> comp: running benchmark... diff --git a/old/benchmark/results/results-2023-11-03-23-10-40.txt b/old/benchmark/results/results-2023-11-03-23-10-40.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: BL1 +> moves: 1.6354s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: ERR +> trans: 1.9863s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 0.3505s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: DL1 +> inv: 0.7249s + +Benchmark summary: +moves: 100000000 moves in 1.6354s (61.1463 MTPS) +trans: 100000000 trans in 1.9863s (50.3458 MTPS) +comp: 100000000 comps in 0.3505s (285.3105 MCPS) +inv: 100000000 invs in 0.7249s (137.9488 MIPS) +Total time: 4.6971 diff --git a/old/benchmark/results/results-2023-11-04-10-22-43.txt b/old/benchmark/results/results-2023-11-04-10-22-43.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UF0 +> moves: 1.3535s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 1.6526s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UR0 +> comp: 0.2848s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: DF0 +> inv: 0.6598s + +Benchmark summary: +moves: 100000000 moves in 1.3535s (73.8828 MTPS) +trans: 100000000 trans in 1.6526s (60.5112 MTPS) +comp: 100000000 comps in 0.2848s (351.1409 MCPS) +inv: 100000000 invs in 0.6598s (151.5679 MIPS) +Total time: 3.9506 diff --git a/old/benchmark/results/results-2023-11-04-10-23-11.txt b/old/benchmark/results/results-2023-11-04-10-23-11.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UL1 +> moves: 1.3463s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 1.6303s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 0.2881s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: UF0 +> inv: 0.6853s + +Benchmark summary: +moves: 100000000 moves in 1.3463s (74.2803 MTPS) +trans: 100000000 trans in 1.6303s (61.3400 MTPS) +comp: 100000000 comps in 0.2881s (347.0564 MCPS) +inv: 100000000 invs in 0.6853s (145.9211 MIPS) +Total time: 3.9499 diff --git a/old/benchmark/results/results-2023-11-04-10-23-43.txt b/old/benchmark/results/results-2023-11-04-10-23-43.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UF0 +> moves: 1.3434s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 1.6439s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UR1 +> comp: 0.2872s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: DF0 +> inv: 0.6646s + +Benchmark summary: +moves: 100000000 moves in 1.3434s (74.4399 MTPS) +trans: 100000000 trans in 1.6439s (60.8320 MTPS) +comp: 100000000 comps in 0.2872s (348.1848 MCPS) +inv: 100000000 invs in 0.6646s (150.4726 MIPS) +Total time: 3.9390 diff --git a/old/benchmark/results/results-2023-11-04-10-24-08.txt b/old/benchmark/results/results-2023-11-04-10-24-08.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UF0 +> moves: 1.3330s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 1.6094s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 0.2827s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: BL0 +> inv: 0.6527s + +Benchmark summary: +moves: 100000000 moves in 1.3330s (75.0200 MTPS) +trans: 100000000 trans in 1.6094s (62.1335 MTPS) +comp: 100000000 comps in 0.2827s (353.7582 MCPS) +inv: 100000000 invs in 0.6527s (153.2026 MIPS) +Total time: 3.8778 diff --git a/old/benchmark/results/results-2023-11-04-10-52-05.txt b/old/benchmark/results/results-2023-11-04-10-52-05.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UL0 +> moves: 3.6559s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 7.9072s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: BL1 +> comp: 3.3698s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: FL1 +> inv: 2.6933s + +Benchmark summary: +moves: 100000000 moves in 3.6559s (27.3528 MTPS) +trans: 100000000 trans in 7.9072s (12.6467 MTPS) +comp: 100000000 comps in 3.3698s (29.6755 MCPS) +inv: 100000000 invs in 2.6933s (37.1296 MIPS) +Total time: 17.6262 diff --git a/old/benchmark/results/results-2023-11-04-10-53-06.txt b/old/benchmark/results/results-2023-11-04-10-53-06.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UR1 +> moves: 1.3554s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 1.6302s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 0.2880s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: DR1 +> inv: 0.6567s + +Benchmark summary: +moves: 100000000 moves in 1.3554s (73.7816 MTPS) +trans: 100000000 trans in 1.6302s (61.3423 MTPS) +comp: 100000000 comps in 0.2880s (347.2758 MCPS) +inv: 100000000 invs in 0.6567s (152.2870 MIPS) +Total time: 3.9302 diff --git a/old/benchmark/results/results-2023-11-04-10-57-46.txt b/old/benchmark/results/results-2023-11-04-10-57-46.txt @@ -0,0 +1,32 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMP: 100000000 +INV: 100000000 + +> moves: setting up benchmark... +> moves: running benchmark... +> moves: resulting cube, first piece: UL0 +> moves: 1.3518s + +> trans: setting up benchmark... +> trans: running benchmark... +> trans: resulting cube, first piece: UF0 +> trans: 1.6350s + +> comp: setting up benchmark... +> comp: running benchmark... +> comp: resulting cube, first piece: UF0 +> comp: 0.3039s + +> inv: setting up benchmark... +> inv: running benchmark... +> comp: resulting cube, first piece: UR1 +> inv: 0.6681s + +Benchmark summary: +moves: 100000000 moves in 1.3518s (73.9734 MTPS) +trans: 100000000 trans in 1.6350s (61.1621 MTPS) +comp: 100000000 comps in 0.3039s (329.0593 MCPS) +inv: 100000000 invs in 0.6681s (149.6737 MIPS) +Total time: 3.9589 diff --git a/old/benchmark/results/results-2023-11-10-15-49-45.txt b/old/benchmark/results/results-2023-11-10-15-49-45.txt @@ -0,0 +1,28 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMPOSE: 100000000 +INVERSE: 100000000 + +> moves: running benchmark... +> moves: resulting cube, first piece: UB0 +> moves: 0.0097s + +> trans: running benchmark... +> trans: resulting cube, first piece: DB0 +> trans: 20.1464s + +> compose: running benchmark... +> compose: resulting cube, first piece: ERR +> compose: 3.7322s + +> inverse: running benchmark... +> inverse: resulting cube, first piece: DB0 +> inverse: 2.1003s + +Benchmark summary: +moves: 100000000 moves in 0.0097s (10259.5134 MTPS) +trans: 100000000 transformations in 20.1464s (4.9637 MTPS) +compose: 100000000 compositions in 3.7322s (26.7940 MCPS) +inverse: 100000000 inverses in 2.1003s (47.6116 MIPS) +Total time: 25.9886 diff --git a/old/benchmark/results/results.txt b/old/benchmark/results/results.txt @@ -0,0 +1,28 @@ +Benchmarks settings: +MOVES: 100000000 +TRANS: 100000000 +COMPOSE: 100000000 +INVERSE: 100000000 + +> moves: running benchmark... +> moves: resulting cube, first piece: UB0 +> moves: 0.0097s + +> trans: running benchmark... +> trans: resulting cube, first piece: DB0 +> trans: 20.1464s + +> compose: running benchmark... +> compose: resulting cube, first piece: ERR +> compose: 3.7322s + +> inverse: running benchmark... +> inverse: resulting cube, first piece: DB0 +> inverse: 2.1003s + +Benchmark summary: +moves: 100000000 moves in 0.0097s (10259.5134 MTPS) +trans: 100000000 transformations in 20.1464s (4.9637 MTPS) +compose: 100000000 compositions in 3.7322s (26.7940 MCPS) +inverse: 100000000 inverses in 2.1003s (47.6116 MIPS) +Total time: 25.9886 diff --git a/test/020_move/300_multimove_solved.in b/test/020_move/300_multimove_solved.in @@ -0,0 +1,2 @@ +B2 D' L2 D' B2 D B2 R2 B2 D U2 R D R2 B L' B' L2 U B2 U +UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/020_move/300_multimove_solved.out b/test/020_move/300_multimove_solved.out @@ -0,0 +1 @@ +UB1 UL0 UF1 DL0 FL0 DB0 BR0 BL0 DF0 FR0 DR0 UR0 UBR1 DFR1 UBL0 DFL2 DBR1 DBL2 UFR1 UFL1 diff --git a/test/020_move/301_multimove_scrambled.in b/test/020_move/301_multimove_scrambled.in @@ -0,0 +1,2 @@ +D2 B2 L U2 B2 L' B2 R' D2 R D2 B F L U F2 L' R' B2 U B2 +UB1 UL0 UF1 DL0 FL0 DB0 BR0 BL0 DF0 FR0 DR0 UR0 UBR1 DFR1 UBL0 DFL2 DBR1 DBL2 UFR1 UFL1 diff --git a/test/020_move/301_multimove_scrambled.out b/test/020_move/301_multimove_scrambled.out @@ -0,0 +1 @@ +UL1 UB0 DL1 UR0 BL1 DR1 BR0 DB0 FL1 UF0 FR1 DF0 DFR2 DFL0 DBL0 UFL0 UBR1 UBL0 UFR2 DBR1