aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/coord (unfollow)
Commit message (Collapse)AuthorFilesLines
2026-04-06Make the project build with Microsoft's broken C compiler.Sebastiano Tronto7-84/+89
MSVC is not fully C11-compliant, even when compiling with /std:c11. Some changes were needed to make the codebase compatible. Notably, the notation a[static N] and a[n] for function parameters of array type is not supported, so that had to be hidden behind a macro. Atomic types are also an experimental feature, apparently, but at least they work with the correct compiler flag. One thing that MSVC does well, however, is warning on integer conversions on /W4 level. I am not sure if Clang and GCC have something similar, so I took this chance to fix some of these.
2025-12-23Added cornersx solverSebastiano Tronto4-1/+79
2025-12-19Add coordinate solvers for cornersh48-corner-estimateSebastiano Tronto5-0/+87
2025-11-24Fix duplicate solutions, overflow in maxsols and improve symmetry reduction ↵Sebastiano Tronto2-8/+10
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.
2025-08-06Added HTR solverSebastiano Tronto12-68/+164
2025-08-05Added DRFIN solverSebastiano Tronto11-74/+522
2025-08-01Move is_eo_even to more appropriate moduleSebastiano Tronto1-14/+0
2025-08-01Added CPEPE coordinate in preparation of full DRFIN solverSebastiano Tronto1-0/+86
2025-08-01Fixed nasty bugSebastiano Tronto1-0/+2
2025-08-01Reworked coordinate solver axis specificationSebastiano Tronto10-61/+24
2025-08-01Added solvetests for DRSLICESebastiano Tronto1-2/+2
This also changes the rotation axes for DRSLICE, so that the move U gets transformed to R and F instead of L and B.
2025-07-31Fixed bug and added testsSebastiano Tronto1-32/+25
2025-07-31Fix switch logic in coord solverSebastiano Tronto1-0/+8
2025-07-31Fix bugSebastiano Tronto1-22/+58
2025-07-30Fixed bug with counting solutions for coordinate solverSebastiano Tronto1-7/+3
2025-07-30added drslice coordinateSebastiano Tronto11-52/+197
2025-07-29All coordinates unsignedSebastiano Tronto4-11/+7
2025-07-29Cleanup some TODOsSebastiano Tronto2-10/+2
2025-07-28Make failed assert exit immediatelySebastiano Tronto1-1/+1
2025-07-17Renamed drslice drfinnoeSebastiano Tronto3-26/+26
2025-07-17Comments for drsliceSebastiano Tronto1-4/+15
2025-07-17Small optimization for coord gendataSebastiano Tronto1-5/+10
2025-07-17Working drslice (same results as nissy-classic)Sebastiano Tronto4-0/+137
2025-05-27Removed VLA notation from function parameters.Sebastiano Tronto4-16/+15
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.
2025-05-23Do all loggin in main threadSebastiano Tronto1-3/+2
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.
2025-05-19Refactored checkdataSebastiano Tronto9-19/+123
Relevant changes include: - Changed the signature of nissy_checkdata(). - Removed expected_distribution.h from tools; this data is now included in each solver's src/ code. - Removed distribution check for cocsep; may add back later.
2025-05-18Refactor solver dispatch and checkdataSebastiano Tronto3-48/+34
2025-04-29Added stop / pause / resume solve to APISebastiano Tronto1-5/+9
2025-04-25NISSSebastiano Tronto4-4/+4
2025-04-23Adjusted solvers, fixed bugSebastiano Tronto1-8/+9
2025-04-21Always use unsigned char * for data buffersSebastiano Tronto7-87/+95
Before this commit I was inconsistently using one of void *, char * and uint8_t *.
2025-04-19Improved logging, especially for solveSebastiano Tronto3-19/+22
2025-04-17Small rework of optimal vs maxsolsSebastiano Tronto1-6/+7
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".
2025-04-15Log solutions as they are foundSebastiano Tronto1-2/+2
2025-04-08Some minor changes to the interface.Sebastiano Tronto2-3/+3
- Simplified logger to accept only a string, not a variadic list of args like printf(). This can still use some improvement, but now it is easier to use from other languages. - Fixed some misuses of the logger (wrong types etc) - Renamed some constants - Fixed some typos in comments.
2025-04-02Added dreo coordinate solverSebastiano Tronto9-14/+168
2025-04-01Make single-use struct field anonymousSebastiano Tronto1-12/+10
2025-04-01Make symcoord logic genericSebastiano Tronto4-115/+191
2025-04-01Fix mismatched type in function prototype and implementationSebastiano Tronto2-2/+2
2025-04-01simplified allowedmoves logicSebastiano Tronto1-2/+12
2025-03-29Optimize genptable for coordinate solve (20x speedup)Sebastiano Tronto2-19/+99
2025-03-28DR coordinate solverSebastiano Tronto6-14/+231
2025-03-25More safety with pointers using VLA function parametersSebastiano Tronto2-9/+26
2025-03-25Added NISS to coord solverSebastiano Tronto7-95/+272
2025-03-24Big cleanup for appendsolution()Sebastiano Tronto1-96/+51
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
2025-03-22Some safety with move arrays, small refactor appendcharSebastiano Tronto4-51/+41
2025-03-19Filter solutions for coordinate solver and fix orderingSebastiano Tronto3-3/+7
2025-03-14BugfixSebastiano Tronto1-4/+14
2025-03-14Added checkdata for coord EOSebastiano Tronto1-0/+24
2025-03-14Replaced datasize with solverinfoSebastiano Tronto2-1/+19

Generated with cgit - Back to sebastiano.tronto.net