06-09-2024, 01:57 PM
(06-09-2024, 02:45 AM)Dav Wrote: By the way, I had a hard time trying to figure out a puzzle generator, but I eventually made one that could spit out valid puzzles. It worked so slow however I couldn't put it in the game. It took up to 30 secs to make a valid puzzle. That's why I just used pre-made puzzles in the game, to skip the wait.
Might as well also post the really horrible generator program that makes the puzzles. It BEEPs when the puzzle is generated.
- Dav
my generator takes a long time too when attempting to make a high level difficult puzzle. i start with solved puzzle and randomly remove clues. The trick is not to remove a clue that ruins the uniquness of the solution ie a puzzle with more than one solution is bad because pure logic can't resolve the solution.
getting a solver working is key. i use it to create solved puzzles ie it solves a blank grid. then again to check randomly removed clues to make sure the solution remains unique.
b = b + ...