{"title":"利用数学编程和启发式方法生成数独谜题:谜题构建和游戏开发","authors":"Tugce Ates, Fatih Cavdur","doi":"10.1016/j.eswa.2025.127710","DOIUrl":null,"url":null,"abstract":"<div><div>In this study, first, a new mathematical programming formulation for generating Sudoku puzzles is proposed. It is possible to generate specially-configured puzzle instances using the proposed formulation which is flexible enough to control not only the numbers of the Sudoku matrix entries shown in each column, row and sub-matrix, but also the times each number appears by setting up the corresponding model parameters accordingly. The initially developed non-linear program with a quadratic constraint is reformulated as a linear-integer program by using appropriate variate transformations. The resulting mathematical program is then solved to generate Sudoku puzzles and its computational performance is analyzed through computational experiments. It is noted that the formulation is fast enough to generate Sudoku puzzles in reasonable time periods using a commercial solver on a personal computer. The study then discusses how to ensure the uniqueness of a solution for a puzzle instance generated by a hybrid approach that integrates the mathematical program with a heuristic algorithm. In the final part of the study, the idea of the proposed hybrid approach is extended and a backtracking algorithm-based puzzle generation procedure is designed and implemented by developing a standalone mobile-web game application.</div></div>","PeriodicalId":50461,"journal":{"name":"Expert Systems with Applications","volume":"282 ","pages":"Article 127710"},"PeriodicalIF":7.5000,"publicationDate":"2025-04-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Sudoku puzzle generation using mathematical programming and heuristics: Puzzle construction and game development\",\"authors\":\"Tugce Ates, Fatih Cavdur\",\"doi\":\"10.1016/j.eswa.2025.127710\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>In this study, first, a new mathematical programming formulation for generating Sudoku puzzles is proposed. It is possible to generate specially-configured puzzle instances using the proposed formulation which is flexible enough to control not only the numbers of the Sudoku matrix entries shown in each column, row and sub-matrix, but also the times each number appears by setting up the corresponding model parameters accordingly. The initially developed non-linear program with a quadratic constraint is reformulated as a linear-integer program by using appropriate variate transformations. The resulting mathematical program is then solved to generate Sudoku puzzles and its computational performance is analyzed through computational experiments. It is noted that the formulation is fast enough to generate Sudoku puzzles in reasonable time periods using a commercial solver on a personal computer. The study then discusses how to ensure the uniqueness of a solution for a puzzle instance generated by a hybrid approach that integrates the mathematical program with a heuristic algorithm. In the final part of the study, the idea of the proposed hybrid approach is extended and a backtracking algorithm-based puzzle generation procedure is designed and implemented by developing a standalone mobile-web game application.</div></div>\",\"PeriodicalId\":50461,\"journal\":{\"name\":\"Expert Systems with Applications\",\"volume\":\"282 \",\"pages\":\"Article 127710\"},\"PeriodicalIF\":7.5000,\"publicationDate\":\"2025-04-22\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Expert Systems with Applications\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0957417425013326\",\"RegionNum\":1,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Expert Systems with Applications","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0957417425013326","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
Sudoku puzzle generation using mathematical programming and heuristics: Puzzle construction and game development
In this study, first, a new mathematical programming formulation for generating Sudoku puzzles is proposed. It is possible to generate specially-configured puzzle instances using the proposed formulation which is flexible enough to control not only the numbers of the Sudoku matrix entries shown in each column, row and sub-matrix, but also the times each number appears by setting up the corresponding model parameters accordingly. The initially developed non-linear program with a quadratic constraint is reformulated as a linear-integer program by using appropriate variate transformations. The resulting mathematical program is then solved to generate Sudoku puzzles and its computational performance is analyzed through computational experiments. It is noted that the formulation is fast enough to generate Sudoku puzzles in reasonable time periods using a commercial solver on a personal computer. The study then discusses how to ensure the uniqueness of a solution for a puzzle instance generated by a hybrid approach that integrates the mathematical program with a heuristic algorithm. In the final part of the study, the idea of the proposed hybrid approach is extended and a backtracking algorithm-based puzzle generation procedure is designed and implemented by developing a standalone mobile-web game application.
期刊介绍:
Expert Systems With Applications is an international journal dedicated to the exchange of information on expert and intelligent systems used globally in industry, government, and universities. The journal emphasizes original papers covering the design, development, testing, implementation, and management of these systems, offering practical guidelines. It spans various sectors such as finance, engineering, marketing, law, project management, information management, medicine, and more. The journal also welcomes papers on multi-agent systems, knowledge management, neural networks, knowledge discovery, data mining, and other related areas, excluding applications to military/defense systems.