Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbradberry/sudoku
Sudoku solvers, in Python
https://github.com/jbradberry/sudoku
Last synced: 20 days ago
JSON representation
Sudoku solvers, in Python
- Host: GitHub
- URL: https://github.com/jbradberry/sudoku
- Owner: jbradberry
- Created: 2019-04-23T15:58:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-23T16:00:21.000Z (over 5 years ago)
- Last Synced: 2024-10-28T19:43:57.380Z (2 months ago)
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Sudoku solvers
==============This repo contains some Python implementations of Sudoku solving
algorithms that I've played around with.The files
---------sudoku.py
My original implementation of a Sudoku solver.dancinglinks.py
An implementation of Knuth's Dancing Links algorithm. This is
considerably faster than my original implementation.test_sudoku.txt
An example sudoku problem, taken from one of the filler cards in a
deck of standard Bicycle playing cards.test_sudoku2.txt
Another example sudoku problem, this one billed as "the world's most
difficult Sudoku problem".Usage
-----No installation is required and there are no dependencies other than
Python 2 itself.
::$ time python sudoku.py test_sudoku.txt
632845179
471369285
895721463
748153692
163492758
259678341
524916837
986237514
317584926228 calls
real 0m0.103s
user 0m0.095s
sys 0m0.008s$ time python dancinglinks.py test_sudoku.txt
632845179
471369285
895721463
748153692
163492758
259678341
524916837
986237514
31758492656 calls
real 0m0.032s
user 0m0.028s
sys 0m0.004s