From b7bb88cd6eb2a8c8e3f26e276ab849d52168668a Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 19 Dec 2025 15:59:35 +0100 Subject: 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. --- src/solvers/h48/solve.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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]) arg->movemask_normal = arg->movemask_inverse = MM18_ALLMOVES; arg->nodes_visited++; - /* Preliminary probing using last computed bound, if possible */ - n = arg->solution_moves->nmoves + arg->solution_moves->npremoves; target = arg->target_depth - n; + + /* We'll never get a bound higher than base + 3 */ + if (arg->base + 3 <= target) + return false; + + /* Preliminary probing using last computed bound, if possible */ + if ((arg->use_lb_normal && arg->lb_normal > target) || (arg->use_lb_inverse && arg->lb_inverse > target)) return true; -- cgit v1.3