-------------------------------------------------------------------
SUDOKU SENSEI 1.03: a Sudoku Explainer Engine
Copyright (C) 2005  Martin Knoblauch

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., 51 Franklin Street, Fifth Floor, Boston,
MA  02110-1301, USA.

Contact the author: comocomocomo AT users.sourceforge.net
Latest versions: http://sourceforge.net/projects/sudoku-sensei
-------------------------------------------------------------------


1.- DESCRIPTION

This is no Sudoku solver, but "explainer". It can list the logical
steps taken. It can generate new Sudokus and rank their difficulty.
Not only 9x9 grids: MxN, samurai or any layout you can describe!
The core is a C/C++ library. It includes sample programs.


2.- SAMPLE PROGRAMS

The programs demo2-explainer and demo4-creator can solve/generate
lots of different sudoku problems. They should be executed from
the command line: open a console window, browse into the folder
that contains the executable file, and type its name followed by
the desired options.

  Try:

    demo4-creator -h
    demo4-creator
    demo4-creator -diagonals
    demo4-creator -blocksize 2 3
    demo4-creator -samurai
    demo4-creator -samurai -restrictinters 4
    demo4-creator -grids 2 0 0 2 2

    demo2-explainer -h
    demo2-explainer

The program demo4-creator generates some new problems (adding
numbers to empty boards) and stores them in individual files.
The program demo5-inverse-creator does the same job, but
following the inverse procedure: removing numbers from randomly
filled boards. Therefore, it can reuse prerecorded boards
while the option -grids is not used.

The program demo2-explainer reads a problem and solves it step
by step. The problem must be typed/pasted by the user (unless a
file was specified with the option -if). Empty cells must be
indicated with dots. Spaces, carets and other usual formatting
symbols (dashes, bars, asterisks...) will be ignored.
    
    
3.- HOW TO USE THE LIBRARY IN OTHER PROGRAMS

See the source code of the sample programs. The library is written
in C. Inlining can be activated changing some macro definitions
and moving the functions in list.c to list.h. This might produce
faster binaries, but Dev-C++ seems to work wrong with inlining
in C. C++ should be used instead.


4.- WHAT'S NEW...

...IN VERSION 1.02
  * '\0' overflow bug fixed in demo4-creator
  * New sample program: demo5-inverse-creator

...IN VERSION 1.02
  * Some minor bugs fixed in sample programs
  * New "Print" that shows all possible values of every cell
  * demo2-explainer prints clearer messages now
  * Avoid rule 2 with N=1 (rule 1 will be used instead)

...IN VERSION 1.01
  * Some minor bugs fixed in sample programs
  * C++ style comments modified (C style now)
  * All Dev-C++ projects are C projects now
  * New option -restrictinters in demo4-creator
  * Linux version!


5.- COMING NEXT

  * Documentation (web page)
  * demo5-inverse-creator: starting with a full grid might be faster
  * New mode: "tell me _all_ that can be done now, but don't do it"
  * New rule: X-Wings and Sworfish
  * Cubes



Let the source be with you
