SiSeSuSo = Simple Serial Sudoku Solver

Programs which generate, solve, and analyze Sudoku puzzles

SiSeSuSo = Simple Serial Sudoku Solver

Postby Hajime » Thu Sep 13, 2018 11:12 am

In Excel I made a Solver for multiple overlapping Sudoku's.

Sudoku's may be vanilla/normal, X-Sudoku, Windoku, Asterisk or SudokuP (Disjoint Groups)
Sudoku's within an overlapping arrangement may be of different types.
Also scattered Sudoku's (clueless explosion etc) are possible.
Sudoku's are always 9x9.

The Solver has a limited set of methods to solve puzzles:
    Naked/Hidden Singles,
    Pointing-Pairs and Box-Line reduction,
    Naked Pairs/Triples/Quads and
    X-wing/SwordFish/JellyFish
    and a BruteForce/BackTrack feature.
You can check check-boxes which solving method is included in the solving.

It is probably the slowest solver around, about 10 seconds for a Samurai. A Sumo within a minute.
But you can follow the solving before your eyes. And there is a Logging sheet what cell is solved and why.
The more methods are needed to solve, the more time it takes.

Also a Generator is available, also made in excel. The Generator interacts with the Solver.
So, you can make your own puzzles of overlapping Sudoku's.
The Generator is only able to make puzzles that the Solver can solve, with lots of symmetry possibilities.
A Samurai will take about 2,5 minutes to be generated, a Sumo about 8 minutes.
The Generator needs to start with a fully filled (completed solution) of the puzzle.

All is found on the website https://sites.google.com/site/sisesuso/
With downloads, examples and instructions and Sources in VBA included.

Have Fun, Hajime
User avatar
Hajime
 
Posts: 75
Joined: 20 April 2018
Location: Netherlands

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Hajime » Fri Dec 14, 2018 1:28 pm

Version V5 is released (dec 2018)

Solver:
    Girandola type is now also possible
    A color sheet is added, so user can now choose own colors for cells
    The BruteForce/BackTrack algorithm is made smarter:
    Per Step (round) first the most filled Grid is chosen and then the cell with least amount of candidates will be guessed. A nice consequence is that up-to Shaolin-size arrangements can be generated
Generator:
    Button positions are more logical
    Progress bar / time indicator also shows ETA (Estimated Time of Arrival) when Generate process will be finished

And the website https://sites.google.com/site/sisesuso is updated.
User avatar
Hajime
 
Posts: 75
Joined: 20 April 2018
Location: Netherlands

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Hajime » Fri Feb 08, 2019 12:11 pm

Version 6 is released (jan/feb 2019)

Solver:
    The Non-Consecutive Type is added, where a Sudoku has adjacent cells that are not 1-2,2-3,3-4,4-5,5-6,6-7,7-8,8-9,9-1 and Toroid
    so each cell has always 4 neighbors, horizontally and vertically
    Toroid means that the Sudoku is wrapped around the edges like a donut, so also eg. the top-left cell has 4 neighbors
    The (W)XYZ wings candidate elimination method is added
    A tiny bug in the coloring of cells during BackTrack/BruteForce solved
    On 25-jan-2019 a buggy (only related to NC type) V6 was released. Fixed on 28-jan.
Generator:
    In 6.0 a tiny bug causing a crash during control of enumerating grids in sheet Gen_Params solved
    In 6.1 Added two buttons for convenience:
      Make Params, for creating list of symmetry types in sheet Gen_Params, from row 10 on wards.
        Manual making this is hard work.
      Clear cells in Overlapping Areas
        In a puzzle with overlapping areas/boxes you probably want these cells to be empty in the resulting puzzle.
    In 6.2 the Generator can now connect to Solver if that is already opened.
      If the Solver is not yet opened, the Generator will open it.

And the website https://sites.google.com/site/sisesuso is updated.
User avatar
Hajime
 
