Vance A Heron <heron / jpl.nasa.gov> writes:

> I wrote a solver in Ruby in about 2 hrs - not pretty, but it
> works.  As mentioned by Christian, I used the same approach as
> the 8-queens problem.  I'm using the int[][] notation...
>
> Solving runs fast enough in ruby - no need for 'C'.  I find
> it interesting to note the number of times you need to backtrack
> in the puzzles rated "fiendish" difficulty. (In some, there
> no backtracking at all!).

Yeah, exactly the same here.  My prolog solver runs in 10-100ms per
puzzle.

> I'll think about a generator tomorrow - but it seems that much
> of the "difficulty" is determined by *which* numbers you remove
> from the answer.  I haven't spent much time playing by
> hand, but I'm figuring the difficulty from a computer stantpoint
> is directly related to the bactracking.  Looking at it, one might
> be able to start recognizing patterns and make choices that require
> less backtracking.

Generation turned out to me much harder than I thought, while I can
generate random puzzles very easily, I lack the prolog knowledge to
figure what fields can be deduced and which cannot.

Playing Sudoku by hand is pretty fun btw, after a few minutes you find
the patterns to look for.  Still not easy, though.

> Vance
-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org