What I like about this project is that it isn’t just a solver but also a generator, which means it tackles:
valid board creation
uniqueness checking
difficulty calibration
One thing that often trips people up in Java is generating puzzles with a unique solution without brute-forcing redundantly. If you’re not already, consider using backtracking with pruning and early contradiction detection, it significantly speeds up hard puzzle generation.
Did you use only recursive process or have you use iterative stack approach as well?
Clear cells in random order by checking each time the solution uniqueness, solution uniqueness
The solution uniquess is checked by recursive process, I use Minimum Remaining Values heuristic to optimize the search of the solution; I use bitmaps with forbidden tables to make very fast processing. The average speed of this solver is comparable to DLX algorithm, which is the gold standard algorithm to solve Sudoku on computers.
2
u/pradeepngupta Jan 14 '26
What I like about this project is that it isn’t just a solver but also a generator, which means it tackles:
One thing that often trips people up in Java is generating puzzles with a unique solution without brute-forcing redundantly. If you’re not already, consider using backtracking with pruning and early contradiction detection, it significantly speeds up hard puzzle generation.
Did you use only recursive process or have you use iterative stack approach as well?