How to solve a nonogram
A nonogram, also sold as griddlers, hanjie, paint-by-numbers or Japanese crossword puzzles, is solved one line at a time: each row and column clue lists the runs of filled cells in that line, in order, with at least one empty cell between runs. Every board on this site can be finished that way without guessing. The diagrams below are real lines from our unlimited boards, at the moment each technique applies.
Start with what the empty grid already decides
Before a single cell is filled, some lines already give cells away: a clue that is long for its line settles cells on its own. Scan every row and column for these first. Each one you mark gives the crossing lines a foothold.
- decided by this step
Count the line: when the clue fills it exactly
Add up the runs, plus one empty cell between each pair. If the total equals the length of the line, the runs can sit in only one place, and the whole line is decided, gaps included.
- decided by this step
Overlap: push a run to the left, then to the right
Slide a run as far left as it can go, then as far right. If it is longer than half the space it can move in, the two positions overlap, and the overlapping cells are filled in every solution. For a single run of length k in a line of n cells, exactly 2k − n cells are certain whenever 2k is more than n.
The same works with several runs: pack them all to one side, then to the other, and fill the cells where the same run covers both positions.
- decided by this step
Glue a run to the edge
A filled cell near an edge belongs to the first run on that side if it is closer to the edge than that run is long. The run cannot start beyond the edge, so it must reach from that cell out to its full length.
- decided by this step
Cross out cells no run can reach
Once some cells are fixed, the runs have less room to move. Any cell that no placement of any run can cover is empty: cross it out. Crosses matter as much as filled cells, because they cut the crossing lines into shorter spaces where overlap works again.
- decided by this step
Finish the line: cross out the rest
When a line holds every filled cell its clue asks for, every blank cell left in it is empty. Mark them straight away: those crosses are the facts the crossing lines are waiting for.
- decided by this step
A working order
Work in passes. First, every line the empty grid decides. Then go back and forth between rows and columns, rereading only the lines that gained a cell since you last read them. When nothing moves, look for a filled cell near an edge (glue) and for runs that now have less room (overlap again, with the known cells). On our boards these steps always reach the end: the generator rejects any board that would need a guess or a look-ahead.
Questions
- Is a nonogram the same as Picross or griddlers?
- The rules are the same. Griddlers, hanjie and paint-by-numbers are other names for the puzzle. Picross is the name Nintendo uses for its nonogram games, and Pic-a-Pix the one Conceptis uses; we are not affiliated with either.
- Can a nonogram have more than one solution?
- A grid drawn at random can, and some can only be finished by guessing. Every board here is checked to have exactly one picture, reachable by reading one line at a time.
- How do you start a 10x10 nonogram?
- Look for clues that are long for the line: a total near 10 with its gaps, or a single run of 6 or more. Count and overlap those first, then work the crossing lines.