Sign inSign up

jotools/sudoku

By jotools

Updated 9 months ago

Sudoku DLX Solver & Generator | Web Application | API

Image
Developer tools
1

1.0K

jotools/sudoku repository overview

Sudoku

This Image provides a Sudoku DLX Solver & Generator as a Web Application and a Web API (on Port 80). The Web Application is written in Xojo.

  • Sudoku Sizes: 4x4 | 6x6 | 8x8 | 9x9 | 12x12 | 16x16
  • The solver uses Dancing Links (DLX) - Knuth's Algorithm X - for all solving operations. DLX models Sudoku as an exact cover problem with a sparse matrix representation, enabling fast solving even for larger grid sizes (12x12, 16x16)

Docker Image Information

Use at your own risk...

Sudoku Web Application

The Web Application can be used with it's User Interface.
Sudoku Puzzles can be exported as JSON or Text (these files can be opened in the corresponding Desktop Application), or downloaded as PDF.

Sudoku API

The Web Application also provides an API to generate and solve Sudoku Puzzles.
See also the Postman Collection in the Source Code GitHub: jotools/sudoku.

Endpoints:

  • GET: /api/sudoku/info
    Returns JSON information about the Web Application
  • GET: /api/sudoku/generate?size=9&numClues=40&format=json&addSolution=false
    Generates a Sudoku according to the Query Params:
    • size: Sudoku Size (4, 6, 8, 9, 12, 16; Default: 9)
    • numClues: Desired Number of Clues (not guaranteed to be reached)
      (Min: 30% of n*n; Default: 45% of n*n)
    • format: Download Format (Available: [json | txt | pdf]; Default: json)
    • addSolution: Add Solution in Response (Default: false; not available in Format txt)
  • POST: /api/sudoku/solve?format=json
    Solves the posted Sudoku Puzzle.
    The Body Content can be either in Text or Json Format.
    • format: Response Format (Available: [json | txt]; Default: empty - returns in posted format)

Tag summary

Content type

Image

Digest

sha256:0cbf056d4

Size

156 MB

Last updated

9 months ago

docker pull jotools/sudoku