https://github.com/seqre/sudoku
Sudoku solver written in Haskell as a semester project for course Functional Programming at the Jagiellonian University
https://github.com/seqre/sudoku
semester-project sudoku-solver
Last synced: 11 months ago
JSON representation
Sudoku solver written in Haskell as a semester project for course Functional Programming at the Jagiellonian University
- Host: GitHub
- URL: https://github.com/seqre/sudoku
- Owner: seqre
- License: mit
- Created: 2021-01-12T20:47:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-04T23:10:48.000Z (about 5 years ago)
- Last Synced: 2023-03-04T00:00:32.814Z (over 3 years ago)
- Topics: semester-project, sudoku-solver
- Language: Haskell
- Homepage:
- Size: 75.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://www.ams.org/notices/200904/rtx090400460p.pdf) for Solving Sudoku Puzzles.
## Project setup
[Install stack](https://docs.haskellstack.org/en/stable/install_and_upgrade/) 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