66 Comments
- kuchdawg, on 10/12/2007, -2/+12Works Great in Windows!
Here is an EXE
http://www.bigupload.com/d=3E1F0C94
DIGG - asteron, on 10/12/2007, -0/+9This is ridiculous. Any student with a semester of compsci can write a brute force sudoku solver and you can find dozens and dozens of logic solvers online. Sudoku being NP complete means that there are always puzzles that require some form of brute force to solve. I myself have written two solvers in python and C.
If you want to see some of the algorithms real sudoku programmers use check out this forum.
http://www.setbb.com/phpbb/index.php?mforum=sudoku
EDIT. dougstockwell beat me to the link - karch, on 10/12/2007, -7/+13Is it just me or is this old hat? Old, old old, rusting and graying old hat?
- the_wally, on 10/12/2007, -0/+6Wow, I did this in c# a year ago in 2 hours of testing......
Not to flame, but programming isn't that cool or digg worthy, unless its pretty revolutionary and fresh - dougstockwell, on 10/12/2007, -0/+5Why is this interesting? A better link would be to the Sudoku Programmers forum : http://www.setbb.com/phpbb/index.php?mforum=sudoku
- sHARD>>, on 10/12/2007, -2/+6I did this the other day in Python. Whoopie! I must be a genius. In other news, this is pretty much a dupe of the 5 other "OMFG YOU CAN SLVOE THE DOSUKUI PROBLEMS WITH A COMPTUAR MACHIEN!!!1!!" stories.
- rm999, on 10/12/2007, -5/+9not just you, story reported :)
- digiital, on 10/12/2007, -0/+3What fun is it to have a computer program figure it out! Use your brain, that's the whole point of this puzzle. Sheeesh
http://www.kde-apps.org/content/show.php?content=28792
Once you do a few and get the hang of it, you can get them done pretty quicky. But if your a KDE fan, then by FAR the best sudoku game for linux is KSUDOKU. - rm999, on 10/12/2007, -1/+4This has been done a thousand times, nothing is new. What's the deal with all these old and uninteresting stories making the front page lately?
I can't even open the link. - lnxaddct, on 10/12/2007, -0/+3I prefer to solve it myself, http://krenzel.info/?p=12
- ItsGus, on 10/12/2007, -1/+4anyone who says its just him is a fool. sudoku solvers have been around for AGES. there is nothign special about this one. BAH
- estacado, on 10/12/2007, -0/+3Why is this on the home page? It is nothing remarkable. It can even be, and has been done in Javascript.
- mbiesz, on 10/12/2007, -0/+2Could someone please explain to me why this is the slightest bit interesting and/or news-worthy?
- Takteek, on 10/12/2007, -0/+2Good, but I'm sorry to tell you that this is nothing new. There are many solvers written in C already...
- slexaxton, on 10/12/2007, -0/+2My low level algorithms class as a CS major has a sodoku solver as a project, but it's written in Haskell.
It is more than likely the easiest program I've written since "Hello World!"
It's a brain puzzle for a reason, not a computer puzzle. - triclops, on 10/12/2007, -2/+4Works fine on Mac OSX too, just comment out the PROC_OPT line at the top of the Makefile
- Chozabu, on 10/12/2007, -0/+2lol, my bad man!
http://icculus.org/~jcspray/GNUDoku/ (fixed XD)
though that is one of the 5 best 404 errors ive ever seen! - sintaks, on 10/12/2007, -0/+2I wrote my solver in Lisp.
Lisp is the mother of all mother-effing languages to implement a solver in. - Ir0n_mE, on 10/12/2007, -0/+1I like it because it promotes good coding and more coding.
- lnxaddct, on 10/12/2007, -0/+1Strawberry,
Ianam is just a troll, let him be. If a Sudoku puzzle has more than one solution then it isn't a proper puzzle and requires guesswork to fill in.
Regards,
Steve - samstr, on 10/12/2007, -0/+1Good find!
Here's a Sudoku application I developed for www.brightlemon.com.
Hopefully some of you will find it interesting. -> http://www.counton.org/sudoku
-------------------------------
http://www.wirah.com - Dennern, on 10/12/2007, -0/+1I wrote my own solver i Visual Basic, works great :D
- howser2007, on 10/12/2007, -0/+1Actually, we get bonus in math class for doing Sudoku puzzles, so this is pretty awesome. Now I can finish them in less than a minute!
- skirkham, on 10/12/2007, -0/+1Sudoku is a cool game, that has been around for a while. Also this program has been around for a little over a year. I saw it online last year too. This may not necessarily be new news, but it deserved a digg because of the way to crack those hard butt soduko's...you all know you need this for them. LOL
- JohntB, on 10/12/2007, -0/+1Sometimes you have to use guess and check. AFAIK, some puzzles are not solvable just with logic.
- NiLeS, on 10/12/2007, -1/+2Right. This was my first semester Comp Sci Exam (Java)
- Chozabu, on 10/12/2007, -3/+4i dont totaly get why this is news, things like gnudoku(http://icculus.org/~jcspray/GNUDoku/) have been around for a while...
nvm, still an intresting story! - canyadiggit, on 10/12/2007, -0/+1THE PROGRAM IS NOT 100% LOGIC BASED. The Algorithm Description states that it uses Guess and Check as a last resort. It's a good solution, but it is not pure.
- ianam, on 10/12/2007, -0/+1Solving Sudoku with "logic" is pretty stupid when it is easily expressible as a constraints problem. I have a program based on Knuth's "dancing links" algorithm (http://en.wikipedia.org/wiki/Dancing_Links) that solves Sudokus in nanoseconds, and fits on a page.
- lnxaddct, on 10/12/2007, -0/+1All puzzles are solvable using logic, if there is any guessing required then there are multiple solutions to the puzzle. That's not to say a puzzle can't be solved by guessing, but if guessing is required then its not a true sudoku puzzle (there can only be one solution). Read this http://krenzel.info/?p=12 , I wrote it and although I state I have not written a mathematical proof for it, it is pretty self evident. I just haven't had the time to write a proof, nor the need because using that method has never failed me.
Regards,
Steve - lnxaddct, on 10/12/2007, -0/+1ianam,
in my original post I said
"... although I state I have not written a mathematical proof for it, it is pretty self evident. I just haven't had the time to write a proof, ..."
Backtracking and dancing links are not the best way to go about solving sudoku, also stop being cocky in your responses to people, you come off as an ignorant ass. You're not the great computer scientist you think you are. I'm just too lazy to write my own proof (or too busy depending onyour perspective), that doesn't mean it doesnt exist as you you seem to imply -- a classic case of the fallacy of argumentum ad ignorantiam. Regardless, there was more to my reasoning than just failing to find a counterexample, perhaps if you had read and paid attention to what I linked to you would have seen that. - StrawberryFrog, on 10/12/2007, -0/+1Nope, brute force takes under a second to solve it.
- oboreruhito, on 10/12/2007, -0/+1http://digg.com/gaming/Javscript_Soduku_solver
http://digg.com/programming/Sudoku_solver_with_source_code
http://digg.com/programming/Java_programmer_Sudoku_addict_
http://digg.com/gaming/Online_Sudoku_Solvers
http://digg.com/software/A_Sudoku_Solver_in_OpenOffice
http://digg.com/programming/Why_Not_Python_,_Part_2
http://digg.com/design/Sudoku_Solver_Widget
http://digg.com/gaming/Javascript-based_Sudoku_Solver_(dynamically_populates_with_solution)
http://digg.com/gaming/Free_Sudoku_solving_software_
http://digg.com/gaming/Su_Doku_solver
http://digg.com/programming/Java_Sudoku_Solver_-_with_source
http://digg.com/programming/Write_a_Sudoku_Solver_for_your_PDA
and 203 days ago
http://digg.com/links/Sudoku_Solver - harbinjer, on 10/12/2007, -0/+1Ok I have a more serious question: Is sudoku solvable as a series of 27 linear equations? It seems like it should be. Does anyone know? If that's the case, could you just throw it into linpack?
- StrawberryFrog, on 10/12/2007, -0/+1Well, he's still talking from his rear end, since version of this code, slightly modified to not halt on a full board, will find all possible solutions to an underconstrained board, notwithstanding that they are "not valid puzzles" as far printing them in a newspaper. These runs can go for minutes when there are thousands of possible solutions.
- StrawberryFrog, on 10/12/2007, -0/+1I've said it before here on digg and I'll say it again. Solving suduko in code is not hard. One night I wrote a rough and ready program in one hour that solves it, and I'm not a suduko genius.
Code here: http://strawberryfrog.livejournal.com/53640.html
The c# program has no smarts, it just tries everything, which due to the constraints is actually less combinations than you might think. It can brute-force a suduko puzzle in about half a second. The algorithm could be used in just about any language.
Suduko is overrated: the puzzles are machine generated, and easily machine solvable. - soapdev, on 10/12/2007, -0/+1i don't understand why solving sokudu is such big news....
the coding is not that difficult as mentioned above - StrawberryFrog, on 10/12/2007, -0/+1Ianim, your first statement is incorrect, it works for any soduko that has a unique solution. i've tried it on several, and am quite confident in this. If you think otherwise, please give an example that this program does not solve, genius.
Your statement about backtracking is puzzling, since the program does pretty much that - if a solution under test is found to be inconsistent, then the stack is unwound until more posibilites can be tried. All valid posibilities will be tried. - ianam, on 10/12/2007, -1/+2"All puzzles are solvable using logic, if there is any guessing required then there are multiple solutions to the puzzle."
You claim this as a fact even though it's merely based on your failing to have encountered a counterexample -- a classic case of the fallacy of argumentum ad ignorantiam.
You might want to try your hand on this one:
7.8|...|3..
...|2.1|...
5..|...|...
---+---+---
.4.|...|.26
3..|.8.|...
...|1..|.9.
---+---+---
.9.|6..|..4
...|.7.|5..
...|...|... - bsyris, on 10/12/2007, -0/+0There are many, many Sudoku solvers in any programming language you can think of. Although somewhat nifty, this doesn't really seem digg-worthy.
- The_Goose, on 10/12/2007, -0/+0Here's a javascript version, no software to install: http://www.sudokusolver.co.uk/
- mieteck, on 10/12/2007, -0/+0For those who prefer on-line version - here's an interesting one: http://www.scanraid.com/sudoku
- Rhaegal, on 10/12/2007, -0/+0http://rhaegal.com/SudokuSolver
Easter egg: Type LSD into any cell for a visual trip - rohizzle121, on 10/12/2007, -2/+2http://www.rohizzle121.be/sudoku_solver.exe
/ my fellow diggers here is a direct download for the windows version w/out using big upload - mlutter, on 10/12/2007, -0/+0Yeah, me too: http://www.sudokupack.com
Once the solver was complete, the generator was pretty simple, you pretty much just drop random cells and each time check if the puzzle is still solvable. I think my difficulty level with this method, in general, is not so hard, but here and there it will put out a tough one. - zarquon, on 10/12/2007, -0/+0This is akin to writing a program to solve for the 30th integer place of pi. A very simple algorithm to implement, its a human logic puzzle not a computer logic puzzle. Every damn programming noob can write a sudoku solver giving enough time. No digg.
- mrASSMAN, on 10/12/2007, -5/+5not just you.
- guillem, on 10/12/2007, -0/+0Just for the record, last summer I wrote an ugly one in C. It iterates applying some basic rules and when/if that does not produce any change it fork()s for alternatives. An instance doing a bad guess will die due to contradiction, so only instances with all their guesses OK will end normally. So, you get all possible solutions and it's very parallelizable. Anyway, the 9x9 grid is so small that it doesn't matter... any implementation is pretty fast. Bigger grids would solve much faster with this kind of algorithm running on highly parallel systems, I guess :-)
http://bulma.net/beowulf/misc/sudoku.c - ninepoundjammer, on 10/12/2007, -7/+7not just you
-
Show 51 - 65 of 65 discussions



What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official