| gtb
| Joined: 29 Sep 2005 | Posts: 5 | : | | Items |
|
Posted: Sun Dec 18, 2005 5:39 pm Post subject: Let's visualize the methods to understand them easier |
|
|
i just found this link http://www.angusj.com/sudoku/hints.php
so i think we can forget this topic by now
---------------------
Hi there,
i know this Forum has lots of descriptions for solving techniques but my english is not good enough to understand all of them (maybe even in german some of the methods would be to difficult for me to understand).
Maybe we can try to visualize some techniques so that evryone can understand them? maybe you could tell me how the jargon/slang-name of these techniques are?
I have implemented now:
"last possible position for a number within a group/row/column"
"exclude number by line-group-conclusion"
"last possible number on a single field"
/trivial/
"try-and-error"
i have a so called "brutforce-level", which goes from 2 to 9.
1. search for fields where only N possebilities are left, with N=brutforce-level.
2. make a copy of the whole sudoku
3. set the number you chosen on the field you found in (1) on the copied sudoku
4. let it be solved as usual
5. you need a collision-check for your solver, that means if your logic tells you to set a number N on field F and in the same time it would be incorrect to do so, because in the same group/row/column is allready the number N then the sudoku is incorrect solved. So you know that the choice you made in (3) was wrong. you can then stop solving the copied sudoku and exclude the number N chosen in (3) on you original sudoku.
6. It's also possible that the copied sudoku is beeing solved completly and correct. this is just fine because you can use it now as the result. you're done.
there might be better backtracking-/try-error-methods but i think this one is the most simple one, and in many cases one try-error-con-/exclusion is enough to solve the rest by the methods shown above.
----------------------
i hope you join me to visualize the methods or maybe describe them as good as possible
i also have a preview of my new solver, i tried a oop-based algorithm with many pointers so that a field "knows" which group, row or column it belongs to. so one can better iterate above these groups. it's also more easy because group, row and column can use the same object type.
i used bitwise math as the basic search method.
here's a example solved sudoku using the same methods as described above.
~1,8MB http://www.4point-webdesign.de/stuff/sudoku_example.oopsolver.htm
greetz, greenthumb
EDIT: i just found this topic: http://www.setbb.com/phpbb/viewtopic.php?t=379&mforum=sudoku
i'll see what i understand and if i can implement some of them i'll try to add them here visualized |
|