Skip to content
/ sudoku Public

Sudoku solver written in Haskell as a semester project for course Functional Programming at the Jagiellonian University

License

Notifications You must be signed in to change notification settings

seqre/sudoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku solver

|---------|---------|
| S  U  D | O  K  U |
| 1     3 |    5  9 |
| S  O  L | V  E  R |
|---------|---------|

Sudoku solver written in Haskell as a semester project for course Functional Programming at the Jagiellonian University.

It is based on the simplified version of the Pencil-and-Paper algorithm for Solving Sudoku Puzzles.

Project setup

Install stack then execute below commands:

git clone https://github.com/seqre/sudoku.git
cd sudoku
stack setup
stack build
stack exec sudoku-exe

Usage

sudoku SOLVER

Then supply the sudoku in the following format:

Sudoku:{numerical representation of sudoku}

Where numerical representation of sudoku are concatenated rows of sudoku with numbers 1-9 for given numbers and 0 for blanks.

Example

    3  9 | 5       |         
         | 8       |    7    
         |    1    | 9     4 
---------|---------|---------
 1       | 4       |       3 
         |         |         
       7 |         | 8  6    
---------|---------|---------
       6 | 7     8 | 2       
    1    |    9    |       5 
         |       1 |       8 

This board will result in such representation: Sudoku:039500000000800070000010904100400003000000000007000860006708200010090005000001008

Solvers

  • auto - mode chosen by program
  • bruteforce
  • penandpaper - TODO

About

Sudoku solver written in Haskell as a semester project for course Functional Programming at the Jagiellonian University

Topics

Resources

License

Stars

Watchers

Forks