Optimizing Constraint Solving via Dynamic Programming

Optimizing Constraint Solving via Dynamic Programming

Shu Lin, Na Meng, Wenxin Li

Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence
Main track. Pages 1146-1154. https://doi.org/10.24963/ijcai.2019/160

Constraint optimization problems (COP) on finite domains are typically solved via search. Many problems (e.g., 0-1 knapsack) involve redundant search, making a general constraint solver revisit the same subproblems again and again. Existing approaches use caching, symmetry breaking, subproblem dominance, or search with decomposition to prune the search space of constraint problems. In this paper we present a different approach--DPSolver--which uses dynamic programming (DP) to efficiently solve certain types of constraint optimization problems (COPs). Given a COP modeled with MiniZinc, DPSolver first analyzes the model to decide whether the problem is efficiently solvable with DP. If so, DPSolver refactors the constraints and objective functions to model the problem as a DP problem. Finally, DPSolver feeds the refactored model to Gecode--a widely used constraint solver--for the optimal solution. Our evaluation shows that DPSolver significantly improves the performance of constraint solving.
Keywords:
Constraints and SAT: Dynamic Programming
Constraints and SAT: Constraints: Solvers and Tools