View previous topic :: View next topic |
Author |
Message |
| Marcos
| Joined: 02 Nov 2006 | Posts: 1 | : | Location: Granada (Spain) | Items |
|
Posted: Thu Nov 02, 2006 5:34 pm Post subject: Fastest approach for sudoku solving |
|
|
First of all, than you my reader for spending your time reading this... I hope you'll find my english at least, readable
I have to write a sudoku solving program which consist of two steps:
- spread-requirement
- heuristic
In adition, it must be as faster as possible, because It's for a contest.
I've read the topic What's the fastest approach to solving Sudokus? and the solving technique index, and instead of clarifying my mind, it creates me more doubts about this.
What should I use?
At the moment I've just only decided to use an 9x9matrix of lists, where each list is the possibilities in each position of the sudoku.
I hope you can help me, if it's possible.
thank you very much!
[/i] |
|
Back to top |
|
|
| Moritz
| Joined: 07 Oct 2006 | Posts: 23 | : | Location: Edinburgh, Scotland | Items |
|
Posted: Mon Nov 20, 2006 5:55 pm Post subject: |
|
|
Hi,
it is absolutely worth trying to implement a solver that uses dancing links. There's nothing better than an intelligently chosen data structure
However it is somtimes non-trivial to debug
Cheers,
Moritz |
|
Back to top |
|
|
| Howard Brazee
| Joined: 29 Nov 2006 | Posts: 3 | : | | Items |
|
Posted: Thu Nov 30, 2006 3:20 pm Post subject: |
|
|
My problem is that I need to slow down. It may be that there are really difficult Sudoku's out there, but I can't tell - I make mistakes.
My method of solving is to cross off numbers as I find they're impossible. But apparently sometimes I cross off a different numeral from the one I mean to cross off. The logic's easy - but the implementation is hard. Most attempts end up with an impossibility, meaning I have to start over.
A couple of times I have been stuck - but starting over got me to solve it. I wonder if I made typos which put me into an insoluable position.
So I can't work on getting faster - until I solve my problem of messing up. (Sort of like hitting the ball long in golf without having control of my direction).
It's hard to work slowly - and I still make typos. |
|
Back to top |
|
|
|