https://github.com/kaleidophon/shiny-robot
Analyzing how the spatial distribution of given number in a sudoku influences the difficulty for a SAT solver.
https://github.com/kaleidophon/shiny-robot
dispersion sat-solver sudoku
Last synced: 6 months ago
JSON representation
Analyzing how the spatial distribution of given number in a sudoku influences the difficulty for a SAT solver.
- Host: GitHub
- URL: https://github.com/kaleidophon/shiny-robot
- Owner: Kaleidophon
- Created: 2017-09-14T18:47:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-04T10:14:32.000Z (about 8 years ago)
- Last Synced: 2025-02-08T09:46:59.728Z (8 months ago)
- Topics: dispersion, sat-solver, sudoku
- Language: Python
- Homepage:
- Size: 1.94 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shiny-robot
### Analyzing how the spatial distribution of given number in a sudoku influences the difficulty for a SAT solver.
The goal of this project was to examine whether the spatial distribution of given number has an influence onto the
difficulty of a sudoku for a satisfiability solver.Therefore, different metrics were developed and tested, mainly the average distance between all given numbers in the
sudoku grid, the average distance of all given numbers to their common centroid and the sudokus shannon entropy.In the end, no correlation between the number of conflicts during the solving process and the measure dispersion metrics
was found.
## Content
* `data`: Data sets used in this project (10k sudokus with 25 given number and 49k with 17)
* `img`: Pictures and plots produced during this project.
* `results`: Text output of experiments.
* `experiments`:
* `distances.py`: Implementing different metrics to measure dispersion.
* `entropy.py`: Implementing Shannon entropy for sudokus to measure dispersion.
* `evaluation.py`: Evaluate the final hypothesis.
* `extremes.py`: Try to generate sudokus with extremely low / high dispersion.
* `metrics.py`: See if dispersion metrics are correlated.
* `general.py`: Implement classes and function used in many parts of the project (sudoku and sudoku collection class etc.)
* `sudoku_solver.py`: SAT solver to solve sudokus with efficient encoding.
* `terminal_py_solve.py`: Helper script for SAT solver.## Usage
This projec thas been written in `Python 3`. To use the project, install the requirements using the following command:
pip3 install -r requirements.txt
For annoying reason, you also have to install the `Python 2` version of `numpy`:pip install numpy
Afterwards, you can execute all the experiments by just executing their respective module, e.g.:python3 experiments/evaluation.py