Sudoku Generator/Solver

  • Comments posted to this topic are about the item Sudoku Generator/Solver

  • After two hours of 100% CPU usage, I killed the solver proc. I've seen other solvers that work in a second or two.

    I finally figured out the undocumented generator proc. It does a trial and error approach which sometimes takes between 200 and 600 tries to complete. The three inner loops remove used numbers for the row, then the column, then the sub grid that the main loop is currently assigning a digit to. It goes until failure and then resets to the ninth digit assigned to try again.

    Some digging shows that there are about 6.7 Octillion possible solutions so I'm surprised there may be 600 failures to create one that works. I can think of a more optimal algorithm but this already runs within a few seconds.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply