Inspiration
This is our first hackathon, so we wanted to create a simpler project that would allow us to explore a new algorithm (backtracking).
What it does
This project uses a combination of a logical approach and backtracking to efficiently and recursively solve any Sudoku puzzle with at least 17 initial clues.
How I built it
The project is split into two modules, board.py and solver.py. MVC principles are employed - board.py acts as the model and solver.py functions as a view and controller. The program also uses Tkinter to display the board graphically.
Challenges I ran into
Combining the logical and backtracking approaches into a single algorithm was challenging to debug - this was solved by carefully writing unit tests and doing some research of our own.
Accomplishments that I'm proud of
The solver was able to successfully solve 1000 test puzzles in less than 1 second each, and we were able to verify that our custom algorithm works correctly.
What I learned
We learned the importance of unit testing and breakpoint debugging with Python (specifically unittest and pdb).
What's next for Sudoku Solver
We would like to expand the logical capabilities of the solver (so that it needs to resort to backtracking less often) and possible turn the design into a website or mobile application.
Built With
- python
- tkinter
Log in or sign up for Devpost to join the conversation.