Abstract
Logic puzzles can be seen as structured combinatorial problems that can be solved usingdifferent computational approaches. This thesis investigates the solving and generation
of two grid-based logic puzzles, Binairo and Hitori. Both puzzles can be modeled as con
straint satisfaction problems, but they differ in their rules. Binairo consists of balance,
uniqueness, and local adjacency constraints, while Hitori additionally includes a global
connectivity constraint. This makes the puzzles suitable for comparing backtracking
based solvers, SAT-based solvers, and puzzle-specific backtracking optimizations.
For both puzzle types, backtracking and SAT-based solving approaches are imple
mented and evaluated. The backtracking solvers are extended with optimizations such
as constraint propagation, ordering heuristics, incremental validation, and optimized
rule checks. The SAT-based solvers encode the puzzle rules as Boolean formulas and
use different SAT solver backends. In addition, generators are implemented to create
valid and uniquely solvable benchmark instances.
The evaluation shows that propagation is the most important individual optimiza
tion for both puzzle types. For Binairo, the best practical backtracking configuration
combines propagation with value and cell ordering heuristics, as it reaches almost the
highest solved rate while keeping runtime low. However, the selected SAT-based Binairo
solver performs best overall, solving all evaluated instances with the lowest median run
time. For Hitori, propagation alone is the strongest backtracking configuration and also
solves all evaluated instances.
The comparison with SAT-based solving shows that the better approach depends
on the puzzle type. For Binairo, SAT-based solving is more effective than the optimized
backtracking solver. For Hitori, the propagation-based backtracking solver is more re
liable, while the SAT-based solver is generally slower and solves fewer instances. The
generator evaluation shows that both implemented generators can produce valid and
uniquely solvable benchmark instances. For Binairo, generation success depends strongly
on the targeted fill ratio, while for Hitori the main limitation is the increasing generation
time for larger grids. Overall, the results show that both the solving approach and the
selected optimizations have a strong influence on performance.
| Date of Award | 2026 |
|---|---|
| Original language | English (American) |
| Awarding Institution |
|
| Supervisor | Rainhard Dieter Findling (Supervisor) |
Studyprogram
- Mobile Computing
Cite this
- Standard