Ideas about generating Killer Sudoku puzzles

For fans of Killer Sudoku, Samurai Sudoku and other variants

Ideas about generating Killer Sudoku puzzles

Postby surendra.jain » Fri Jul 20, 2018 10:55 am

Can somebody give me ideas about generating Killer Sudoku puzzles.
I already have code to generate sudoku puzzles.
surendra.jain
 
Posts: 27
Joined: 15 August 2015
Location: India

Re: Ideas about generating Killer Sudoku puzzles

Postby creint » Fri Jul 20, 2018 5:42 pm

The following steps i probably would do for my tool.

-Generate filled sudoku grid
-Apply logic for killers
-Empty cells by logic or bruteforce

This would result in a killer sudoku, however that will not guarantee that every killer logic will be used.
To rate you generated killer sudoku you need a solver or logic generator.

You still need:
-Generate killer groups
-Extra killer logic that validates your sudoku is still solvable.
creint
 
Posts: 44
Joined: 20 January 2018

Re: Ideas about generating Killer Sudoku puzzles

Postby surendra.jain » Sat Jul 21, 2018 10:26 am

I have written a killer sudoku solver by brute forced. But it takes a long time for killer puzzles with bigger cages (e.g. 8 and 9). Is there a fast killer puzzle solver available (using brute force or DFS). please let me know.

I am also writing a code to solve killer sudoku puzzles by logic.
surendra.jain
 
Posts: 27
Joined: 15 August 2015
Location: India

Re: Ideas about generating Killer Sudoku puzzles

Postby creint » Sat Jul 21, 2018 1:46 pm

There are some i have seen could do it:

-ChewDoku
-Color Sudoku
-skjgeek (never tested)

When validating that the killer sudoku has a single solution you only need to check if filled killers are valid.
I dont know what you mean with "long time", solving a normal sudoku with bruteforce is less that 1 sec. Those extra check should not be that hard.

My solver can solve some killers sudoku but has no bruteforce yet.
creint
 
Posts: 44
Joined: 20 January 2018

Re: Ideas about generating Killer Sudoku puzzles

Postby surendra.jain » Mon Jul 23, 2018 9:55 am

I could not get ChewDoku and Color Sudoku. Are they for laptops. Also, do they have source code also. skjgeek is my website :) ..
By long time I mean, if you have a 3 cell sum clue as 6. then the number of permutations can be ([1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]) .. so for a large cage like 8 and 9 cells long the number of permutations is 8! and 9! ,which takes a long time. For sudoku we do not consider each permutations of sum. The brute force sudoku solver of mine also takes less than a sec to solve. Currently, I am writing a killer logic solver software which will be undoubtedly faster than brute force killer solver.
The same thing with kakuro solver. My kakuro logic solver is faster than kakuro brute force solver (as kakuro also contains sums that take long time for brute force solver)
surendra.jain
 
Posts: 27
Joined: 15 August 2015
Location: India

Re: Ideas about generating Killer Sudoku puzzles

Postby creint » Mon Jul 23, 2018 1:58 pm

Color Sudoku
Site: http://petr.lastovicka.sweb.cz/games.html
Prog: http://petr.lastovicka.sweb.cz/sudoku.zip / sourceforge.net/projects/colorsudoku/files/sudoku.zip/download
Code: https://sourceforge.net/p/colorsudoku/code/

Chewdoku
Site: http://twasack.tripod.com (down)
Prog: https://www.file-upload.com/h29z3y7i6ee9
Code: not available.

Most of the killers are just another layer on a normal sudoku.
So after you added the killer layer. You start emptying cells.
Bruteforce is the same with as with normal sudoku.
But after you completely filled a killer group, you check if that group is correctly filled (earlier checks before complete are better but that is a bit harder).
You never need to do any permutations.
creint
 
Posts: 44
Joined: 20 January 2018


Return to Sudoku variants