See http://forum.enjoysudoku.com/stormduko-t32977.html on downloading the source and freepascal - and many thanks to StrmCtr for making the source of his solver available here - from now on, I'll assume that you've compiled and successfully run the StormDuko program.
[The process described below was done on a 64-bit Windows system building 32-bit programs. The process is slightly different when building 64-bit programs.]
I've renamed my pascal source file stormduko.pas, and replaced the first line of the program:
Hidden Text: Show
with this:
Hidden Text: Show
And I've replaced the main program procedure, from the '//main body' and 'begin' tags to the last 'end.' in the source with this:
Hidden Text: Show
Compile with this command:
- Code: Select all
ppc386.exe stormduko.pas
A lib file for the dll is required, create the stormduko.def file containing these 3 lines:
Hidden Text: Show
Create the stormduko.lib file with this command:
- Code: Select all
lib.exe /def:stormduko.def /machine:x86 /out:stormduko.lib
This C program (stormsolve.c) shows how to use/call the stormduko.dll to solve a single sudoku:
Hidden Text: Show
Compile with this command:
- Code: Select all
cl.exe stormsolve.c
Run this program, passing it either: 1) a sudoku string (of 81 characters) as argument,
- Code: Select all
stormsolve.exe ..5..2..9.83....7.4.987.1.......5.6...7.8.2...3.4.......8.247.3.7....95.3..7..8..
or 2) a filename containing a sudoku (only the first 81 characters are read),
- Code: Select all
stormsolve.exe test.sud
The program displays the sudoku solution:
- Code: Select all
..5..2..9.83....7.4.987.1.......5.6...7.8.2...3.4.......8.247.3.7....95.3..7..8..
715342689683591472429876135894215367567983241132467598958624713276138954341759826
This python program (stormsolve.py) shows how to use/call the stormduko.dll to solve a single sudoku:
Hidden Text: Show
Python can be downloaded from https://www.python.org/
Run this python program, passing it either: 1) a sudoku string (of 81 characters) as argument,
- Code: Select all
stormsolve.py ..5..2..9.83....7.4.987.1.......5.6...7.8.2...3.4.......8.247.3.7....95.3..7..8..
or 2) a filename containing a sudoku (only the first 81 characters are read),
- Code: Select all
stormsolve.py test.sud
The program displays the sudoku solution:
- Code: Select all
..5..2..9.83....7.4.987.1.......5.6...7.8.2...3.4.......8.247.3.7....95.3..7..8..
715342689683591472429876135894215367567983241132467598958624713276138954341759826
This program has a 100% success rate with solving the last few recent sudokus posted in the Puzzles section:
Historical Daily 22 - SOLVED
- Code: Select all
4.....82...3...1.958....3.4..7.2........76.9..68.....1...7.563.....1.54....3..9.8
479163825623458179581297364397521486145876293268934751914785632832619547756342918
May 25, 2018 - SOLVED
- Code: Select all
2....97......1..6....4....3....7..2...83.65...4..8....9....2....6..5......38....1
215639748834715962679428153391574826728396514546281379987142635162953487453867291
Historical Daily 23 - SOLVED
- Code: Select all
.19.2..83.538.1.29.28..351..6...219...21....5.41.59.62.......3..349.8.56.86.3.9..
419527683753861429628493517365742198972186345841359762297615834134978256586234971
Historical Daily 24 - SOLVED
- Code: Select all
.3.....8...79826..6.......737.2.......1.78..2..86...9.7...9.1...6.1.48......2..36
235761489147982653689345217376219548591478362428653791753896124962134875814527936
Beware! For the extremely difficult puzzle, StormDuko can take several minutes trying all solving techniques before returning with no solution!
This puzzle, which I may have taken from the Patterns Game, ran for 7+ minutes, and no solution was forthcoming!!
- Code: Select all
..1.....2..231..4.56...27...3........2....5....7..1.8...6.5...9.1...4...9.....3.4
Enjoy!
PS. For 64-bit programs (required if you've installed 64-bit python):
- Code: Select all
Compile with: ppcrossx64.exe stormduko.pas
Create the lib file with: lib.exe /def:stormduko.def /machine:x64 /out:stormduko.lib
Compile the C program with: cl.exe stormsolve.c
Edit: