A Sudoku solver written in C with a Python GUI frontend.
- Solver written in C using bitmask techniques and constraint propagation
- MRV (Minimum Remaining Values) to minimize backtracking
- Naked singles detection for efficient solving
- Python GUI for an easy, interactive experience
- GCC (or any C compiler)
- Python 3.x with
tkinter
1. Clone the repository
git clone https://github.com/iiEliJas/SuSoGUI.git2. Compile the C library
gcc -O2 -shared -fPIC -o lib/sudoku.so src/sudoku.c3. Launch the GUI
python sudokuUI.pySuSoGUI/
├── src/
│ └── sudoku.c # Core solver (C)
├── lib/
│ └── sudoku.so # Compiled shared library
└── sudokuUI.py # Python GUI (tkinter)
The solver (src/sudoku.c) is compiled as a shared library and called in sudoku.py via ctypes. The GUI is built with tkinter. The solver works with:
- Bitmasks to track digit usage across rows, columns and boxes in O(1)
- Constraint propagation to fill forced cells before branching
- Backtracking with MRV to pick the best cells first
Distributed under the MIT License.
