#sudoku #solving #numbers

bin+lib msolve

Another sudoku solving library

13 releases (5 breaking)

0.6.0 Jul 5, 2020
0.5.0 Jul 5, 2020
0.4.1 Jul 4, 2020
0.3.1 Jul 4, 2020
0.1.1 Jun 22, 2020

#623 in Games

MIT license

36KB
784 lines

msolve

Travis CI

A WIP sudoku solving library

Goals

Improve performance, potentially via using SIMD, and or GPU

Add sudoku difficulty grading, potentially by counting the number of iterations needed to solve

Add sudoku generation from a seed sudoku

Usage

To get the first solution to each sudoku in input: msolve solve_one < sudokufile.txt > output.txt

To get the solution for each uniquely solvable sudoku in input: msolve solve_unique < sudokufile.txt > output.txt

To get the first N solutions to each sudoku in input: msolve solve_n N < sudokufile.txt > output.txt

To get information about the sudoku file: msolve info < sudokufile.txt

Example output for info: 0 Solutions: 486451, 1 Solution: 763, 2+ Solutions: 12786

To list all puzzles with a single unique solution: msolve find_with_single_solution < sudokufile.txt > output.txt

To list all puzzles with at least one unique solution: msolve find_with_solution < sudokufile.txt > output.txt

To get the number of solutions of each puzzles, up to a maximum of N: msolve count_solutions N < sudokufile.txt > output.txt

Dependencies

~595KB
~12K SLoC