SudokuExplainer running on HoDoKu engine

Programs which generate, solve, and analyze Sudoku puzzles

SudokuExplainer running on HoDoKu engine

Postby 1to9only » Fri Sep 18, 2020 9:03 am

For fans of SE and HoDoKu!

I've come across this interesting project: https://sourceforge.net/projects/sudoku-explainer/

This is yet another Sudoku Explainer [clone] (for the GUI bits) with a HoDoKu engine under the bonnet - hobiwan's 'HoDoKu - v2.3.0 beta (Build 126)' as a HoDoKu.jar is included.

If you download the file: DiufSudoku_V6_30.089.2020-09-12.7z and unpack - this appears to be a snapshot of the developer's DiufSudoku folder. The default mode for dist\DiufSudoku.jar is to run in command line mode for solving puzzles (similar to serate) - there is copious output!

To bring up the GUI, switch to the 'dist' folder and run this:
Code: Select all
java.exe -cp DiufSudoku.jar diuf.sudoku.gui.SudokuExplainer DiufSudoku.log

The GUI will be familiar, but some menu options are different.

The project summary (from sourceforge):
Code: Select all
Sudoku Explainer
Sudoku Explainer Java (Swing) GUI explains how to solve Sudokus
Brought to you by: wookie2u2

Keith Corlett's Sudoku Explainer is a Java (Swing) GUI based on DIUF Sudoku Explainer by Nicolas Juillerat (substantially rewritten) with hinters from HoDoKu by Bernhard Hobiger.

SE explains the simplest possible solution to a Sudoku puzzle. SE is damn fast (-SPEED top1465.d5.mt in about 1 minute). SE can solve any Sudoku puzzle.

SE generates basic (human solvable) Sudoku puzzles, but takes kenages to generate difficult Sudokus. It cannot (except by pure happenstance) generate really difficult puzzles (left to the boffins) but it can solve ANY Sudoku puzzle.

WARNING: My coding ethos puts speed of execution before maintainability, so several pieces of code implement the same pattern, which makes it a pain in the arse to maintain, because any lessons learned must be applied in multiple classes.

SE still has a few bugs, and probably many more that I remain unaware of. Like all open-source software, it's a work in progress. This code is free, without any warranty.

Features:
Solves ANY Sudoku puzzle
Fast
Basic Generator
Unmaintainable code
1to9only
 
Posts: 4070
Joined: 04 April 2018

Re: SudokuExplainer running on HoDoKu engine

Postby 1to9only » Mon Oct 26, 2020 3:50 pm

There was a new release about a month ago: DiufSudoku_V6_30.090.2020-09-24.7z.
When trying to compare this with SE, and using the ED=11.9/11.9/11.8 puzzle from champagne's list of hardest sudokus, this DiufSudoku is about twice faster than SE when finding the first solution step.
1to9only
 
Posts: 4070
Joined: 04 April 2018

Re: SudokuExplainer running on HoDoKu engine

Postby 1to9only » Wed Oct 28, 2020 11:06 pm

Here is a list of ratings and solving techniques (extracted from the program source) used, some techniques are not available:
Code: Select all
        // Easy
1.0     Lonely Single
1.1     Naked Single
1.2     Hidden Single

        // Medium
2.1     Point and Claim // Point=2.1, Claim=2.2
2.3     Direct Naked Pair
2.4     Direct Hidden Pair
2.5     Direct Naked Triple
2.6     Direct Hidden Triple

        // Hard
3.0     Naked Pair
3.1     Hidden Pair
3.2     Naked Triple
3.3     Hidden Triple
3.4     Two String Kite
3.5     Swampfish // (aka X-Wing)

        // Fiendish
3.6     XY-Wing
3.7     XYZ-Wing
3.8     W-Wing
3.9     Swordfish
4.0     Skyscraper
4.1     Empty Rectangle
4.2     Jellyfish

        // Nightmare
4.30    Finned Swampfish
4.31    Finned Swordfish
4.32    Finned Jellyfish
4.40    Coloring
4.50    Sashimi Swampfish
4.51    Sashimi Swordfish
4.52    Sashimi Jellyfish
4.60    ALS-XZ
4.61    ALS-Wing
4.62    ALS-Chain
4.70    Franken Swampfish
4.71    Franken Swordfish
4.72    Franken Jellyfish
4.80    Mutant Swampfish
4.81    Mutant Swordfish
4.82    Mutant Jellyfish
4.83    Franken Squirmbag
4.93    Mutant Squirmbag
5.0     Naked Quad
5.1     Hidden Quad
5.2     Naked Pent
5.3     Hidden Pent
5.4     Unique Rectangle
5.80    Kraken Swampfish
5.81    Kraken Swordfish
5.82    Kraken Jellyfish
5.83    Kraken Squirmbag

        // Diabolical
6.0     Bi-Uni Grave // Type 1=6.0, 2=6.1, 3={2=6.2, 3=6.3, 4=6.4}, 4=6.0
6.1     Aligned Pair
6.2     Aligned Triple
6.3     Aligned Quad
6.4     Aligned Pent
6.5     Aligned Hex
6.6     Aligned Sept
6.7     Aligned Oct
6.8     Aligned Nona
6.9     Aligned Dec
6.95    Hdk Chains
7.0     Unary Chain
7.5     Nishio Chain
8.0     Multiple Chain
8.5     Dynamic Chain

        // IDKFA
9.0     Dynamic Plus
9.5     Nested Unary
10.0    Nested Multiple
10.5    Nested Dynamic
11.0    Nested Plus

Here is a table showing how the sudokus rated by the program compares with SudokuExplainer and SukakuExplainer:
Code: Select all
Sudokus from Patterns Game 0395:                                                  SE 1.2.1.3     SE 1.17.11     SE + Hodoku
                                                                                             not displayed, if same as SE 1.2.1.3

