

If one of its advantages it to guarantee a solution will be found, a major drawback is that solving time may be slow due to the solutions tree sequential exploration. Principle is to fill empty cells with a value that satisfies the constraints, moving forward to the next cell when it works, moving backward when there is a constraint violation. That would take ages to run.īacktracking is also a kind of brute force search.

Of course basic brute force is not an option: for a 9x9 grid puzzle, “number of essentially different solutions, when symmetries such as rotation, reflection, permutation, and relabelling are taken into account, was shown to be just 5,472,730,538“ 4. With a 9x9 puzzle, you should be able to solve the sudoku with another approach than deploying a genetic algorithm: Backtracking 1 2, Operations Research (as it is a Constraint Satisfaction Problem 3), Pencil Mark.Īnd I am pretty sure that a lof of others exists if you have time for a little googling session. Solving sudokus with computer: a lot of approaches are available

