aboutsummaryrefslogtreecommitdiff
path: root/doc/h48.md
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-11-25 18:08:24 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-11-25 18:08:24 +0100
commit6c42463b800bbab4583e90aeb748a79037c65a9e (patch)
treee59458c815819821d164189650cab12ac8dee19e /doc/h48.md
parent4d0b1a53f04f1c5bc95de20fb92b2bd9cf16a895 (diff)
downloadnissy-core-6c42463b800bbab4583e90aeb748a79037c65a9e.tar.gz
nissy-core-6c42463b800bbab4583e90aeb748a79037c65a9e.zip
Updated h48 doc with recent improvements
Diffstat (limited to 'doc/h48.md')
-rw-r--r--doc/h48.md27
1 files changed, 22 insertions, 5 deletions
diff --git a/doc/h48.md b/doc/h48.md
index 3781863..c601b75 100644
--- a/doc/h48.md
+++ b/doc/h48.md
@@ -331,6 +331,23 @@ on the symmetries of the starting position, which we take advantage of)
331which are equally split between the available threads. Any solution 331which are equally split between the available threads. Any solution
332encountered in this step is of course added to the list of solutions. 332encountered in this step is of course added to the list of solutions.
333 333
334#### Filtering out symmetric cases
335
336If the cube position we wish to solve is, say, mirrored along the RL
337plane, it is redundant to attempt starting a solution with both R and L',
338as they would lead to mirrored versions of the same solution. Therefore,
339we filter out some tasks by looking for symmetries before each of the
340first 4 moves. Then, unless we are looking for only one solution, we
341have to make sure to report back all symmetric variations of a solution,
342so we need to keep track of which transformations were available at each
343of these 4 points.
344
345This can reduce the number of starting positions drastically: for
346example, for the superflip our method produces 1038 starting tasks -
347a 41.67x improvement! Of course this optimization has no effect on any
348position that isn't 3 moves or fewer away from a symmetric position -
349which is the vast majority of them.
350
334#### Heuristically sorting tasks 351#### Heuristically sorting tasks
335 352
336The tasks described in the previous paragraph (multi-threading) are 353The tasks described in the previous paragraph (multi-threading) are
@@ -344,7 +361,7 @@ fact that sequences ending in U, R or F moves have more continuations
344than those ending in D, L or B moves - as we don't allow, for example, 361than those ending in D, L or B moves - as we don't allow, for example,
345both U D and D U, but only the former. 362both U D and D U, but only the former.
346 363
347Preliminary benchmark show a performance improvement of around 40% 364Preliminary benchmarks show a performance improvement of around 40%
348when searching a single solution. When searching for multiple optimal 365when searching a single solution. When searching for multiple optimal
349solutions the effects of this optimization will be less pronounced, and 366solutions the effects of this optimization will be less pronounced, and
350they are obviously inexistent when looking for *all* optimal solutions. 367they are obviously inexistent when looking for *all* optimal solutions.
@@ -435,13 +452,13 @@ efficient one)
435 452
436## Possible future improvements 453## Possible future improvements
437 454
438*This section should be considered more of a draft with personal 455*This section should be considered more of a collection of personal
439notes, unlike the rest of the document.* 456notes rather than a description of the solver.*
440 457
441There are some areas where this implementation of the H48 optimal solver 458There are some areas where this implementation of the H48 optimal solver
442can be improved: 459can be improved:
443 460
444* Interwtining fallback tables to the main table. This is a trick that 461* Intertwining fallback tables to the main table. This is a trick that
445 nxopt uses to reduce the number of cache misses, but we have not 462 nxopt uses to reduce the number of cache misses, but we have not
446 implemented in H48 yet. 463 implemented in H48 yet.
447* Faster pruning table generation for **h11** and **h0**. Since these 464* Faster pruning table generation for **h11** and **h0**. Since these
@@ -451,4 +468,4 @@ can be improved:
451 [BPMX](https://webdocs.cs.ualberta.ca/~nathanst/papers/AStar_Inconsistent.pdf) 468 [BPMX](https://webdocs.cs.ualberta.ca/~nathanst/papers/AStar_Inconsistent.pdf)
452 to improve pruning estimation. This optimization sped up 469 to improve pruning estimation. This optimization sped up
453 [vcube](https://github.com/Voltara/vcube/commit/a5b08f51793f81ac34c1d402f2627f6a0495c636). 470 [vcube](https://github.com/Voltara/vcube/commit/a5b08f51793f81ac34c1d402f2627f6a0495c636).
454 by about 5%-10%. Suggested by Arhan Chaudhary pointed out. 471 by about 5%-10%. Suggested by Arhan Chaudhary.

Generated with cgit - Back to sebastiano.tronto.net