|
Soo — Sudoku in C# |
![]() Download
|
This is a simple open source implementation of a Sudoku solver, written in C# for v2.0 of Microsoft's .NET Framework. This language was chosen because it is readily available—the C# compiler is installed as part of the .NET Framework—and also because I was more interested in portability than performance. It also is my way of trying to repay all of the time, effort, and advice provided by the members of the Sudoku Programmer's Forum. What Soo Will Do:This version determines if an input string represents a valid puzzle, and will also ensure that it has a unique solution. It then tries the following strategies—in the order listed—to solve the puzzle:
Using these strategies, the ‘Soo’ solver will successfully solve about 30% of the Top 1465 puzzles, and will display the solution steps in human-readable form. With a little work, the Dancing Links (DLX) solver could be modified to solve 100% of the unique puzzles, but it wouldn't be able to provide any useful hints other than the answer. What Soo Won't Do:This software expects the user to have at least a rudimentary understanding of programming and/or the C# language. In other words, it's user-hostile, and hates everyone equally. Installation & UsageThe source code includes several major classes:
All of these source files—including a set of NUnit unit tests (*.test.cs) can be downloaded through the ‘Download’ link to the left. Copy the indivual source files to a directory, then use the C# compiler distributed with the NET Framework to compile them. A simple batch file to compile everything might look like this: @ECHO OFF The source code is being released under version 2 of the GNU Public License and is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Latest Versionv0.00.0017 dated 05 Feb '07
Change Logv0.00.0016 dated 10 Jan '07
|
2007.11.16-21:03