A Proof of Concept(P.O.C) app that aims at solving every possible sudoku in an efficient manner
Sudoku is a logic-based, combinatorial number-placement puzzle. In classic Sudoku, the objective is to fill a 9 Γ 9 grid with digits so that each column, each row, and each of the nine 3 Γ 3 subgrids that compose the grid (also called "boxes", "blocks", or "regions") contain all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which for a well-posed puzzle has a single solution.
The basic Sudoku problem can be modeled with constraint programming by a combination of all different constraints. Using different consistency techniques for these constraints we derive several propagation schemes with differing strengths. We can extend the model either by shaving, testing each value in each domain with a one-step lookahead technique or by adding redundant constraints.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
To run and modify the project easily you should install:
The current script has 5 files that each contain a sudoku board. To run all tests open a terminal at the project folder and run the following command:
- on Windows:
py solver/main.py --test -1
- on MacOS/Linux:
python3 solver/main.py --test -1
To find more about the way this script runs read the following section.
The script currently provides 2 options of running:
- --filepath - which allows you to specify the path to a file which contains the board you want the program to solve
- --test - which allow you to specify the number of the test you want the script to solve (tests can be found in the data folder)
If you want to find more about the command line argument run the following command:
- on Windows:
py solver/main.py -h
- on MacOS/Linux:
python3 solver/main.py -h
- Python 3 - which contains the python virtual machine (PVM) necessary to run the app
- @gabriel-rusu - Idea & Initial work