Eric I.
4/6/2007 7:01:00 PM
On Apr 2, 1:41 pm, "Todd" <toddkennethben...@yahoo.com> wrote:
> I was wondering if anyone here could point me in the direction of some
> books/articles/etc. that talk about algorithms for logic puzzle
> generation (i.e. Sudoku).
>
> What I'm looking for is a way to generate puzzles, much like Sudoku,
> that have one and only one solution and also can absolutely be solved
> with logic.
Well if we were to come up with a general technique, I'd probably do
something like this. I'll use Sudoku as an example, but this
technique is probably pretty general. For a specific puzzle, however,
it may be more efficient to use a tailored technique.
1. Write/run a program that generates a solved puzzle, such that it
meets all the requirements.
2. Remove some subset of the numbers. You could do this randomly or
using heuristics. You could even use human input.
3. Write/run a program that solves the puzzle. The program should
produce all possible solutions. If more than one exists, then you
know there's not a unique solution.
4. As a refinement of #3, you could write the program so that rather
than doing an exhaustive search, it solves it step-wise like a human
would. Each step uses one of the techniques that a person would use.
You could even rate the techniques by degree of difficulty. If you
can solve the puzzle with techniques that are "easy" then you've
created an easy puzzle. If you have to use more advanced techniques,
then you've created a more advanced puzzle.
Eric