• DocumentCode
    85759
  • Title

    An Efficient Approach to Solving Nonograms

  • Author

    I-Chen Wu ; Der-Johng Sun ; Lung-Ping Chen ; Kan-Yueh Chen ; Ching-Hua Kuo ; Hao-Hua Kang ; Hung-Hsuan Lin

  • Author_Institution
    Dept. of Comput. Sci., Nat. Chiao-Tung Univ., Hsinchu, Taiwan
  • Volume
    5
  • Issue
    3
  • fYear
    2013
  • fDate
    Sept. 2013
  • Firstpage
    251
  • Lastpage
    264
  • Abstract
    A nonogram puzzle is played on a rectangular grid of pixels with clues given in the form of row and column constraints. The aim of solving a nonogram puzzle, an NP-complete problem, is to paint all the pixels of the grid in black and white while satisfying these constraints. This paper proposes an efficient approach to solving nonogram puzzles. We propose a fast dynamic programming (DP) method for line solving, whose time complexity in the worst case is O(kl) only, where the grid size is l×l and k is the average number of integers in one constraint, always smaller than l. In contrast, the time complexity for the best line-solving method in the past is O(kl2). We also propose some fully probing (FP) methods to solve more pixels before running backtracking. Our FP methods can solve more pixels than the method proposed by Batenburg and Kosters (before backtracking), while having a time complexity that is smaller than theirs by a factor of O(l). Most importantly, these FP methods provide useful guidance in choosing the next promising pixel to guess during backtracking. The proposed methods are incorporated into a fast nonogram solver, named LalaFrogKK. The program outperformed all the programs collected in webpbn.com, and also won both nonogram tournaments that were held at the 2011 Conference on Technologies and Applications of Artificial Intelligence (TAAI 2011, Taiwan). We expect that the proposed FP methods can also be applied to solving other puzzles efficiently.
  • Keywords
    computational complexity; dynamic programming; game theory; DP method; LalaFrogKK solver; NP-complete problem; dynamic programming method; nonogram puzzle; worst case time complexity; Computer science; Dynamic programming; Educational institutions; Painting; Paints; Pattern matching; Time complexity; Backtracking; NP-completeness; fully probing (FP); nonogram; painted by number; puzzles;
  • fLanguage
    English
  • Journal_Title
    Computational Intelligence and AI in Games, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    1943-068X
  • Type

    jour

  • DOI
    10.1109/TCIAIG.2013.2251884
  • Filename
    6476646