From: Vance A Heron Date: 2005-04-24T18:01:54+09:00 Subject: Re: Idea for Ruby Quiz - Su Doku solver 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!). 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. Vance On Sun, 2005-04-24 at 02:34 +0900, Christian Neukirchen wrote: > Florian Gro� writes: > > > Christian Neukirchen wrote: > > > >> Ruby doesn't provide a lot of support for 2d-Arrays > >> and there is not a lot to abstract. > > > > What about NArray? > > It exists, but where is the advantage over int[][]? > > Anyway, I quickly wrote a Su Doku solver in gprolog, you can look at > it here: > > http://rafb.net/paste/results/1ogo8j31.html > > There are languages that have even less support for 2d-arrays. :-) > > Happy hacking,