A python script that solves sudokus using back propagation
Just execute the main file
python main.pyTo customize the sudoku solver you can modify tha constants at the start
of the main.py file
# in main.py
FILE_PATH = 'example.csv'
ACTIVATE_GUI = True
FPS = 10The script is extremly slow and it is used only for graphical demostrations,
to use this script as efficently as possilbe set the ACTIVATE_GUI in the main.py file to False
ACTIVATE_GUI = FalseThe algoritm creates two arrays, one with the original values and the other with the current attemp, an index is used to keep track of the value that is currently beeing changed, if the index is inside a cell with an original value than that cell is skipped, otherwise the value of the cell is incremented by one and the validity of the current configuration is checked.
| File | Description |
|---|---|
main.py |
main executable |
sudoku.py |
responsible for sudoku checking and value storing |
window.py |
responsible for GUIs and visualizations |