You must first start with a grid of cells, each of which may be a dot ( - ) or a solid ( # ) (together, these usually form some meaningful pattern or image). For example:

- - # # - - - - - -
- # - # - - - - - -
# # # # - - - - - -
- - # # - - - - - #
- - # # # - - - - #
- - # # # # # # # #
- - # # # # # # # #
- - # # # # # # # -
- - - # # # # # - -
- - - - # # # - - -

Then, you must convert each line (each row and each column) into a sequence of numbers. To convert a line of dots and solids into numbers, move along the line, noting down the size of each block of contiguous solids. For example, this line:


#
Line: - - - # # # # # - - # # - # # # # - # -
Notes: 5 2 4 1 1

…has the sequence 5,2,4,1,1, which is known as the line's clue or rule. The puzzle is formed by showing an empty grid with each row and column labelled with its clue. Here is a complete grid with clues:

- - # # - - - - - - 2
- # - # - - - - - - 1,1
# # # # - - - - - - 4
- - # # - - - - - # 2,1
- - # # # - - - - # 3,1
- - # # # # # # # # 8
- - # # # # # # # # 8
- - # # # # # # # - 7
- - - # # # # # - - 5
- - - - # # # - - - 3
1 2 1
6
9 6 5 5 4 3 4

Take away the image, and leave the grid, and you have the puzzle. The challenge is to determine the image from the clues alone, using the grid to draw the solution.

_ _ _ _ _ _ _ _ _ _ 2
_ _ _ _ _ _ _ _ _ _ 1,1
_ _ _ _ _ _ _ _ _ _ 4
_ _ _ _ _ _ _ _ _ _ 2,1
_ _ _ _ _ _ _ _ _ _ 3,1
_ _ _ _ _ _ _ _ _ _ 8
_ _ _ _ _ _ _ _ _ _ 8
_ _ _ _ _ _ _ _ _ _ 7
_ _ _ _ _ _ _ _ _ _ 5
_ _ _ _ _ _ _ _ _ _ 3
1 2 1
6
9 6 5 5 4 3 4

Converting from image to puzzle file

If you have a monochrome image that you want to make a puzzle from, you can use the nonogram command in the package nonogram to generate and test the puzzle. For example, on a UNIX system, suppose that your puzzle image is an X bitmap called wibble.xbm. To convert it to the puzzle format used by nonogram, use:

bmtoa wibble.xbm | nonogram -is -o wibble.non -g

The puzzle is placed in the file wibble.non.

For other formats, pipe the image through convert first:

convert wibble.png xbm:- | bmtoa | nonogram -is -o wibble.non -g

Choosing good puzzle images

One can't just use any old pattern to build a Nonogram. Many different images may generate the same puzzle, so the solver has no logical way to tell which is the intended.

Also, some puzzles, though having only one solution, require so much trial-and-error guessing that it becomes awkward to manually keep track of what has been guessed.

To test that the puzzle has only a single solution, use:

nonogram -i wibble.non -s 2 -CO +o

This will count the number of solutions, without displaying them, stopping after the first two. It prints ‘1’, therefore, only if the puzzle has a single solution.

Coloured puzzles

On other sites, and maybe in puzzle books too, you might encounter colour Nonograms. These will usually have one or two extra colours as well as solids and dots (often black and white, respectively).

To make such a puzzle, you must specify each block's colour, if it isn't black, either by writing the block's length in that colour, or by using a code (such as ‘R’ for ‘red’). Remember not to give the lengths of white (dot) ‘blocks’, or you'll give the game away.

Unfortunately, my own site does not support colours (yet).

Further information

Ĉi tiu paĝo disponeblas ĉi-lingve, laŭ la agordo de via krozilo.