Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
A tool for getting hints for manually solving sudoku's
Contributed by: Fred Simons
When we solve a sudoku puzzle by hand, we occasionally find ourselves in a situation where we no longer know how to proceed. The purpose of this paclet is then to get hints what can still be done and how that can be seen. In addition, any sudoku can be solved with this paclet. Moreover, it can show which of the built-in logical rules are needed for solving. The paclet can be used for all types of sudoku's: standard, jigsaw, multi, … The only limitation is the group size 9. It also contains functions for generating sudoku's.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["FredSimons/SudokuHints"]
To load the code after installation, evaluate this code:
Needs["FredSimons`SudokuHints`"]
This is a twin sudoku, with the candidates shown in each open cell:
In[1]:= |
Out[1]= |
This sudoku has 34 clues and a unique solution, that requires at least the logical rule HiddenPairs for being solved:
In[2]:= |
Out[2]= |
For solving it step by step and seeing what can be done we use the function SudokuHints:
In[3]:= |
This command opens a popup, showing which logical rules can be applied. The image shows the HiddenSingles:
The function SolveSudoku can be used for finding a solution:
In[4]:= |
Out[4]= |
Entering the groups for a jigsaw sudoku can be done interactively:
Entering the numbers clues be done interactively as well: