Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 2.31 KB

README.md

File metadata and controls

61 lines (48 loc) · 2.31 KB

SudokuSolver

Code Climate Support at gratipay

Default sudoku

This Sudoku solver has been written just for fun by a Python noob. It can solve the hardest Sudokus in less than half a second (for example, it solves the AI top 10 in 1.3s.)

PS: The puzzle may be 2x2, 4x4, 9x9, 16x16, 25x25, ..., n^2xn^2

Bitcoin wallet: 1GYj49ZnMByKj2f6p7r4f92GQi5pR6BSMz

PayPal

Report a bug or request a feature

Before creating a new issue please make sure that same or similar issue is not already created by checking open issues and closed issues (please note that there might be multiple pages). If your issue is already there, don't create a new one, but leave a comment under already existing one.

Checklist for creating issues:

  • Keep titles short but descriptive.
  • For feature requests leave a clear description about the feature with examples where appropriate.
  • For bug reports leave as much information as possible about your device, android version, etc.
  • For bug reports also write steps to reproduce the issue.

Create new issue

How to solve a Sudoku?

To enter the Sudoku from a console:

$ python sudoku.py
# It will ask you to enter the Sudoku.

To load the Sudoku from a file:

$ python sudoku.py filename.txt
# An example of a file:
# filename.txt
# 8 0 0 0 0 0 0 0 0
# 0 0 3 6 0 0 0 0 0
# 0 7 0 0 9 0 2 0 0
# 0 5 0 0 0 7 0 0 0
# 0 0 0 0 4 5 7 0 0
# 0 0 0 1 0 0 0 3 0
# 0 0 1 0 0 0 0 6 8
# 0 0 8 5 0 0 0 1 0
# 0 9 0 0 0 0 4 0 0