12...3..45....2.13...67..8...2....3...5...8..76....5......196...894.....31....... ED=1.2/1.2/1.2
12...3..43....5.67...89..2...6....5...1...2..98....6......527...159.....79....... ED=1.5/1.5/1.5                ED=1.3/1.1/1.1
12...3..45....6.73...89..2...2....1...7...4..41....6......683...869.....24....... ED=1.7/1.5/1.5                ED=1.3/1.1/1.1
12...3..45....6.31...71..8...9....1...2...6..76....9......458...359.....97....... ED=2.0/2.0/2.0                ED=1.3/1.1/1.1
98...7..36....1.89...89..6...1....9...4...6..83....2......165...257.....41....... ED=2.3/1.2/1.2                ED=1.3/1.1/1.1
12...3..43....1.56...74..2...5....7...8...4..71....6......942...913.....86....... ED=2.3/2.3/2.3                ED=1.3/1.1/1.1
12...3..45....4.31...61..2...7....1...8...9..69....7......452...357.....86....... ED=2.5/2.5/2.5                ED=2.6/2.6/2.6
12...3..45....4.61...71..2...8....1...3...9..79....8......452...658.....37....... ED=2.6/2.6/2.6                ED=2.1/2.1/2.1
12...3..45....2.61...71..2...8....1...9...6..76....8......459...356.....97....... ED=2.8/2.6/2.6                ED=2.4/2.1/2.1
71...6..26....1.94...23..6...8....5...5...6..17....2......934...978.....84....... ED=2.8/2.8/2.8                ED=2.3/2.2/2.2
12...3..45....6.37...85..1...9....4...2...3..78....9......481...316.....87....... ED=3.0/3.0/3.0
12...3..45....1.63...57..2...2....1...8...9..79....2......354...651.....43....... ED=3.2/3.0/3.0                ED=3.5/3.0/3.0
12...3..45....2.36...47..2...5....8...8...2..61....3......249...619.....95....... ED=3.4/3.4/3.4                ED=3.1/3.1/3.1
31...4..52....6.47...59..3...1....6...8...4..72....8......653...732.....64....... ED=3.6/3.6/3.6                ED=3.2/3.2/3.2
12...3..45....1.36...74..8...9....5...2...8..81....9......374...719.....63....... ED=3.8/3.6/2.6                ED=4.1/3.2/2.1
12...3..43....1.56...47..1...3....8...2...1..45....9......976...891.....63....... ED=4.0/4.0/4.0                ED=3.3/3.3/3.3
12...3..45....4.62...72..3...5....4...8...9..46....8......976...912.....85....... ED=4.2/4.2/3.4                ED=3.6/3.6/3.1
12...3..45....1.32...26..1...7....2...3...1..85....9......867...859.....74....... ED=4.4/4.0/2.8                ED=3.7/3.3/2.2
12...3..43....2.56...47..2...1....6...8...5..59....8......364...738.....91....... ED=4.4/4.4/2.6                ED=3.7/3.7/2.1
12...3..44....5.63...74..1...8....9...2...4..94....8......571...319.....56....... ED=4.4/4.4/3.6                ED=3.7/3.7/3.2
12...3..44....5.36...74..2...8....1...2...9..75....2......975...745.....53....... ED=4.5/4.5/3.4 ED=4.5/4.0/3.4 ED=5.4/3.4/3.1
12...3..44....1.56...74..3...2....8...8...9..71....5......976...941.....37....... ED=4.6/4.6/3.4 ED=4.5/4.0/3.4 ED=5.4/3.4/3.1
12...3..44....5.67...84..3...9....4...1...9..85....6......683...825.....71....... ED=4.7/4.7/3.4                ED=5.6/5.6/3.1
12...3..44....1.35...64..7...8....5...1...9..69....7......675...649.....31....... ED=4.8/2.3/2.3 ED=4.3/2.3/2.3 ED=5.7/1.1/1.1
12...3..45....2.36...74..2...5....1...8...5..39....8......974...465.....91....... ED=4.9/1.2/1.2                ED=6.0/1.2/1.2
12...3..45....4.67...68..5...4....1...2...5..69....3......457...792.....43....... ED=5.0/1.2/1.2 ED=4.7/1.2/1.2 ED=6.1/1.1/1.1
12...3..43....2.56...74..2...8....3...9...2..71....9......946...518.....97....... ED=5.0/5.0/2.6                ED=5.0/5.0/2.1
12...3..44....5.31...41..6...2....5...7...3..64....8......289...981.....76....... ED=5.1/1.2/1.2 ED=4.0/1.2/1.2 ED=3.4/1.2/1.2
12...3..44....2.31...41..5...6....1...2...6..71....8......795...946.....37....... ED=5.2/1.5/1.5                ED=3.8/1.3/1.3
12...3..45....1.62...24..1...7....2...8...7..35....1......968...954.....86....... ED=5.4/2.6/2.6                ED=5.1/2.1/2.1
12...3..44....5.36...74..1...3....5...2...6..65....3......718...619.....29....... ED=5.6/4.6/3.4                ED=5.6/5.6/3.1
12...3..45....4.62...72..8...1....5...3...4..45....9......896...752.....91....... ED=5.7/4.4/2.6 ED=5.5/4.4/2.6 ED=5.4/3.7/2.1
12...3..45....6.23...72..1...4....7...5...6..68....4......798...915.....35....... ED=5.7/5.0/2.6 ED=5.0/5.0/2.6 ED=5.0/5.0/2.1
12...3..45....1.36...57..2...8....7...6...2..41....3......359...451.....79....... ED=5.8/4.5/2.6 ED=5.5/4.5/2.6 ED=5.4/5.4/2.1
12...3..43....5.67...48..2...3....8...1...6..65....9......594...176.....43....... ED=5.9/3.4/2.6 ED=5.6/3.4/2.6 ED=4.6/3.1/2.1
12...3..45....6.32...27..1...8....2...3...5..74....1......986...694.....87....... ED=6.0/2.8/2.6 ED=5.5/2.8/2.6 ED=4.6/2.2/2.1
12...3..43....1.56...27..1...6....7...5...8..81....9......194...973.....45....... ED=6.1/1.2/1.2 ED=5.7/1.2/1.2 ED=4.6/1.1/1.1
12...3..45....2.67...85..1...9....2...2...4..73....9......781...416.....97....... ED=6.2/6.2/6.2 ED=5.6/5.6/5.6 ED=3.8/3.8/3.8
83...4..92....5.74...92..3...3....5...6...7..78....6......491...748.....51....... ED=6.5/2.0/2.0 ED=4.5/2.0/2.0 ED=5.4/1.1/1.1
12...3..44....5.63...74..8...1....3...9...6..35....9......678...849.....51....... ED=6.5/4.4/2.6 ED=4.4/4.4/2.6 ED=3.7/3.7/2.1
12...3..45....1.63...75..2...4....1...2...8..68....2......394...398.....46....... ED=6.6/6.6/6.6 ED=4.2/4.1/4.1 ED=4.3/4.3/3.4
12...3..45....1.67...85..2...9....4...2...9..73....6......784...416.....27....... ED=6.7/6.2/3.4 ED=5.6/5.6/3.4 ED=5.4/3.8/3.1
12...3..45....2.36...54..1...7....8...2...9..95....3......876...813.....79....... ED=6.7/6.7/4.0                ED=4.6/4.6/3.3
12...3..45....4.67...85..2...9....4...2...6..73....9......784...416.....27....... ED=6.8/6.2/3.4 ED=5.6/5.6/3.4 ED=5.5/3.8/3.1
15...6..94....2.35...95..1...7....5...4...1..62....7......692...684.....74....... ED=6.8/6.8/3.4                ED=4.6/4.6/3.1
12...3..45....4.31...61..5...3....2...7...3..84....7......468...857.....79....... ED=6.9/6.9/3.4                ED=4.6/4.6/3.1
12...3..45....1.63...47..5...8....9...3...6..76....4......298...916.....87....... ED=7.0/7.0/7.0 ED=7.0/5.6/5.6 ED=4.6/4.6/4.6
12...3..44....1.56...74..3...8....2...1...5..75....9......596...192.....86....... ED=7.1/7.1/7.1 ED=7.1/7.1/6.4 ED=4.6/4.6/4.6
12...3..45....1.36...45..1...7....6...2...3..89....7......846...381.....96....... ED=7.2/7.2/7.2                ED=4.6/4.6/4.6
12...3..45....6.27...42..5...8....3...3...5..96....8......947...916.....37....... ED=7.3/7.3/7.3                ED=4.6/4.6/4.6
12...3..45....4.67...85..3...1....4...2...3..67....9......986...697.....31....... ED=7.4/7.4/7.2 ED=7.2/7.2/5.5 ED=4.6/4.6/4.6
59...3..68....1.57...85..3...6....1...9...2..24....6......743...125.....47....... ED=7.4/7.4/7.3                ED=4.6/4.6/4.6
12...3..45....2.36...75..2...8....6...1...3..94....8......976...394.....61....... ED=7.5/7.5/7.2                ED=4.6/4.6/4.6
14...8..39....7.82...36..9...8....5...5...2..69....8......153...612.....57....... ED=7.6/7.6/7.2 ED=7.3/6.6/4.3 ED=4.6/4.6/4.1
12...3..45....6.17...81..3...7....2...2...3..65....9......984...654.....24....... ED=7.7/7.7/2.6 ED=4.3/4.3/2.6 ED=4.3/4.3/2.1
32...1..71....7.34...93..1...5....7...6...8..93....5......984...926.....64....... ED=7.7/7.7/3.4 ED=7.1/4.3/3.4 ED=5.4/4.3/3.1
51...2..36....1.45...53..1...7....9...6...1..42....7......893...682.....24....... ED=7.8/7.8/3.4 ED=7.3/7.3/3.4 ED=4.6/4.6/3.1
12...3..43....5.61...17..3...5....7...8...3..67....9......294...425.....86....... ED=7.9/7.9/2.6 ED=7.3/7.1/2.6 ED=4.6/4.6/2.1
12...3..45....4.61...71..5...8....9...2...8..63....5......674...458.....36....... ED=8.0/7.2/2.6 ED=8.0/5.6/2.6 ED=5.5/4.6/2.1
12...3..43....5.26...72..3...8....7...5...3..41....5......146...712.....64....... ED=8.1/1.5/1.5                ED=4.6/1.3/1.3
12...3..45....1.36...74..5...2....4...8...3..75....8......746...719.....36....... ED=8.2/8.2/8.2 ED=7.3/5.6/5.6 ED=4.6/4.6/4.6
12...3..45....2.63...78..5...9....1...3...9..81....3......694...421.....98....... ED=8.3/8.3/8.3 ED=8.3/8.3/6.4 ED=5.5/4.6/4.6
12...3..43....5.61...71..3...8....1...2...4..46....8......576...546.....69....... ED=8.4/8.4/8.4                ED=4.6/4.6/4.6
12...3..45....4.67...85..3...9....7...1...4..36....9......687...721.....81....... ED=8.5/8.5/8.5                ED=4.6/4.6/4.6
12...3..45....6.27...25..8...4....6...3...9..97....4......198...617.....49....... ED=8.6/8.6/8.4                ED=4.7/4.6/4.6
12...3..45....4.36...78..2...9....4...5...9..84....3......176...513.....68....... ED=8.7/8.7/8.7 ED=8.4/8.4/6.4 ED=5.4/4.6/4.6
12...3..44....1.56...47..2...2....8...8...4..93....2......576...593.....36....... ED=8.8/8.8/8.8                ED=4.6/4.6/4.6
12...3..45....1.36...78..5...1....2...3...5..86....9......794...892.....41....... ED=8.9/8.9/8.9                ED=5.4/4.6/4.6
12...3..45....1.62...72..8...1....5...9...8..45....9......376...352.....61....... ED=9.0/9.0/8.9                ED=9.4/9.4/9.4
12...3..45....2.31...61..2...7....8...8...2..69....3......564...659.....74....... ED=9.0/9.0/9.0                ED=9.2/9.2/9.2
12...3..45....1.36...74..2...5....7...3...8..41....3......896...625.....95....... ED=9.1/9.1/2.6                ED=9.3/9.3/2.1
71...8..49....7.82...93..1...1....5...8...1..67....8......964...692.....54....... ED=9.1/9.1/8.8                ED=9.4/9.4/4.6
12...3..44....2.53...64..7...8....4...2...3..74....8......165...913.....25....... ED=9.1/9.1/8.9                ED=9.6/9.3/4.6
12...3..45....2.36...74..2...5....7...3...8..41....3......296...618.....95....... ED=9.2/9.2/2.6                ED=9.4/9.4/2.1
36...5..47....1.32...93..5...8....7...6...5..27....8......194...175.....64....... ED=9.2/9.2/8.8                ED=9.4/9.3/4.6
12...3..44....1.53...64..7...8....4...1...3..74....8......265...923.....51....... ED=9.2/9.2/8.9                ED=9.2/9.2/4.6
12...7..37....9.45...32..7...7....8...6...3..49....7......439...328.....64....... ED=9.3/1.2/1.2                ED=9.4/1.2/1.2
12...3..45....1.62...72..5...8....9...1...6..95....8......974...391.....71....... ED=9.3/9.3/8.3                ED=9.5/9.5/8.3
12...3..45....2.63...75..8...1....7...4...3..39....4......896...652.....91....... ED=9.4/9.4/2.6                ED=9.4/9.4/2.1
1to9only
 
Posts: 4070
Joined: 04 April 2018


Return to Software