View previous topic :: View next topic |
Author |
Message |
| MrZu
| Joined: 07 Aug 2005 | Posts: 2 | : | | Items |
|
Posted: Sun Aug 07, 2005 12:33 pm Post subject: Yet another free solver with source code.... (C++) |
|
|
Just here : http://waveseed.com/sudoku/
Stats seem quite good, and it's very compact piece of code. Feel free to use it.
--- -8- 132
--- --- ---
6-- -45 -79
--2 8-7 6--
--1 --- 5--
--4 5-1 9--
23- 61- --8
--- --- ---
796 -3- ---
-------------------
547 986 132
189 273 465
623 145 879
352 897 614
961 324 587
874 561 923
235 619 748
418 752 396
796 438 251
-------------------
Duration : 0 ms
Number of steps: 54
Have fun,
-Thomas |
|
Back to top |
|
|
| MrZu
| Joined: 07 Aug 2005 | Posts: 2 | : | | Items |
|
Posted: Mon Aug 08, 2005 3:29 pm Post subject: |
|
|
Quick update...
A small change in the "scoring" method helped quite a bit. The "Solve" method can restrict the search to the first solution only.
For instance:
-42 -3- ---
--5 --- ---
--- 9-- --8
1-- 8-- ---
--3 -4- 2--
--- --7 --6
7-- --6 ---
--- --- 46-
--- -2- 59-
Used to take:
Duration : 0 ms
Number of steps: 13952
Now:
Version 2:
All solutions: 5679
First solution: 4166
On average, for complex searches, the number of steps is divided by 3 to 5. Same URL, at the bottom of the page. |
|
Back to top |
|
|
|