Skip to content

Sudoku solver program that uses a backtracking algorithm.

License

Notifications You must be signed in to change notification settings

TheDigitalScribe/SudokuSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

A Python program that solves sudoku problems with backtracking. Tried this out with what's known as the 'world's hardest sudoko', created by Finnish mathematician Arto Inkala. The solution by the program matches the one found online.

Program Steps

  1. Find empty square
  2. Try every number from 1 - 9
  3. Check if it's valid (doesn't violate rules)
  4. If it is, move on to next empty square
  5. If not, backtrack to last-entered number and try more digits
  6. Keep backtracking and entering in solutions until whole grid is complete

Sudoku Rules

Sudoku is a logic-based number puzzle where you fill in numbers on a 9x9 grid. However, each number you fill in must not already be in the same row, column or 3x3 block.

Sudoku Rules

Screenshots

'World's Hardest Sudoku'

World's hardest sudoku

Sudoku Solution

Sudoku solution

The Actual Solution

Code for Validating Numbers

Check valid code

About

Sudoku solver program that uses a backtracking algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages