asaldelkhosh / Sudoku-Backtracking

Solving sudoku with backtraching algorithm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sudoku Backtracking

Solving sudoku with backtraching algorithm.

This repository provides python scripts that allows to solve the Sudoku Game. Show the solution as a matrix and models the Sudoku Game as a CSP.

It gets n as the size of the board,c as the number of sudoku givens, the position for them, and the sudoku givens. If there was a solution, it returns the solution as a matrix and if there wasn't, it returns "unsolvable CSP!" This code uses Backtracking algorithm for solving the Sudoku game and it can solve the game for n = 2, 4, 9

About

Solving sudoku with backtraching algorithm.


Languages

Language:Python 100.0%