Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate random valid Sudoku puzzle #18

Open
roooodcastro opened this issue Nov 6, 2020 · 0 comments
Open

Generate random valid Sudoku puzzle #18

roooodcastro opened this issue Nov 6, 2020 · 0 comments
Assignees
Labels
solver-algorithm Related to the actual logic solver implementation

Comments

@roooodcastro
Copy link
Owner

One possible general algorithm to create a random Sudoku generator is as follows:

  1. Fill an entire grid with numbers, using a backtracking Sudoku solver to ensure the puzzle is valid
  2. Take out numbers randomly, ensuring that the puzzle is still valid and has a unique solution.
  3. Stop when number of clues left is desirable

In order to implement this, the following pre-requisites must be already implemented:

  1. Backtracking Sudoku solver
  2. Sudoku grading system

References:
https://www.sudokuwiki.org/Sudoku_Creation_and_Grading.pdf
http://norvig.com/sudoku.html

@roooodcastro roooodcastro self-assigned this Nov 6, 2020
@roooodcastro roooodcastro added the solver-algorithm Related to the actual logic solver implementation label Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solver-algorithm Related to the actual logic solver implementation
Projects
None yet
Development

No branches or pull requests

1 participant