Skip to main content

ai-Sudoku-Solver

Solving Sudoku Puzzles using Artificial Neural Networks

Downloads Downloads Downloads


Table of Contents


Installation

pip install ai-sudoku-solver

Usage

Instantiate a SudokuSolver object

from ai_sudoku_solver import SudokuSolver

solver = SudokuSolver("Ritvik19/sudoku-net-v1")

Call the model on your puzzles

puzzle = np.array([[
    [0, 0, 4, 3, 0, 0, 2, 0, 9],
    [0, 0, 5, 0, 0, 9, 0, 0, 1],
    [0, 7, 0, 0, 6, 0, 0, 4, 3],
    [0, 0, 6, 0, 0, 2, 0, 8, 7],
    [1, 9, 0, 0, 0, 7, 4, 0, 0],
    [0, 5, 0, 0, 8, 3, 0, 0, 0],
    [6, 0, 0, 0, 0, 0, 1, 0, 5],
    [0, 0, 3, 5, 0, 8, 6, 9, 0],
    [0, 4, 2, 9, 1, 0, 3, 0, 0]
]])
solution = solver(puzzle)
# array([[
#     [8, 6, 4, 3, 7, 1, 2, 5, 9],
#     [3, 2, 5, 8, 4, 9, 7, 6, 1],
#     [9, 7, 1, 2, 6, 5, 8, 4, 3],
#     [4, 3, 6, 1, 9, 2, 5, 8, 7],
#     [1, 9, 8, 6, 5, 7, 4, 3, 2],
#     [2, 5, 7, 4, 8, 3, 9, 1, 6],
#     [6, 8, 9, 7, 3, 4, 1, 2, 5],
#     [7, 1, 3, 5, 2, 8, 6, 9, 4],
#     [5, 4, 2, 9, 1, 6, 3, 7, 8]
# ]])

model # parameters trained on accuracy
sudoku-net-v1 3,784,729 1M puzzles 98.138
sudoku-net-v2 3,784,729 10M puzzles 98.212

References

  1. 1 million Sudoku games
  2. 9 Million Sudoku Puzzles and Solutions

Metadata

Release files for ai-sudoku-solver 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-sudoku-solver 1.0.7
File Size Uploaded Provenance Actions
ai-Sudoku-Solver-1.0.7.tar.gz 3.8 kB Without provenance Details for ai-Sudoku-Solver-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ai-sudoku-solver 1.0.7
File Interpreter ABI Platform Actions
ai_Sudoku_Solver-1.0.7-py3-none-any.whl Python 3 none any Details for ai_Sudoku_Solver-1.0.7-py3-none-any.whl

Total release size: 7.4 kB

Release files / ai-Sudoku-Solver-1.0.7.tar.gz

Download URL ai-Sudoku-Solver-1.0.7.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
59905f63d087a4538de84a9c839bea585c93025cd9bd6c595fd5cef6a0487ec4
BLAKE2b-256 checksum
How to use checksums
ee79e97d8a660f35fa217022730d1ea38f479a15ab821d4c08f6c02116b9f978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/4.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

Release files / ai_Sudoku_Solver-1.0.7-py3-none-any.whl

Download URL ai_Sudoku_Solver-1.0.7-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
120c43d097bce58d66544e2d3c50f9ab8fcdd16bb7c2a803e7007c51d3aa7188
BLAKE2b-256 checksum
How to use checksums
408696557b7007559ba4596be731a270aab96e7db2183b7effa9925f82a315d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/4.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

Security for ai-sudoku-solver 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page