ZiNgA BuRgA Wrote:Dunno what they are - I just used some techniques that I use to solve Sudoku puzzle myself. If you want, I can send you the VB6 source (I'm a messy coder).
I did use a 3x3x3x3 array though - first time I've ever used a 4 (and also 5) dimensional array :D Not that it really helped or anything - it was just for fun I guess.
That might be even more impressive. XY-Wings and Swordfishing and Chain forcing
and many others are all defined logic techniques to solve Sudoku puzzles, most logic
solver programmers just use modular programming (who doesn't?) and will program a
class or method for each technique. You probably used some without even knowing.
Zinger Burger Wrote:O_o, oh, like not entering enough data? Haha, I see. Basically it tries to solve it logically, after failing it will try "basic" guessing (brute force but to a limited depth) then finally asks the user if it will do a full brute force.
:D
Not quite, I have several pet invalid puzzles that are very hard to catch that I like to
feed to Sudoku solvers, yours actually caught the first ones I tried, but didn't
recognize the more complex ones that involved multiple subsquares, though it still
warned me before falling into exponential time. Which is very nice and which means
you probably could recognize them if you added a bit more code. :yipi:
ZingaBurga Wrote:Thanks for the comments _VEndeTta! You seem to be a very experienced programmer - do you tend to program many little apps?
Alas no. No time. Though it looks like my internship will fall through this summer so I'll
finally be able to catch up on some coding. :clown:
I've been dying to try my hand at Emu, been brushing up on my Pentium 4 assembly
in anticipation. ;) If Daedelus doesn't get its head out of its butt, i was thinking of
learning ARM assembly (I think that's right) and pulling together a team of people who
know more than me to give a go at an N64 emulator.
As for the source. Lulz. I don't have any VB IDE, so as long as I can open it in
notepad or something, that'd be awesome, I could see what techniques you used,
etc. I did some in-depth research on Sudoku puzzles when I programmed one for a
Programming Competition, I was trying to make the brute-force algorithm more
effecient, in truth I wanted to get it to linear time, and succeeded only partially. My
method was about 3 times faster then pure brute-force, which doesn't mean poo poo in
exponential time D:.
Still, was fun. I lol'd at a 4 dimensional array, when I did it I used a 1D array of "Box"
objects, which took care of the other dimensions. But I wasn't trying to program
logic, so it worked. There is a way to set up your arrays to catch every logical error,
but it does take a while.
By the way, if you want to break your sudoku solver, enter these initial values :
(address:value)
1,A:1
2,H:6
3,E:6
5,B:6
9,C:6