Post Reply 
[PC] Sudoku Solver
Author Message
_VEndeTta
Endless Night

Posts: 522.1732
Threads: 48
Joined: 9th Apr 2007
Reputation: -3.19624
E-Pigs: 4.8849
Offline
Post: #12
RE: [PC] Sudoku Solver
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

[Image: 3c68ce3.jpg]
And when you gaze long into an abyss,
the abyss gazes also into you.
12/04/2007 06:19 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
[PC] Sudoku Solver - ZiNgA BuRgA - 16/03/2007, 05:27 AM
RE: [PC] Sudoku Solver - Sparker - 16/03/2007, 05:51 AM
RE: [PC] Sudoku Solver - sticky - 16/03/2007, 06:03 AM
RE: [PC] Sudoku Solver - michaelp - 16/03/2007, 06:11 AM
RE: [PC] Sudoku Solver - dasme - 16/03/2007, 10:38 AM
RE: [PC] Sudoku Solver - ix_stylez - 09/04/2007, 04:24 PM
RE: [PC] Sudoku Solver - Pyro - 23/12/2007, 12:59 PM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 09/04/2007, 04:32 PM
RE: [PC] Sudoku Solver - roberth - 16/08/2007, 04:29 AM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 09/04/2007, 04:40 PM
RE: [PC] Sudoku Solver - _VEndeTta - 11/04/2007, 08:26 PM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 11/04/2007, 11:47 PM
RE: [PC] Sudoku Solver - _VEndeTta - 12/04/2007 06:19 AM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 12/04/2007, 06:38 AM
RE: [PC] Sudoku Solver - _VEndeTta - 12/04/2007, 07:20 AM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 12/04/2007, 03:07 PM
RE: [PC] Sudoku Solver - _VEndeTta - 12/04/2007, 05:20 PM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 12/04/2007, 05:24 PM
RE: [PC] Sudoku Solver - _VEndeTta - 12/04/2007, 05:40 PM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 12/04/2007, 07:01 PM
RE: [PC] Sudoku Solver - _VEndeTta - 12/04/2007, 10:45 PM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 13/04/2007, 12:01 AM
RE: [PC] Sudoku Solver - _VEndeTta - 13/04/2007, 06:30 AM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 14/04/2007, 11:16 PM
RE: [PC] Sudoku Solver - _VEndeTta - 15/04/2007, 09:34 AM
RE: [PC] Sudoku Solver - u_c_taker - 15/04/2007, 10:27 AM
RE: [PC] Sudoku Solver - blessedhands - 16/12/2007, 02:36 AM
RE: [PC] Sudoku Solver - ZiNgA BuRgA - 16/12/2007, 02:51 AM
RE: [PC] Sudoku Solver - diego - 16/12/2007, 03:00 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: