aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/solve.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-12-19 15:59:35 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-12-19 15:59:35 +0100
commitb7bb88cd6eb2a8c8e3f26e276ab849d52168668a (patch)
treed2b3ad12116ec10539e702087fce0dc2b9e8f546 /src/solvers/h48/solve.h
parentde04d37e8520079f5bba3b1a87d42313297543db (diff)
downloadnissy-core-b7bb88cd6eb2a8c8e3f26e276ab849d52168668a.tar.gz
nissy-core-b7bb88cd6eb2a8c8e3f26e276ab849d52168668a.zip
Minor improvement
Add a trivial check to H48 solver. The benchmarks show, surprisingly, a more noticeable improvement for larger solvers (h10, h11). I was expecting it to be more noticeable for smaller solvers. It is likely that this change is irrelevant to performance and all changes in the benchmark results are just random chance.
Diffstat (limited to 'src/solvers/h48/solve.h')
-rw-r--r--src/solvers/h48/solve.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h
index 2920fa7..4aa3799 100644
--- a/src/solvers/h48/solve.h
+++ b/src/solvers/h48/solve.h
@@ -115,10 +115,15 @@ solve_h48_stop(dfsarg_solve_h48_t arg[static 1])
115 arg->movemask_normal = arg->movemask_inverse = MM18_ALLMOVES; 115 arg->movemask_normal = arg->movemask_inverse = MM18_ALLMOVES;
116 arg->nodes_visited++; 116 arg->nodes_visited++;
117 117
118 /* Preliminary probing using last computed bound, if possible */
119
120 n = arg->solution_moves->nmoves + arg->solution_moves->npremoves; 118 n = arg->solution_moves->nmoves + arg->solution_moves->npremoves;
121 target = arg->target_depth - n; 119 target = arg->target_depth - n;
120
121 /* We'll never get a bound higher than base + 3 */
122 if (arg->base + 3 <= target)
123 return false;
124
125 /* Preliminary probing using last computed bound, if possible */
126
122 if ((arg->use_lb_normal && arg->lb_normal > target) || 127 if ((arg->use_lb_normal && arg->lb_normal > target) ||
123 (arg->use_lb_inverse && arg->lb_inverse > target)) 128 (arg->use_lb_inverse && arg->lb_inverse > target))
124 return true; 129 return true;

Generated with cgit - Back to sebastiano.tronto.net