Size:
Variable ordering heuristic:
Value ordering heuristic:
Constraint propagation algo:
All different constraint type:
Usage and Info

Press the button and watch the solver do its thing. Unlike the regular sudoku solver, this one does not let you specify starting grid values. You can keep pressing the button to iterate through all possible NxN sudoku answers.

The non-grayscale colors represent unique values, and, as this is a soduku (albeit an NxN one), there will be one unique color per each sub-grid, horizontal and vertical. Grayscale colors, on the other hand, represent the number of possible values remaining for a given cell - the darker the color, the fewer variables are left.

Configuration

You can try sudokus of different sizes, change the variable (cell-selection) and value ordering heuristics, adjust constraint propagation algorithm and try different all-different constraint types for modeling the problem. You can also enable fast solving, and backjumping.

I'll be writing more about what these are on the blog, for now here is a quick summary for the non-obvious bits:

  • Variable and value ordering heuristics impact the order in which the cells and their values are attempted.
  • Constraint propagation eliminates values from unassigned cells' domains. The more complex kind (Arc consistency) takes longer to run after each step, so there's a speed vs effectiveness trade-off.
  • All-different constraint types refer to the various ways of representing sudoku constraints, these vary from basic representation using a set of binary constraints, to a more sophisticated, incremental bipartite matching algorithm. Simpler algorithms are generally faster to evaluate, but aren't able to eliminate poor search states as effectively as the more sophisticated kind.
  • When fast solving is enabled the backend runs un-throttled and doesn't wait to send every step back to the client, while disabling it ensures every step is rendered.
  • Backjumping is useful for recovering from failures more effectively than simply backtracking, but is more expensive and slows the search down. It can also be toggled on or off.

... but why?

Unlike the standard 9x9 sudoku, which is computationally uninteresting, this one shows solving of beefier problems. The default one is 25x25, and you can try all grids up to 36x36. While bigger grids can be solved, as the backend is running on a small VM, and the network usage goes up considerably as the grid size grows, I've restricted the grids to be no bigger than 36x36, which already contains 1296 variables, each with 36 possible values, resulting in quite a few possible states.

Note: if you do try out the 36x36 sudoku, to avoid overloading the server requests may be throttled. You also will only be able to search for the first solution on this larger instance.

I got disconnected, what gives?

Each run is time limited, to avoid overwhelming the server.

Contacting me

I've included a couple of links below, feel free to reach out to me with ideas, suggestions or other feedback.