Solving nonograms using Neural Networks
José María Buades Rubio, Antoni Jaume-i-Capó, David López González, Gabriel Moyà Alcover
TL;DR
This work tackles solving nonograms by integrating neural networks with traditional solvers, addressing the gap where networks have not previously been used for nonogram resolution. It introduces multiple NN-assisted solver variants (NeHI, NeHPF, NeHPFI, Ne8 variants) and a GA, all built around a fully connected network that predicts board states from header information, aided by eight symmetry reflections. A large public dataset (NonoDataset) and code are published to enable training and evaluation across 5×5, 10×10, and 15×15 boards; results show that while the NN alone cannot solve all puzzles, it provides valuable starting guidance, and the best performing approach (Ne8HPFI) combines NN predictions with partial/complete erase and intuition to outperform other methods. Genetic algorithms underperform in this setting, highlighting the value of NN-guided heuristics for nonogram solving, and the work offers practical impact by enabling faster, scalable puzzle solving and by providing resources for further research.
Abstract
Nonograms are logic puzzles in which cells in a grid must be colored or left blank according to the numbers that are located in its headers. In this study, we analyze different techniques to solve this type of logical problem using an Heuristic Algorithm, Genetic Algorithm, and Heuristic Algorithm with Neural Network. Furthermore, we generate a public dataset to train the neural networks. We published this dataset and the code of the algorithms. Combination of the heuristic algorithm with a neural network obtained the best results. From state of the art review, no previous works used neural network to solve nonograms, nor combined a network with other algorithms to accelerate the resolution process.
