Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

SudokuHints

Guides

  • Sudoku Hints

Symbols

  • BackTracking
  • CellSize
  • ColoredCells
  • CommonCellColor
  • Disks
  • DoubleCandidates
  • EditSudoku
  • EnterClues
  • EnterSudoku
  • ExportSudoku
  • ExtraBlockCellColor
  • ExtraBlocks
  • HiddenPairs
  • HiddenQuadruples
  • HiddenSingles
  • HiddenTriples
  • Hints
  • IncludeCandidates
  • LockedCandidates
  • MaxSolutions
  • MaxSteps
  • MonitorSteps
  • Pairs
  • ReduceSudoku
  • SetDisplay
  • ShowCandidates
  • ShowInfo
  • Singles
  • SolveSudoku
  • SudokuFromString
  • Sudoku
  • SudokuToString
  • ThreeGroups
  • Triples
  • YWing
  • $AllRules
  • $Sudoku
FredSimons`SudokuHints`
MaxSteps
​
MaxSteps
is an option for the function
SolveSudoku
, setting the maximal allowed number of steps when backtracking is used.
​
Details and Options

Examples  
(1)
Basic Examples  
(1)
The function
SolveSudoku
stops backtracking when the maximal number of steps have been done:
In[1]:=
SolveSudoku
"800000000000070000000800000076005900000000007000003000000700000700018000040000570",
MaxSolutions
2
SolveSudoku
::maxsteps
:The value of MaxSteps is too low. More solutions might exist.
SolveSudoku
::nosol
:This sudoku has no solutions.
SolveSudoku
::steps
:The result was found in 2000 steps.
Out[1]=
{}
We can increase the maximal number of steps:
In[2]:=
SolveSudoku
"800000000000070000000800000076005900000000007000003000000700000700018000040000570",
MaxSolutions
2,MaxSteps5000
SolveSudoku
::maxsteps
:The value of MaxSteps is too low. More solutions might exist.
SolveSudoku
::nosol
:This sudoku has no solutions.
SolveSudoku
::steps
:The result was found in 5000 steps.
Out[2]=
{}
This sudoku indeed has no solutions. It requires a backtracking with 601325 steps to find that result. In this case, when we solve without backtracking that is seen fast:
In[3]:=
SolveSudoku
["800000000000070000000800000076005900000000007000003000000700000700018000040000570"]
SolveSudoku
::nosol
:This sudoku has no solutions.
Out[3]=
In[4]:=
SolveSudoku
::steps
:
"The result was found in \!\(\*RowBox[{\"601325\"}]\) steps."
SeeAlso
SolveSudoku
RelatedGuides
▪
Sudoku Hints
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com