Skip to main content

The SMT Sudoku Sensei

Project description

License: CC BY 4.0 PyPI version PyPI Statistics

SudukoSensei

SudokuSensei

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 sudokusensei

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, see the screen shot above.

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.

Options

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 (AKA Freeping Creaturism)

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.

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).

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

  • [1] The Math behind Sudoku. Cornell Math Explorer's Club.

  • [2] Graphical User Interfaces. Lynn Root.

  • [3] Generating difficult Sudoku puzzles quickly. Daniel Beer.

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.1-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sudokusensei-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 53.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a5f0663b68b1de09ea5039080078576048d2938c6a781d9c430c4fdfd408eded
MD5 23b46221264499cfb70fae5e3746a8d8
BLAKE2b-256 735118f55ad1697bed9a329aa905b3df1ed0e2db353318057222c0ffdff4eddf

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