Posts: 75
Joined: 20 April 2018
Location: Netherlands

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Mathimagics » Fri Feb 08, 2019 3:18 pm

An ambitious project, congratulations on making it all work!

Sadly, I can't run it, since XL is part of MS Office, which I don't have …
User avatar
Mathimagics
2017 Supporter
 
Posts: 1274
Joined: 27 May 2015
Location: Canberra

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby tarek » Fri Feb 08, 2019 10:01 pm

Great Hajime,

The ability to create personalized overlapping puzzles is definitely the highlight

Well done

tarek
User avatar
tarek
 
Posts: 2976
Joined: 05 January 2006

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Mathimagics » Sat Feb 23, 2019 5:58 am

Well, a copy of XL (2010) has fallen into my lap (don't ask! :? ) …

Having told Win10 that this app was unlikely to be the security nightmare that it thought (it opened the spreadsheet in "protected mode"), I found a little problem with the "buttons" display:
Solver Buttons: Show
Hajime-Solver-Buttons.png
Hajime-Solver-Buttons.png (20.17 KiB) Viewed 322 times


The versions were downloaded from Hajime's website just now, so Solver is v6 (28-jan-2019).

I could try and fix this myself, as Hajime has made the source code available, but I have no idea how to rebuild the XLS file from the VBA code, or even whether this is possible ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1274
Joined: 27 May 2015
Location: Canberra

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Hajime » Sat Feb 23, 2019 2:07 pm

Only modify code in the xls, not import it from a textfile.

To open the developer mode in Excel:

SiSeSuSo VBA source code is made visible as follows:
A. make in the menu "Developer" visible by selecting File/Options and select "Customize Ribbon" and check "Developer"
B. select in menu "Developer" and "View Code"
C. doubleclick on "ButtonForm" in the VBAproject (if not visible: menu View, select Project Explorer), you can change the Buttonform layout
D. doubleclick on that form somewhere for the VBA code

Probably your char-size is different then mine. Could be variations in your screen size etc....
Edit the form "Buttonform", not the VBA source code. Instantly works, no need to rebuild etc
User avatar
Hajime
 
Posts: 75
Joined: 20 April 2018
Location: Netherlands

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Mathimagics » Sat Feb 23, 2019 3:17 pm

Ok, thanks!

Yes, I have poor eyesight so have system fonts enlarged somewhat from the defaults ...

I've never worked on a spreadsheet (did I mention that using any MS Office product is against my religion? I was never the same after my MS Word experience 20 years or so ago) …

So this will be fun (kind of) … 8-)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1274
Joined: 27 May 2015
Location: Canberra

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Mathimagics » Sat Feb 23, 2019 7:59 pm

Ok that was easy! It was indeed the font size ...

Now, harder question - how do I load your puzzle definitions?
For example:
Your JS demo: Show
Code: Select all
#5//B4,JS/N4,JS/H16,X/B28,JS/N28,JS
...46.1...9..37..1........31...9..7.91.6......8.......2...........7......73......
AABBBBBCCDAABBBBCEDAACCCCCEDAFFFCEEEDAAFFFGGEDDDHFFFGEDHHHHHGGEDHIIIIGGEHHIIIIIGG
..1.84...4..35..9.7.........8..9...3.....3.87.......1.........4.....8.........72.
CCBBBBBAAECBBBBAADECCCCCAADEEECFFFADEGGFFFAADEGFFFHDDDEGGHHHHHDEGGIIIIHDGGIIIIIHH
...3.6......4.1................9.................4................1.4......8.9...
.12.........3.....9.........6.......38.7.....8...5..3.........9.5..32..8...94.1..
HHIIIIIGGDHIIIIGGEDHHHHHGGEDDDHFFFGEDAAFFFGGEDAFFFCEEEDAACCCCCEDAABBBBCEAABBBBBCC
......62......2...........4.......3......8.69.6..3...21........5..49..1...8.53...
GGIIIIIHHEGGIIIIHDEGGHHHHHDEGFFFHDDDEGGFFFAADEEECFFFADECCCCCAADECBBBBAADCCBBBBBAA


