| deedub
| Joined: 27 Jun 2006 | Posts: 1 | : | Location: Oregon | Items |
|
Posted: Tue Jun 27, 2006 3:22 am Post subject: Excel Solver (code viewable) |
|
|
For what it's worth --
I've a solver available at http://excelgames.org/sudokusolver.asp -- really it is also available at my main site (http://sudokuplace.com/) as well, but that version is password protected to keep non-programming types from accidently messing anything up on it.
The solver is a "no brute force" version, and actually not as robust as I want it to be. If you take time to review the code you'll find that it doesn't take out "doubles" within a box. And the putting it all together part is quirky, at best. There is a reason for these things, actually: I got tired of writing. Likewise, I haven't tested it against every "tough" sudoku puzzle out there.
For me, it was/is a breakthrough application, though, in that I finally got the brains out of Excel and into VBA. You would probably be appalled at some of the things I've tried getting to this point...
The puzzle is copied into a 9 x 9 x 11 array; the top layer serving as the board and the next 9 as "possible values" stores, and the bottom layer defining the boxes (useful if you want to adapt it to a "jigsaw" sudoku).
Anyhow - there it is. Any advice/feedback is quite welcome, I do want to make it better. At some point I also hope to port it to an asp script, but for now that's beyond my skills. |
|