Nonogram Solver



Puzzle-file format

This is the puzzle-file format recognized by the solvers on this site. Its features are:

  • Only two ‘colours’ are supported, ‘dot’ and ‘solid’.

  • Only rectangular grids are supported.

  • Various meta data (like titles, artists, etc) can be expressed.

Syntax

The file should be plain text containing a sequence of lines.

Immediately following a rows line, there should be h rules. The line height h or rows h (The latter is not counted as a rows line.) must have preceded it.

Immediately following a columns line, there should be w rules. The line width w or columns w (The latter is not counted as a columns line.) must have preceded it.

No rule may contain more than r ints, if preceded by maxrule r.

maxrule must appear no more than once. width and height must appear exactly once.

Lines beginning with unrecognised words are taken as properties.

line:

maxrule int
{ width | columns } int
{ height | rows } int
rows
columns
rule
property string

rule:

int[, rule]

int:

a non-negative integer

Semantics

width w means the puzzle is w characters wide.

height h means the puzzle is h characters high.

rules following rows define the rules for each row, starting at the top and moving down.

rules following columns define the rules for each column, starting on the left and moving right.

Note that rows or columns containing no solids in the puzzle have the rule ‘0’ — blank lines are ignored.

maxrule is obsolete and unnecessary.

Arbitrary properties can be specified, e.g.

title

the title

by

the artist/‌author

copyright

a copyright notice

catalogue

the position in a collection

HTML character references or entities, e.g. é for é, should be used for non-US-ASCII characters.

The string may be quoted. The quotes do not form part of the string itself.

Examples

A puzzle such as:

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

…should produce a file like:

width 4
height 5

rows
4
1,1
1,1
1,2
3

columns
5
1,1
1,2
4

Make sure you get the numbers in the right order. The row data for this image should start like this:

rows
25
1,1
1,3,1
1,6,1
1,8,1

1,9,1
1,3,6,1
1,3,4,1
...

Its column data should start like this:

columns
35
1,2,1
1,1,1,1
1,2,1,1
1,4,1

1,2,1
...

Row lines should be listed from top to bottom; column lines from left to right.

Column numbers should be listed from top to bottom; row numbers from left to right.

I'm now looking into an XML format.



Updated: 2008-Jan-30 19:37 GMT

Navibar info

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