aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/solutions.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve performance of H48 solver with prefetchingSebastiano Tronto2026-01-121-1/+1
| | | | | | | | | With this commit we re-structure how the node expansion in the H48 solution search works to allow prefetching of pruning values, showing performance improvements in the range of 30-45% on x86, depending on table size and solution length. A small bug fix related to appending solutions is included in this commit.
* Fix duplicate solutions, overflow in maxsols and improve symmetry reduction ↵Sebastiano Tronto2025-11-241-72/+152
| | | | | | | | | | | | 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.
* Added API function for solution variationsSebastiano Tronto2025-08-071-2/+2
|
* Fix bugSebastiano Tronto2025-07-311-1/+0
|
* Fixed bug with counting solutions for coordinate solverSebastiano Tronto2025-07-301-1/+0
|
* Cleanup some TODOsSebastiano Tronto2025-07-291-1/+0
|
* Removed VLA notation from function parameters.Sebastiano Tronto2025-05-271-5/+4
| | | | | I found out that this gives undefined behavior when then size is 0. Better not to have it at all, it is confusing for other developers anyway.
* Do all loggin in main threadSebastiano Tronto2025-05-231-21/+3
| | | | | | | | | | | | | | | | | Before this committ, the solver (via the generic solution-appender routines in src/solve/solutions.h) and the H48 data generator did some logging in the worker threads, without using any locks. This was not nice, but in practice it did not cause any problem, because the log messages were rare. However, this turned out to be a problem when building to WASM, because web workers do not have access to the main JS memory, and therefore they cannot call functions from the main JS. This includes not only the callback functions for logging, but also those for polling the status of the solver (run / pause / stop). This commit fixes this at the cost or being somewhat inelegant: the solutions are not logged as they are found, but only every 500ms.
* Adjusted solvers, fixed bugSebastiano Tronto2025-04-231-1/+17
|
* Improve order of moves in NISS solutionsSebastiano Tronto2025-04-201-18/+62
| | | | | | | | Now the side that has more moves is written first. For example: write (U L F) B instead of B (U L F) This also fixes the test on appendsolutions, which used an older version of the function's signature.
* Improved logging, especially for solveSebastiano Tronto2025-04-191-8/+10
|
* Small rework of optimal vs maxsolsSebastiano Tronto2025-04-171-12/+3
| | | | | | | | | | | | | | I wanted to make the "optimal" and "maxsolutions" options mutually exclusive, but in the end I decided there is value in keeping both (e.g. for specifying a limit to the number of solutions when asking for "all" optimal"). Now optimal cannot be negative anymore, for the same reason of maxsolutions. The interface user (shell, UI) will have to take care of handling this in a way that makes sense for the user. Usually this means setting the maximum number of solutions to UINT_MAX (or a similar very high number) when the user wants "all optimal".
* Log solutions as they are foundSebastiano Tronto2025-04-151-2/+13
|
* simplified allowedmoves logicSebastiano Tronto2025-04-011-1/+1
|
* Tiny bugfix in solution writingSebastiano Tronto2025-03-251-4/+5
|
* Tiny fixSebastiano Tronto2025-03-251-4/+4
|
* Big cleanup for appendsolution()Sebastiano Tronto2025-03-241-5/+208
| | | | | | | | | | With this PR the appendsolution routine is extracted from the h48 solver and the new coordinate solver and made generic. This has many advantages: - less repetition (even if the two versions are different enough that *for now* it was not a big deal) - smaller h48/solve.h file, which is already a big beast - easier to test the appendsolution() routine separately
* Some safety with move arrays, small refactor appendcharSebastiano Tronto2025-03-221-0/+14

Generated with cgit - Back to sebastiano.tronto.net