为提高约束满足问题的求解效率,提出了一种基于动态值启发式的约束满足问题求解算法。该算法在求解过程中吸收了以往启发式算法的优点,充分利用了预处理和弧相容检查阶段的信息。不但加入了变量启发式,而且在实例化变量时,对所有值的优先级进行动态的改变,从而实现了动态值启发式。比较了静态值启发式和动态值启发式的效率,分析了该算法的优缺点。通过随机问题标准库用例测试表明,该算法比经典主流算法具有更好的效率优势。
To improve the efficiency of solving constraint satisfaction problems,an algorithm for constraint satisfaction problems based on dynamic value ordering heuristics named Backtrack Dynamic Value ordering Heuristic algorithm(BT-DVH) was proposed.In the solving process,this algorithm absorbed the advantages of the previous heuristics,and made full use of the information generated in preprocess and arc consistency checking.To achieve dynamic value ordering heuristic,variable ordering heuristic was used,and the priorities of the values were changed dynamically to instantiate the variables.The efficiencies of the static and dynamic value ordering heuristics were compared,the advantages and shortcomings of the BT-DVH were analyzed.Tested by random problems and benchmark,the result showed this algorithm had a higher efficiency than classic mainstream algorithm.