![]() So, now that you have your logical solver that can evaluate whether a puzzle can be solved using a restricted set of techniques and can record down what those techniques are, the next step is to generate puzzles. If you want to go harder, the sky's the limit in terms of what to implement and I recommend referencing HoDoKu's wiki for the various "human-like" strategies that it implements. If you just want to replicate what The New York Times calls "Hard" then you just need naked singles, hidden singles, naked pairs/triples/quadruples, hidden pairs/triples/quadruples, pointing, and claiming. Thus, the input to your generator should also be the desired difficulty level, and the only way to judge difficulty is to make a program that solves like a human would and records down what the most difficult steps were. Some Sudoku grids solve using only singles, while others are not human solvable at all without a huge amount of guessing/backtracking. Having a brute force solver is useful for checking uniqueness, but usually the goal of generating Sudokus is also to target the difficulty of the Sudoku. What I mean by logical solver is one which attempts to replicate human logic. Generating a Sudoku first requires that you create a logical solver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |