Skip to content

A fast Sudoku solver using Minimum Remaining Values heuristic and backtracking for an optimized solution approach.

Notifications You must be signed in to change notification settings

Mohamad-Jaallouk/Efficient-Sudoku-MRV-Backtracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Efficient-Sudoku-MRV-Backtracking

Efficient-Sudoku-MRV-Backtracking is a fast Sudoku solver that uses the Minimum Remaining Values (MRV) heuristic and backtracking algorithm for an optimized solution approach.

Features

  • Solves Sudoku puzzles quickly using MRV heuristic and backtracking
  • Uses constraint satisfaction techniques for optimization

Installation

Simply clone the repository to your local machine:

git clone https://github.com/Mohamad-Jaallouk/Efficient-Sudoku-MRV-Backtracking.git

Usage

  1. Provide a Sudoku puzzle as a 9x9 list of lists, with empty cells represented by 0:
puzzle = [
    [4, 0, 0, 0, 0, 0, 8, 0, 5],
    [0, 3, 0, 0, 0, 0, 0, 0, 0],
    ...
]
  1. Call the backtrack function with the puzzle as an argument:
solution = backtrack(puzzle)
  1. The solved Sudoku puzzle is returned as a 9x9 list of lists.

Releases

No releases published

Packages

No packages published

Languages