Skip to main content

The SMT Sudoku Sensei

Project description

License: CC BY 4.0

SudukoSensei

A Playground for testing our SMT's python bindings, learning tkinter, solving Sudoku puzzles, trying to give hints, and delving into the intracies of generating sudoku puzzles, measuring their difficulty, and the list goes on.

The tool is in a pretty good state. Play with it. Let me know what else it needs, or needs explaining.

Prerequisites

You need a newish Python, I quite like and make use of the new format strings, so you will need at least 3.6.

The software is packaged as a pip package, but to install it successfully you will first need to install yices which can be done by building from source, or using apt on linux (from our PPA) or homebrew on a mac, the README.md there describes the process.

So you can either do

pip install sudoku

or if you want to hack, clone this repository and do

make develop

Usage

There is a make file that will build and install the package. Once installed, you start of with an empty board

sudokusensei

If you press the options button you will be able to load one of our many predefined boards in the
data directory, and you can also directly launch one of these via

sudokusensei --board <board base name>

For example:

sudokusensei --board  sofa

will start you off with the puzzle that Daniel Beer (@dlbeer) mentions in showing the difference in difficulty between sofa and non-sofa search, see the references below.

Another example would be

sudokusensei --board  hardest

which will start you off with the puzzle that Finnish mathematician Arto Inkala claimed is the hardest one possible.

Once you have the puppy up you can always generate new puzzles. The options tab will allow you to attempt to specify the level of difficulty of the generated puzzle.

You can even use the tool to create your own Sudoku puzzles, just start with an empty board, and make use of the Show > # Solutions feature to make sure your puzzle has a unique solution. You can save it from the options tab.

Bells and Whistles

The tool can do lots of things. Instead of writing a well structured guide, I am going to just list the features as they occur to me. Sorry.

  • Freedom Analysis: you can look at the freedom analysis of the puzzle via Show > Freedom, and get rid of them via Clear > Freedom.

  • Notes: you can make notes by simply entering multiple numbers, the same number entered twice will toggle that number in or out. If you are really lazy you can start off your notes from the freedom analysis (Show > Freedom Notes).

Acknowledgments

This project was built on top of the nice python tutorial by @econchic who is hereby thanked. The tutorial is under the creative commons license which does not appear to be an option in GitHub's license widget, consequently I choose the nearest one I could, if this is a problem let me know.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

sudokusensei-1.0.0-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file sudokusensei-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sudokusensei-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 52.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for sudokusensei-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e8c07e2e9217ea2379c28a681e6e73f0f79554eb1390d75f0245558b1652813
MD5 26e65b8d708ea6db4e1acd8b5df4b25b
BLAKE2b-256 fa0ba774bdc34dc8246baf8ab0a9654b9677ed6bd81cd68a47196a3fe41d394f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page