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.

Source Distribution

sudokulib-0.5a.tar.gz (4.0 kB view hashes)

Uploaded Source

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