Skip to main content

Tools for generating solutions and starting grids for Sudoku.

Project description

sudokulib is a collection of tools that are useful for generating solutions to Sudoku puzzles. It uses a recursive backtracking algorithm (originally written by Jeremy Brown, Cel DeşŸtept), and is capable of generating a 3x3 Sudoku in ~0.015 seconds. It can also generate 4x4 Sudokus in ~0.100 seconds (sometimes longer).

Some 5x5 grids have been generated in a matter of seconds using this library, but I’ve also seen the program run for hours without successfully generating a 5x5. Anything beyond 5x5 always seems to take a long time.

The library also provides utilities for generating starting grids, so you can play Sudoku instead of just generating solutions. There are several difficulty levels to choose from.

Project details

Download files

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

Files for sudokulib, version 0.5a
Filename, size File type Python version Upload date Hashes
Filename, size sudokulib-0.5a.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page