An efficient algorithm for solving nonograms
- 640 Downloads
Nonogram is one of logical games popular in Japan and Netherlands. Solving nonogram is a NP-complete problem. There are some related papers proposed. Some use genetic algorithm (GA), but the solution may get stuck in local optima. Some use depth first search (DFS) algorithm, the execution speed is very slow. In this paper, we propose a puzzle solving algorithm to treat these problems. Based on the fact that most of nonograms are compact and contiguous, some logical rules are deduced to paint some cells. Then, we use the chronological backtracking algorithm to solve those undetermined cells and logical rules to improve the search efficiently. Experimental results show that our algorithm can solve nonograms successfully, and the processing speed is significantly faster than that of DFS. Moreover, our method can determine that a nonogram has no solution.
Unable to display preview. Download preview PDF.
- 1.Ueda N, Nagao T (1996) NP-completeness results for NONOGRAM via parsimonious reductions. Technical report TR96-0008, Department of Computer Science, Tokyo Institute of Technology, May 1996 Google Scholar
- 2.McPhail BP (2005) Light up is NP-complete. Feb 2005. http://www.reed.edu/~mcphailb/lightup.pdf
- 3.Batenburg KJ (2003) An evolutionary algorithm for discrete tomography. Master thesis in computer science, University of Leiden, The Netherlands Google Scholar
- 4.Batenburg KJ, Kosters WA (2004) A discrete tomography approach to Japanese puzzles. Proceedings of BNAIC, pp 243–250 Google Scholar
- 5.Tsang EPK (1993) Foundations of constraint satisfaction. Academic Press, London Google Scholar
- 6.Wiggers WA (2004) A comparison of a genetic algorithm and a depth first search algorithm applied to Japanese nonograms. Twente student conference on IT, Jun 2004 Google Scholar
- 8.Database of Japanese puzzles. http://hattori.m78.com/puzzle/picture/java/stage_01/index.html and http://www.books.com.tw/exep/prod/booksfile.php?item=0010317755