cs.AIOct 22, 2026

Solving Flood-It Puzzles: A Comparison of Tailored A* Search with Declarative Solver Approaches

Authors: Philipp von Manteuffel, Benjamin Blankertz

Organizations: Chair for Neurotechnology Technische Universität Berlin

Abstract

We present an optimized approach for finding minimal move sequences to solve Flood-It puzzles using A* search and compare it with approaches using SAT, Integer Programming, and Constraint Programming solvers. The performance of A* search is considerably improved by using an appropriate heuristic and sophisticated equivalences of game states to limit the search space. Each aspect is systematically evaluated, providing insights that generalize to other problems. By comparing the best variant of each approach, the A* search is the fastest in finding a minimal solution in about 75 % of the Flood-It instances tested. This result is in line with our expectation since A* specifically looks for a minimum solution. In contrast, the SAT-based approach is designed to solve the decision problem of whether a solution with a given length exists. An iterative search is required to determine a minimum solution length using a SAT-based approach. However, with increasing complexity, quantified by the minimum solution length, the SAT-based approach outperforms A*. We also compared the different approaches to the decision problem, where A* again performed best for the largest number of puzzles. Here, again, SAT supersedes A* for higher complexities, albeit with a lower crossing point.

Figures & tables

Appendix figures & tables11 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Oct 21, 2026

An Exact 93-Move Solution to a Nonlocal Crystal-Exchange Puzzle

We determine the minimum number of directional commands needed to solve alevel of Order of the Sinking Star, modeled as a crystal-exchangepuzzle on an 11*11 board. A command swapsthe player with the nearest crystal in the selected row or column, regardlessof distance; only an empty ray permits an ordinary unit walk. Two gates admitthe player to the exit exactly while all sixteen crystals occupy their targetcells. We give an explicit 93-command solution and exclude every shortersolution by an exact, cost-bounded breadth-first search. The search representsa position by its seventeen occupied cells and one active cell. Its admissibleheuristic partitions command costs between a compressed core abstraction andresidual motion, strengthened by a necessary activation detour and a cornervisit condition. The completed computation retained 605,349,215 occupied setsand 1,863,925,136 states. We prove the reductions and pruning conditions,describe the exact storage scheme, and provide source code, execution logs,and a reproduction driver. The result is a computer-assisted proof for thespecified instance, with an explicit implementation trust boundary.
Sep 20, 2026

Expansion Counts under Standard A* Tie-Breaking Strategies on the Final Plateau

In the A* search algorithm, the tie-breaking strategies for nodes with the same ff-value determines which states A* expands on the final ff-layer. For nine standard tie-breaking strategies, we show that under a consistent heuristic, every pair has positive-cost instances favoring each strategy over the other by an arbitrarily large additive expansion gap. A parameterized unit-cost grid example also gives unbounded expansion-count ratios between low-hh with FIFO and LIFO. In unit-cost search with h>0h > 0 at non-goals, exact heuristic values near the goal lead to complementary extremal results: low-hh minimizes the number of remaining expansions from a common configuration within the perfect region, while high-hh maximizes the total number of expansions when every final-plateau state with h=1h=1 is a goal predecessor. Finally, with the evaluation function fα=g+αhf_α = g + αh, when h>0h>0 at non-goals, every heuristic weight 0≤α<10 \leq α<1 eliminates tie-breaking sensitivity, and all tie-breaking strategies expand the same set of states.
Sep 6, 2026

Probabilistic Focal Search: Accelerating Bounded-Suboptimal Search via Lower-Bound Advancement

Bounded-suboptimal search seeks a solution within a factor ww of optimal while reducing search effort. Focal Search (FS) uses heuristic guidance within FOCAL, the frontier nodes eligible under the threshold wfmin⁡w f_{\min}, but its deterministic policy may leave fmin⁡f_{\min} unchanged for many expansions. We introduce Probabilistic Focal Search (PFS), which follows the FS guided choice with probability pp and expands a minimum-ff OPEN node with probability 1−p1-p. The latter branch encourages the lower bound to advance, enlarging FOCAL and admitting nodes that may lead to feasible solutions. By balancing guidance and lower-bound advancement, this mechanism can reduce time to a bounded solution when progress is limited by delayed FOCAL admission. As a secondary transfer experiment, we apply the same scheduler to Dynamic Potential Search, yielding Probabilistic Dynamic Potential Search (PDPS). We benchmark PFS against FS on N-Puzzle, Pancake Sorting, and the Traveling Salesperson Problem (TSP), and evaluate its anytime extension on the Generalized Covering TSP (GCTSP), using multiple ww and pp values. Across these benchmarks, the largest gains occur when long fmin⁡f_{\min} plateaus delay useful FOCAL admissions; in such settings, the probabilistic factor may reduce node expansions by about 90% or more (e.g., on N-Puzzle and TSP). For the anytime algorithm family, Anytime Probabilistic Focal Search (APFS) outperforms all tested algorithms in evaluating anytime methods on GCTSP. We also observe that the benefit is smaller when the deterministic search already advances efficiently (e.g., Pancake Sorting), indicating that the probabilistic factor is most useful when FOCAL admission is a search bottleneck. The PDPS transfer shows that the mechanism also transfers to potential guidance, although its common-success effects remain domain- and bound-dependent.