Skip to content

pmholton/Sudoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Sudoku

A Sudoku Solver using deductive methods in Python 3.

---=== INPUTS ===---

The program takes inputs in the form of a text file in the same directory as the program called "sudoku.txt". The puzzles in this file should be formatted as a one-line title for the puzzle, then 9 lines of 9 numbers, where 0 indicates a blank space. See the example below for specific formatting. Multiple puzzles may be in the same file. Include a title above each puzzle and no blank lines.

Daily Sudoku #231
003020600
900305001
001806400
008102900
700000008
006708200
002609500
800203009
005010300

---=== METHODS ===---

Currently, the program uses methods from https://www.kristanix.com/sudokuepic/sudoku-solving-techniques.php and www.SudokuWiki.org including:

  • Sole Candidate
  • Unique Candidate
  • Naked Candidates
  • Hidden Candidates
  • Pointing Sets
  • Box/Line Intersection
  • X-Wing

---=== OUTPUT ===---

The program outputs to the command line in a format similar to the input. Given the example above as input, the output would be as follows:

[4, 8, 3, 9, 2, 1, 6, 5, 7]
[9, 6, 7, 3, 4, 5, 8, 2, 1]
[2, 5, 1, 8, 7, 6, 4, 9, 3]
[5, 4, 8, 1, 3, 2, 9, 7, 6]
[7, 2, 9, 5, 6, 4, 1, 3, 8]
[1, 3, 6, 7, 9, 8, 2, 4, 5]
[3, 7, 2, 6, 8, 9, 5, 1, 4]
[8, 1, 4, 2, 5, 3, 7, 6, 9]
[6, 9, 5, 4, 1, 7, 3, 8, 2]

About

A Sudoku Solver using deductive methods in Python 3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages