https://github.com/dnephin/sudoku-solver
Solves sudoku puzzles in under a second
https://github.com/dnephin/sudoku-solver
Last synced: 24 days ago
JSON representation
Solves sudoku puzzles in under a second
- Host: GitHub
- URL: https://github.com/dnephin/sudoku-solver
- Owner: dnephin
- Created: 2010-10-20T00:55:28.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2019-11-24T20:11:00.000Z (over 5 years ago)
- Last Synced: 2025-03-25T14:21:47.604Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 105 KB
- Stars: 10
- Watchers: 3
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Sudoku Solver
This Python module can solve even 'hard' sudoku problems almost instantly. It takes
longer to input the board, then it does to solve the problem. It would probably benefit
from either a problem generator, or a gui interface for input.__How to use__
import solver
import boardsboard = solver.solve(boards.board_hard)
To solve a different problem, pass in the board you want to solve to the constructor
of SudokuBoard. The board should be a list of 9 strings of length 9. Each entry
represents a square on the board. Use 0 for blanks. Whitespaces will be stripped, and
can be added to the strings for readability.See boards.py for example boards.