Man page for sudoku(1)

Man page for sudoku(1)


sudoku - creates high-quality sudoku puzzles.


sudoku [options]


sudoku is a program for generating Sudoku puzzles. Puzzles can be generated at random, or numbered puzzles can be generated for later reproducibility. Available output formats are text, large text, and html.


-h, --help
print help message and exit.

-v, --version
print version info and exit.

-l, --license
print license info and exit.

-n n, --number n
generate a numbered Sudoku puzzle. By default, a puzzle is created at random, but if the -n option is given, the random number generator is seeded to the indicated value, to ensure the same puzzle can be re-created later. Note that the -s, -L, -p, and -e options can also influence the puzzle generated, so that results are only reproducible if all of these options are the same.

-f fmt, --format fmt
select the output format. Currently available formats are: text, bigtext, and html.

-a, --answer
if this option is given once, output the answer in addition to the puzzle. If this option is given twice, output only the answer. The default is to output only the puzzle itself. This option may not work properly with non-text output formats.

-s sym, --symmetry sym
select the symmetry type of the generated Sudoku. Available symmetries are: none, vertical, horizontal, diagonal, codiagonal, dc, vh, 180, 90, all, random. Here, vertical, horizontal, diagonal, and codiagonal mean a symmetry with respect to a reflection about the named axis. dc stands for a combined diagonal and codiagonal symmetry, and vh stand for a combined vertical and horizontal symmetry. 180 and 90 are rotational symmetries by 180 and 90 degrees, respectively. none and all means no symmetry and all symmetries, respectively. random selects one of dc, vh, 180, or all at random.

-L [min]-[max], --level [min]-[max]
select the level of difficulty of the Sudoku. 1 is the least difficult, 2 the next most difficult, and so forth. The default is to select a difficulty level at random. As the generation of certain individual difficulty levels can take a very long time, the level must be specified as a range, e.g., "-L 5-" or "-L -3" or "-L 2-3".

-p pattern, --pattern pattern
generate a sudoku with blanks in specific places. Patterns are specified as a single string of "/"-separated lines, for example, 000111000/001101100/.../000000000. Here "0" denotes a blank and "1" a possibly non-blank entry. By default, patterns are not followed exactly, i.e., additional blanks may be generated (and follow the requested symmetry pattern, if one is specified). Use the -e option to match a pattern exactly.

-S board, --solve board
solve the given sudoku. The board is specified as a single string of "/"-separated lines, for example, 000123000/004506700/.../000000000. Here "0" denotes a blank, and "1"-"9" denote pre-filled entries.

-e, --exact
when used with the -p option, this causes the pattern to be followed exactly.


The exit status is 0 on successful completion, or 1 if the command line was invalid.




Peter Selinger


Copyright (C) 2005-2013 Peter Selinger

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. See also