Maybe there is no Jigsaw support yet in the Solver version that is current, so this example is not valid.

But the question is - does this function (import/export puzzle definitions) exist? If so, how to use it?
User avatar
Mathimagics
2017 Supporter
 
Posts: 1274
Joined: 27 May 2015
Location: Canberra

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Hajime » Sun Feb 24, 2019 8:57 am

Use the FileIn button. Jigsaw is not in V6. Next week V7 is expected. Still busy with the (minimal) coloring...
User avatar
Hajime
 
Posts: 75
Joined: 20 April 2018
Location: Netherlands

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Mathimagics » Sun Feb 24, 2019 10:33 am

Hajime wrote:Use the FileIn button

Oh dear, I hadn't thought of that! :oops:

Perhaps I'll relabel it "THIS ONE, IDIOT!" :lol:

Happy pastelling ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1274
Joined: 27 May 2015
Location: Canberra

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Hajime » Tue Feb 26, 2019 10:50 am

SiSeSuSo Version V7 is available at the website https://sites.google.com/site/sisesuso/
JS and JSB types and enhanced coloring are added in this version V7

The Solver V7 can handle following types
    Normal (Vanilla, 27 constraints in rows,columns and boxes)
    Asterisk (Nice Circle, 1 constraint added)
    Girandola (Fireworks, 1 constraint added)
    SudokuX ( 2 Diagonals, 2 extra constraints)
    SudokuW (Windoku, looks like 4 extra constraints but actually 9)
    SudokuP ( Disjoint Groups, 9 extra constraints)
    NC (Non Consecutive) and NCT (Non Consecutive Toroid and 9-1 also forbidden)
    JS (Jigsaw without Boxes) and JSB (Jigsaw with Boxes)
and all types can be used in one puzzle (arrangement of multiple Sudoku's) and also stacked per Sudoku

The Solver V7 can perform the following methods to solve puzzles:
    Naked/Hidden Singles,
    Pointing-Pairs and Box-Line reduction,
    Naked Pairs/Triples/Quads and
    X-wing/SwordFish/JellyFish
    (W)XYZ Wings
    and a BruteForce/BackTrack feature.

The Generator V7 is the same as V6.2, with the Solver pathname updated to Solver_V7.xls
The Generator starts with a fully solved puzzle and tries to empty cells as much as possible,
while the Solver tries to solve the puzzle each time some cells were emptied.
The Generator has lots of symmetry options but no knowledge about Sudoku-types and methods. That's the Solver's task.
User avatar
Hajime
 
Posts: 75
Joined: 20 April 2018
Location: Netherlands

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Mathimagics » Tue Feb 26, 2019 1:47 pm

Thanks Hajime, I'll check it out! 8-)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1274
Joined: 27 May 2015
Location: Canberra

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Mathimagics » Tue Feb 26, 2019 2:59 pm

Ok, I was able to set your "JSB" example in place via the "FileIn" button, and solve it. Well done!

The "FileIn" button only reads from a text file, perhaps a "Paste" button to read from the clipboard could be added?

I looked at the "Colors" sheet but could not work out how these settings can be changed … how to do that?

Cheers
MM
User avatar
Mathimagics
2017 Supporter
 
Posts: 1274
Joined: 27 May 2015
Location: Canberra

Re: SiSeSuSo = Simple Serial Sudoku Solver

Postby Hajime » Tue Feb 26, 2019 3:35 pm

Mathimagics wrote:I looked at the "Colors" sheet but could not work out how these settings can be changed … how to do that?

Standard Excel functionalty. Select the cell and color it in the top ribbon, tab Home.
Also voor the borders.
User avatar
Hajime
 
Posts: 75
Joined: 20 April 2018
Location: Netherlands

Next

Return to Software