CurryEleison / SudokuSolver

F# program to solve sudoku puzzles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Program to solve Sudoku Puzzles written in F#

The solver is efficient in the places that count and solves "hard" sudoku 
puzzles in no more than 60 secs. The solver uses multiple cores to search 
for a solution and only very rarely spends more than a second on a solution.

Input is a file like this:
003020600
900305001
001806400
008102900
700000008
006708200
002609500
800203009
005010300

where 0 means the square is open. (Used on Project Euler)

Or like this:
..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.3..
where "." means the square is open. This is what is most commonly used.

Put your soduku square in the test.sdk file and go

The sample above is taken from http://projecteuler.net/index.php?section=problems&id=96

Some "hard" problems are found on http://en.wikipedia.org/wiki/Algorithmics_of_sudoku. 
The sudoku problem in test.sdk is from there under the label "golden nugget"

I used http://www.sudoku-solutions.com/ to find and check solutions too.

About

F# program to solve sudoku puzzles


Languages

Language:F# 100.0%