The somewhat vaingloriously named DeewiantSudoku is a Sudoku solver I wrote back in 2006. I was intrigued by the solving techniques discussed at places such as the now-defunct Sudoku Programmers Forum (the Wayback Machine has a copy; the original URL is dead) and decided to try my hand at programming them. I found this more interesting than implementing a simple brute-force solver, even one based on a fancy algorithm such as Dancing Links.

DeewiantSudoku is written in the unfortunately dead version 1.0 of the D programming language. It's actually old enough that it's based on a pre-1.0 release, so even the latest 1.0 compilers may not accept it — at least not without enabling deprecated language features. At least GDC 0.24 and DMD 0.164 can compile it.


Pre-built binaries as well as the source code are available here:

FileTypeSize (octets)Last modified
DeewiantSudoku 3.0.0 alpha 1, x86 Windows binary.ZIP archive111 3752014-12-29
DeewiantSudoku 3.0.0 alpha 1, x86 Linux binaryxz-compressed tarball185 8922014-12-29
DeewiantSudoku 3.0.0 alpha 1, x86-64 Linux binaryxz-compressed tarball193 3002014-12-29
DeewiantSudoku 3.0.0 alpha 1 source code7z archive18 8632014-12-29

Brief testing of the latest version linked above suggests that it uses way too much memory on Sudoku puzzles larger than the standard 9*9. Thus, an earlier version, 2.1.0 (which mistakenly calls itself 2.0.2), is also offered here. No Windows binary for this version though, sorry.

FileTypeSize (octets)Last modified
DeewiantSudoku 2.1.0, x86 Linux binaryxz-compressed tarball144 7882014-12-29
DeewiantSudoku 2.1.0, x86-64 Linux binaryxz-compressed tarball190 0202014-12-29
DeewiantSudoku 2.1.0 source code7z archive16 2212014-12-29


The following is an example 9*9 Sudoku puzzle, displayed in ASCII art form so that it can be copy-pasted directly into DeewiantSudoku:


DeewiantSudoku is able to solve this puzzle without using brute-force methods, i.e. guessing and backtracking. This particular one does require some rather complex pattern matching, though. The following is a snippet of DeewiantSudoku's output given this puzzle and the --explain flag:

Cells [B3], [B9] must contain 1, 6; eliminated 2 such candidates in row B.
Found an XYZ-wing among [A1], [B3], [A4] for 1; eliminated 1 candidate for 1.
Found a Jellyfish among [C2], [C3], [C6], [F3], [F6], [F9], [H6], [H9], [I2], [I3] for 5; eliminated 5 candidates for 5 in columns 2, 3, 6, 9.
Found a Jellyfish among [A1], [D1], [E1], [A4], [E4], [A5], [D5], [E5], [G5], [A7], [D7], [G7] for 1; eliminated 6 candidates for 1 in columns A, D, E, G.