This folder contains some programs to solve sudoku puzzles.
See also: 
   https://ratrabbit.nl/ratrabbit/software/sudoku/index.html

The program sudoku.f90 solves sudoku's, standard, X and 
windoku (https://www.sudokuwiki.org/windoku.aspx).

Compilation:

   make

This folder contains some examples. 

   Standard: std*.txt
   Windoku:  win*.txt
   X:        xxx*.txt

The expected input format is described in the beginning of fsudoku.f90.

You can run them like:

   ./fsudoku < std4.txt

 or use the script 'doit' which does the compilation for you:

   ./doit  std4.txt

Also in this folder: fsudoku.f
This is almost the same as fsudoku.f90, but written
in Fortran66 style.

Compilation:
  
   make fsudoku66

run:

   ./fsudoku66 < std4.txt

There is a script 'doit66' available, for example:

   ./doit66  xxx3.txt

--------------------------- 
   The programs that use a very simple approach are available as
   fsudoku-simple.f90 and fsudoku66-simple.f.
   To run:

      ./fsudoku-simple < xxx3.txt
      ./fsudoku66-simple < std4.txt
--------------------------- 

Integration in the NRC (https://www/nrc/nl) 
and DeLimburger (https://www.limburger.nl) websites:

This is accomplished by the script wsudoku-solver. This script is
generated from wsudoku-solver.in, fsudoku.f90 and getboard.py as follows:

    make 

The script, along with the .desktop file etc. can be installed with:

    sudo make install

To uninstall:
    
    sudo make uninstall

NOTE: the wsudoku-solver script works better with a dock like 'plank'
   if the program 'setwmc' is also installed, see
   https://ratrabbit.nl/ratrabbit/software/setwmc/index.html

If you want to make adaptions, do not edit wsudoku-solver, but edit:
   - wsudoku-solver.in
   - wsudoku-solver.desktop
   - fsudoku.f90
   - getsudoku.py
 and run
    make wsudoku-solver

The script wsudoku-solver needs 
  - gfortran 
  - xdotool
  - yad
  - scrot
  - tesseract
  - setwmc (optional, see https://ratrabbit.nl/ratrabbit/software/setwmc/index.html)
  - python3 and some modules, see getsudoku.py. pytesseract is included.

  and probably some more. Run the script in a terminal to locate problems.

Usage:

Point your browser on a sudoku puzzle, 
and follow the instructions carefully.

Acknowledgments:

The file digits.traineddata is from 
   https://github.com/Shreeshrii/tessdata_shreetest/blob/master/digits.traineddata
   without this, tesseract often produces mistakes.

pytessearct.py is from 
   https://pypi.org/project/pytesseract/

Willem Vermin, November 2023
