View previous topic :: View next topic |
Author |
Message |
| Ali88
| Joined: 01 Nov 2005 | Posts: 2 | : | | Items |
|
Posted: Tue Nov 01, 2005 2:16 pm Post subject: Any algorithms? |
|
|
I am creating a sudoku solver for a final year school project and i want the easiest solution possible to code and design (I am thinking a backtracking style solution).
I am only experienced in VB and have around 15 hours to design and implement the program.
I was wondering if anyone had an algorithm, source code or even any tips about the easiest way to go about this.
Any help would be greatly appreciated. |
|
Back to top |
|
|
| Lummox JR
| Joined: 07 Sep 2005 | Posts: 202 | : | | Items |
|
Posted: Wed Nov 02, 2005 5:59 am Post subject: |
|
|
If all you're interested in is getting the solution, then I recommend dancing links. The algorithm is described in several places around this forum, but you'll particularly find useful source code to study at http://magictour.free.fr/suexco.txt. If you can figure out that from C++ and convert the concept to VB, you'll have a pretty quick solver. Mind you, you should also check for impossible grids and for multiple solutions. |
|
Back to top |
|
|
| dukuso
| Joined: 14 Jul 2005 | Posts: 424 | : | Location: germany | Items |
|
Posted: Wed Nov 02, 2005 10:52 am Post subject: |
|
|
if you don't care about speed, the easiest is just
backtracking through all 9^(81-clues) possible placements.
This usually solves a sudoku in a few seconds but
might take a few minutes for some sudokus. |
|
Back to top |
|
|
| Ali88
| Joined: 01 Nov 2005 | Posts: 2 | : | | Items |
|
Posted: Thu Nov 03, 2005 10:07 am Post subject: |
|
|
Thanks for the help. Sorry if i implied i wanted to use someone elses work and put my own name on it, thats not what im after - im just not very sure how to go about this. |
|
Back to top |
|
|
|