Learning variable ordering heuristics for solving constraint satisfaction problems

Backtracking search algorithms are often used to solve the Constraint Satisfaction Problem (CSP), which is widely applied in various domains such as automated planning and scheduling. The efficiency of backtracking search depends greatly on the variable ordering heuristics. Currently, the most commo...

Full description

Saved in:
Bibliographic Details
Main Authors: Song, Wen, Cao, Zhiguang, Zhang, Jie, Xu, Chi, Lim, Andrew
Other Authors: School of Computer Science and Engineering
Format: Article
Language:English
Published: 2022
Subjects:
Online Access:https://hdl.handle.net/10356/162726
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Nanyang Technological University
Language: English
id sg-ntu-dr.10356-162726
record_format dspace
spelling sg-ntu-dr.10356-1627262022-11-07T06:39:58Z Learning variable ordering heuristics for solving constraint satisfaction problems Song, Wen Cao, Zhiguang Zhang, Jie Xu, Chi Lim, Andrew School of Computer Science and Engineering Engineering::Computer science and engineering Constraint Satisfaction Problem Variable Ordering Backtracking search algorithms are often used to solve the Constraint Satisfaction Problem (CSP), which is widely applied in various domains such as automated planning and scheduling. The efficiency of backtracking search depends greatly on the variable ordering heuristics. Currently, the most commonly used heuristics are hand-crafted based on expert knowledge. In this paper, we propose a deep reinforcement learning based approach to automatically discover new variable ordering heuristics that are better adapted for a given class of CSP instances, without the need of relying on hand-crafted features and heuristics. We show that directly optimizing the search tree size is not convenient for learning, and propose to optimize the expected cost of reaching a leaf node in the search tree. To capture the complex relations among the variables and constraints, we design a representation scheme based on Graph Neural Network that can process CSP instances with different sizes and constraint arities. Experimental results on random CSP instances show that on small and medium sized instances, the learned policies outperform classical hand-crafted heuristics with smaller search tree (up to 10.36% reduction). Moreover, without further training, our policies directly generalize to instances of larger sizes and much harder to solve than those in training, with even larger reduction in the search tree size (up to 18.74%). Agency for Science, Technology and Research (A*STAR) This study is supported under the RIE2020 Industry Alignment Fund–Industry Collaboration Projects (IAF-ICP) Funding Initiative, as well as cash and in-kind contribution from Singapore Telecommunications Limited (Singtel), through Singtel Cognitive and Artificial Intelligence Lab for Enterprises (SCALE@NTU). This study is also supported by the National Natural Science Foundation of China under Grant 62102228 and 61803104, and in part by Shandong Provincial Natural Science Foundation under Grant ZR2021QF063, and in part by the A*STAR Cyber-Physical Production System (CPPS) – Towards Contextual and Intelligent Response Research Program, under the RIE2020 IAF-PP Grant A19C1a0018. 2022-11-07T06:39:58Z 2022-11-07T06:39:58Z 2022 Journal Article Song, W., Cao, Z., Zhang, J., Xu, C. & Lim, A. (2022). Learning variable ordering heuristics for solving constraint satisfaction problems. Engineering Applications of Artificial Intelligence, 109, 104603-. https://dx.doi.org/10.1016/j.engappai.2021.104603 0952-1976 https://hdl.handle.net/10356/162726 10.1016/j.engappai.2021.104603 2-s2.0-85121424180 109 104603 en A19C1a0018 Engineering Applications of Artificial Intelligence © 2021 Elsevier Ltd. All rights reserved.
institution Nanyang Technological University
building NTU Library
continent Asia
country Singapore
Singapore
content_provider NTU Library
collection DR-NTU
language English
topic Engineering::Computer science and engineering
Constraint Satisfaction Problem
Variable Ordering
spellingShingle Engineering::Computer science and engineering
Constraint Satisfaction Problem
Variable Ordering
Song, Wen
Cao, Zhiguang
Zhang, Jie
Xu, Chi
Lim, Andrew
Learning variable ordering heuristics for solving constraint satisfaction problems
description Backtracking search algorithms are often used to solve the Constraint Satisfaction Problem (CSP), which is widely applied in various domains such as automated planning and scheduling. The efficiency of backtracking search depends greatly on the variable ordering heuristics. Currently, the most commonly used heuristics are hand-crafted based on expert knowledge. In this paper, we propose a deep reinforcement learning based approach to automatically discover new variable ordering heuristics that are better adapted for a given class of CSP instances, without the need of relying on hand-crafted features and heuristics. We show that directly optimizing the search tree size is not convenient for learning, and propose to optimize the expected cost of reaching a leaf node in the search tree. To capture the complex relations among the variables and constraints, we design a representation scheme based on Graph Neural Network that can process CSP instances with different sizes and constraint arities. Experimental results on random CSP instances show that on small and medium sized instances, the learned policies outperform classical hand-crafted heuristics with smaller search tree (up to 10.36% reduction). Moreover, without further training, our policies directly generalize to instances of larger sizes and much harder to solve than those in training, with even larger reduction in the search tree size (up to 18.74%).
author2 School of Computer Science and Engineering
author_facet School of Computer Science and Engineering
Song, Wen
Cao, Zhiguang
Zhang, Jie
Xu, Chi
Lim, Andrew
format Article
author Song, Wen
Cao, Zhiguang
Zhang, Jie
Xu, Chi
Lim, Andrew
author_sort Song, Wen
title Learning variable ordering heuristics for solving constraint satisfaction problems
title_short Learning variable ordering heuristics for solving constraint satisfaction problems
title_full Learning variable ordering heuristics for solving constraint satisfaction problems
title_fullStr Learning variable ordering heuristics for solving constraint satisfaction problems
title_full_unstemmed Learning variable ordering heuristics for solving constraint satisfaction problems
title_sort learning variable ordering heuristics for solving constraint satisfaction problems
publishDate 2022
url https://hdl.handle.net/10356/162726
_version_ 1749179197974118400