Skip to content

Musab-Nazir/SudokuSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sudoku

A simple project I started for fun and to get extra practice at translating imperative algorithms to a more declarative functional style. Right now it is command line only. I may add an interactive web front end later.

Standalone usage

Download the sudoku.jar and board.edn file from the Releases. Update the board in the board.edn file if needed and run the program via:

$ java -jar sudoku.jar

Dev oriented usage

Assuming you have clojure (1.10.1) installed, you can use the following commands.

Run the project directly:

$ clojure -M -m musab.sudoku

Run the project's tests (they'll fail until you edit them):

$ clojure -M:test:runner

Build an uberjar:

$ clojure -M:uberjar

Run that uberjar:

$ java -jar sudoku.jar

Input different board states

By default the board.edn file has a board state added under the input key. Apparently this particular puzzle is the hardest you can find. On my 8 core 16 thread machine it takes ~ 60 seconds, however the runtime depends on the complexty of the puzzle.

Follow the format of the example 2D array/vector for board.edn for any custom boards you enter

License

Copyright © 2020 Musab

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Super basic attempt at making a sudoku solver

Resources

License

Stars

Watchers

Forks

Packages

No packages published