Pub Date : 2024-09-13DOI: 10.1007/s10601-024-09370-x
Joan Espasa, Ian Miguel, Peter Nightingale, András Z. Salamon, Mateu Villaret
We study a planning problem based on Plotting, a tile-matching puzzle video game published by Taito in 1989. The objective of this turn-based game is to remove a target number of coloured blocks from a grid by sequentially shooting blocks into the same grid. Plotting features complex transitions after every shot: various blocks are affected directly, while others can be indirectly affected by gravity. We consider modelling and solving Plotting from two perspectives. The puzzle is naturally cast as an AI Planning problem and we first discuss modelling the problem using the Planning Domain Definition Language (PDDL). We find that a model in which planning actions correspond to player actions is inefficient with a grounding-based state-of-the-art planner. However, with a more fine-grained action model, where each change of a block is a planning action, solving performance is dramatically improved. We also describe two lifted constraint models, able to capture the inherent complexities of Plotting and enabling the application of efficient solving approaches from SAT and CP. Our empirical results with these models demonstrates that they can compete with, and often exceed, the performance of the dedicated planning solvers, suggesting that the richer languages available to constraint modelling can be of benefit when considering planning problems with complex changes of state. CP and SAT solvers solved almost all of the largest and most challenging instances within 1 hour, whereas the best planning approach solved approximately 30%. Finally, the flexibility provided by the constraint models allows us to easily curate interesting levels for human players.
我们研究了一个基于 Plotting 的规划问题,这是一款由 Taito 于 1989 年发行的瓷砖匹配益智视频游戏。这款回合制游戏的目标是通过将方块依次射入同一网格,从网格中移除目标数量的彩色方块。Plotting 的特点是每次射击后都会发生复杂的转换:各种方块会受到直接影响,而其他方块则会受到重力的间接影响。我们从两个角度来考虑绘图的建模和解题。我们首先讨论了使用规划领域定义语言(PDDL)对该问题进行建模。我们发现,在一个规划行动与玩家行动相对应的模型中,使用基于接地的最先进规划器效率很低。然而,如果采用更细粒度的行动模型,即块的每次变化都是一个规划行动,求解性能就会大幅提高。我们还介绍了两种提升约束模型,它们能够捕捉到绘图的内在复杂性,并能应用 SAT 和 CP 的高效求解方法。我们对这些模型的实证结果表明,它们可以与专用规划求解器的性能相媲美,甚至经常超过它们,这表明在考虑具有复杂状态变化的规划问题时,约束建模语言的丰富性可以带来益处。CP 和 SAT 求解器在 1 小时内解决了几乎所有最大、最具挑战性的实例,而最佳规划方法只解决了大约 30%。最后,约束模型所提供的灵活性使我们能够轻松地为人类玩家设计出有趣的关卡。
{"title":"Plotting: a case study in lifted planning with constraints","authors":"Joan Espasa, Ian Miguel, Peter Nightingale, András Z. Salamon, Mateu Villaret","doi":"10.1007/s10601-024-09370-x","DOIUrl":"https://doi.org/10.1007/s10601-024-09370-x","url":null,"abstract":"<p>We study a planning problem based on Plotting, a tile-matching puzzle video game published by Taito in 1989. The objective of this turn-based game is to remove a target number of coloured blocks from a grid by sequentially shooting blocks into the same grid. Plotting features complex transitions after every shot: various blocks are affected directly, while others can be indirectly affected by gravity. We consider modelling and solving Plotting from two perspectives. The puzzle is naturally cast as an AI Planning problem and we first discuss modelling the problem using the Planning Domain Definition Language (PDDL). We find that a model in which planning actions correspond to player actions is inefficient with a grounding-based state-of-the-art planner. However, with a more fine-grained action model, where each change of a block is a planning action, solving performance is dramatically improved. We also describe two lifted constraint models, able to capture the inherent complexities of Plotting and enabling the application of efficient solving approaches from SAT and CP. Our empirical results with these models demonstrates that they can compete with, and often exceed, the performance of the dedicated planning solvers, suggesting that the richer languages available to constraint modelling can be of benefit when considering planning problems with complex changes of state. CP and SAT solvers solved almost all of the largest and most challenging instances within 1 hour, whereas the best planning approach solved approximately 30%. Finally, the flexibility provided by the constraint models allows us to easily curate interesting levels for human players.</p>","PeriodicalId":55211,"journal":{"name":"Constraints","volume":"74 1","pages":""},"PeriodicalIF":1.6,"publicationDate":"2024-09-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142186093","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2024-07-09DOI: 10.1007/s10601-024-09368-5
David Cushing, David I. Stewart
We develop and deploy a set of constraints for the purpose of calculating minimal sizes of lottery designs. Specifically, we find the minimum number of tickets of size six which are needed to match at least two balls on any draw of size six, whenever there are at most 70 balls.
{"title":"Applying constraint programming to minimal lottery designs","authors":"David Cushing, David I. Stewart","doi":"10.1007/s10601-024-09368-5","DOIUrl":"https://doi.org/10.1007/s10601-024-09368-5","url":null,"abstract":"<p>We develop and deploy a set of constraints for the purpose of calculating minimal sizes of lottery designs. Specifically, we find the minimum number of tickets of size six which are needed to match at least two balls on any draw of size six, whenever there are at most 70 balls.</p>","PeriodicalId":55211,"journal":{"name":"Constraints","volume":"15 1","pages":""},"PeriodicalIF":1.6,"publicationDate":"2024-07-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141574656","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2024-01-01Epub Date: 2024-10-05DOI: 10.1007/s10601-024-09372-9
Maxime Mulamba, Jayanta Mandi, Ali İrfan Mahmutoğulları, Tias Guns
We consider the problem of perception-based constraint solving, where part of the problem specification is provided indirectly through an image provided by a user. As a pedagogical example, we use the complete image of a Sudoku grid. While the rules of the puzzle are assumed to be known, the image must be interpreted by a neural network to extract the values in the grid. In this paper, we investigate (1) a hybrid modeling approach combining machine learning and constraint solving for joint inference, knowing that blank cells need to be both predicted as being blank and filled-in to obtain a full solution; (2) the effect of classifier calibration on joint inference; and (3) how to deal with cases where the constraints of the reasoning system are not satisfied. More specifically, in the case of handwritten user errors in the image, a naive approach fails to obtain a feasible solution even if the interpretation is correct. Our framework identifies human mistakes by using a constraint solver and helps the user to correct these mistakes. We evaluate the performance of the proposed techniques on images taken through the Sudoku Assistant Android app, among other datasets. Our experiments show that (1) joint inference can correct classifier mistakes, (2) overall calibration improves the solution quality on all datasets, and (3) estimating and discriminating between user-written and original visual input while reasoning makes for a more robust system, even in the presence of user errors.
{"title":"Perception-based constraint solving for sudoku images.","authors":"Maxime Mulamba, Jayanta Mandi, Ali İrfan Mahmutoğulları, Tias Guns","doi":"10.1007/s10601-024-09372-9","DOIUrl":"10.1007/s10601-024-09372-9","url":null,"abstract":"<p><p>We consider the problem of <i>perception-based constraint solving</i>, where part of the problem specification is provided <i>indirectly</i> through an image provided by a user. As a pedagogical example, we use the complete image of a Sudoku grid. While the rules of the puzzle are assumed to be known, the image must be interpreted by a neural network to extract the values in the grid. In this paper, we investigate (1) <i>a hybrid modeling approach</i> combining machine learning and constraint solving for <i>joint inference</i>, knowing that blank cells need to be both predicted as being blank and filled-in to obtain a full solution; (2) the effect of <i>classifier calibration</i> on joint inference; and (3) how to deal with cases where the constraints of the reasoning system are not satisfied. More specifically, in the case of handwritten <i>user errors</i> in the image, a naive approach fails to obtain a feasible solution even if the interpretation is correct. Our framework <i>identifies</i> human mistakes by using a constraint solver and helps the user to <i>correct</i> these mistakes. We evaluate the performance of the proposed techniques on images taken through the Sudoku Assistant Android app, among other datasets. Our experiments show that (1) joint inference can correct classifier mistakes, (2) overall calibration improves the solution quality on all datasets, and (3) estimating and discriminating between user-written and original visual input while reasoning makes for a more robust system, even in the presence of user errors.</p>","PeriodicalId":55211,"journal":{"name":"Constraints","volume":"29 1-2","pages":"112-151"},"PeriodicalIF":0.5,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11534853/pdf/","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142590693","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-12-27DOI: 10.1007/s10601-023-09367-y
Justin Boutilier, Carla Michini, Zachary Zhou
Recently, mixed-integer programming (MIP) techniques have been applied to learn optimal decision trees. Empirical research has shown that optimal trees typically have better out-of-sample performance than heuristic approaches such as CART. However, the underlying MIP formulations often suffer from weak linear programming (LP) relaxations. Many existing MIP approaches employ big-M constraints to ensure observations are routed throughout the tree in a feasible manner. This paper introduces new MIP formulations for learning optimal decision trees with multivariate branching rules and no assumptions on the feature types. We first propose a strong baseline MIP formulation that still uses big-M constraints, but yields a stronger LP relaxation than its counterparts in the literature. We then introduce a problem-specific class of valid inequalities called shattering inequalities. Each inequality encodes an inclusion-minimal set of points that cannot be shattered by a multivariate split, and in the context of a MIP formulation, the inequalities are sparse, involving at most the number of features plus two variables. We propose a separation procedure that attempts to find a violated inequality given a (possibly fractional) solution to the LP relaxation; in the case where the solution is integer, the separation is exact. Numerical experiments show that our MIP approach outperforms two other MIP formulations in terms of solution time and relative gap, and is able to improve solution time while remaining competitive with regards to out-of-sample accuracy in comparison to a wider range of approaches from the literature.
{"title":"Optimal multivariate decision trees","authors":"Justin Boutilier, Carla Michini, Zachary Zhou","doi":"10.1007/s10601-023-09367-y","DOIUrl":"https://doi.org/10.1007/s10601-023-09367-y","url":null,"abstract":"<p>Recently, mixed-integer programming (MIP) techniques have been applied to learn optimal decision trees. Empirical research has shown that optimal trees typically have better out-of-sample performance than heuristic approaches such as CART. However, the underlying MIP formulations often suffer from weak linear programming (LP) relaxations. Many existing MIP approaches employ big-M constraints to ensure observations are routed throughout the tree in a feasible manner. This paper introduces new MIP formulations for learning optimal decision trees with multivariate branching rules and no assumptions on the feature types. We first propose a strong baseline MIP formulation that still uses big-M constraints, but yields a stronger LP relaxation than its counterparts in the literature. We then introduce a problem-specific class of valid inequalities called shattering inequalities. Each inequality encodes an inclusion-minimal set of points that cannot be shattered by a multivariate split, and in the context of a MIP formulation, the inequalities are sparse, involving at most the number of features plus two variables. We propose a separation procedure that attempts to find a violated inequality given a (possibly fractional) solution to the LP relaxation; in the case where the solution is integer, the separation is exact. Numerical experiments show that our MIP approach outperforms two other MIP formulations in terms of solution time and relative gap, and is able to improve solution time while remaining competitive with regards to out-of-sample accuracy in comparison to a wider range of approaches from the literature.</p>","PeriodicalId":55211,"journal":{"name":"Constraints","volume":"11 1","pages":""},"PeriodicalIF":1.6,"publicationDate":"2023-12-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"139056475","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-11-30DOI: 10.1007/s10601-023-09366-z
Mathieu Vavrille
t-wise coverage is one of the most important techniques used to test configurations of software for finding bugs. It ensures that interactions between features of a Software Product Line (SPL) are tested. The size of SPLs (of thousands of features) makes the problem of finding a good test suite computationally expensive, as the number of t-wise combinations grows exponentially. In this article, we leverage Constraint Programming’s search strategies to generate test suites with a high coverage of configurations. We analyse the behaviour of the default random search strategy, and then we propose an improvement based on the commonalities (frequency) of the features. We experimentally compare to uniform sampling and state of the art sampling approaches. We show that our new search strategy outperforms all the other approaches and has the fastest running time.
{"title":"A feature commonality-based search strategy to find high $$t$$ -wise covering solutions in feature models","authors":"Mathieu Vavrille","doi":"10.1007/s10601-023-09366-z","DOIUrl":"https://doi.org/10.1007/s10601-023-09366-z","url":null,"abstract":"<p><i>t</i>-wise coverage is one of the most important techniques used to test configurations of software for finding bugs. It ensures that interactions between features of a Software Product Line (SPL) are tested. The size of SPLs (of thousands of features) makes the problem of finding a good test suite computationally expensive, as the number of <i>t</i>-wise combinations grows exponentially. In this article, we leverage Constraint Programming’s search strategies to generate test suites with a high coverage of configurations. We analyse the behaviour of the default random search strategy, and then we propose an improvement based on the commonalities (frequency) of the features. We experimentally compare to uniform sampling and state of the art sampling approaches. We show that our new search strategy outperforms all the other approaches and has the fastest running time.</p>","PeriodicalId":55211,"journal":{"name":"Constraints","volume":"14 4","pages":""},"PeriodicalIF":1.6,"publicationDate":"2023-11-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"138503090","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-09-07DOI: 10.1007/s10601-023-09361-4
Mathieu Vavrille, Charlotte Truchet, Charles Prud’homme
{"title":"Correction to: Solution sampling with random table constraints","authors":"Mathieu Vavrille, Charlotte Truchet, Charles Prud’homme","doi":"10.1007/s10601-023-09361-4","DOIUrl":"https://doi.org/10.1007/s10601-023-09361-4","url":null,"abstract":"","PeriodicalId":55211,"journal":{"name":"Constraints","volume":" ","pages":""},"PeriodicalIF":1.6,"publicationDate":"2023-09-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49188760","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-08-12DOI: 10.1007/s10601-023-09359-y
Gustav Björdal
{"title":"From Declarative Models to Local Search","authors":"Gustav Björdal","doi":"10.1007/s10601-023-09359-y","DOIUrl":"https://doi.org/10.1007/s10601-023-09359-y","url":null,"abstract":"","PeriodicalId":55211,"journal":{"name":"Constraints","volume":" ","pages":""},"PeriodicalIF":1.6,"publicationDate":"2023-08-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49001631","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-06-01DOI: 10.1007/s10601-023-09344-5
Ilankaikone Senthooran, Matthias Klapperstück, G. Belov, T. Czauderna, Kevin Leo, M. Wallace, Michael Wybrow, M. Garcia de la Banda
{"title":"Human-centred feasibility restoration in practice","authors":"Ilankaikone Senthooran, Matthias Klapperstück, G. Belov, T. Czauderna, Kevin Leo, M. Wallace, Michael Wybrow, M. Garcia de la Banda","doi":"10.1007/s10601-023-09344-5","DOIUrl":"https://doi.org/10.1007/s10601-023-09344-5","url":null,"abstract":"","PeriodicalId":55211,"journal":{"name":"Constraints","volume":"28 1","pages":"203 - 243"},"PeriodicalIF":1.6,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"43212997","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}