This is a Sudoku solver based on Backtracking. It takes a custom puzzle as input and returns the solved puzzle
- board.py: Conatins functions related to the sudoku board, printing, initialization
- graph.py: Contains a class graph which takes an adj matrix as input to create board
- main.py: contains main function to run program
- soln.py: Contains Backtracking Algorithm
- render_p.py: Renders the Gui on pygame (in progress)
- Clone the repository in your Local System using
git clone https://github.com/drishti307/sudoku.git
- Change directory in to Sudoku.py using cd command:
cd Sudoku.py
- Run following command on the terminal:
python main.py
Press 1 to give custom input, 2 to run algorithm on random 9x9 grid
i) Enter dimensions of board: 4, or 9, or 16....
ii) Enter row, column and value of cell
iii) To exit input system, enter any value greater than your dimensions
Sudoku grid entered (before solving), and Sudoku grid after it is solved