{"id":17919385,"url":"https://github.com/eliben/go-sudoku","last_synced_at":"2025-07-19T21:34:01.077Z","repository":{"id":59045270,"uuid":"506061912","full_name":"eliben/go-sudoku","owner":"eliben","description":"Toolkit for solving and generating Sudoku puzzles in Go","archived":false,"fork":false,"pushed_at":"2024-08-28T03:01:34.000Z","size":130,"stargazers_count":95,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-15T08:09:11.408Z","etag":null,"topics":["algorithms","game","go","golang","sudoku","sudoku-solver","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-22T01:49:15.000Z","updated_at":"2025-06-04T22:53:32.000Z","dependencies_parsed_at":"2024-01-17T06:50:25.967Z","dependency_job_id":"6bebdce1-544d-4b24-bfb1-9a8f1dad6fc9","html_url":"https://github.com/eliben/go-sudoku","commit_stats":{"total_commits":107,"total_committers":4,"mean_commits":26.75,"dds":0.05607476635514019,"last_synced_commit":"39a7f6d7e78320c6fcaec00c987d6c853f3b820e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eliben/go-sudoku","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliben%2Fgo-sudoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliben%2Fgo-sudoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliben%2Fgo-sudoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliben%2Fgo-sudoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliben","download_url":"https://codeload.github.com/eliben/go-sudoku/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliben%2Fgo-sudoku/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266019657,"owners_count":23864916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","game","go","golang","sudoku","sudoku-solver","wasm","webassembly"],"created_at":"2024-10-28T20:16:26.066Z","updated_at":"2025-07-19T21:34:01.050Z","avatar_url":"https://github.com/eliben.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-sudoku\n\nThis is a toolkit for solving and generating [Sudoku\npuzzles](https://en.wikipedia.org/wiki/Sudoku) in Go.\n\n## What's inside\n\nAll the code is in a single top-level package: `sudoku`. It's broadly separated\ninto three parts:\n\n* `sudoku.go`: board representation and functions for parsing boards from\n  strings, emitting boards back to output and solving Sudoku puzzles. The\n  basic solver uses constraint propagation and recursive search and is based on\n  [Peter Norvig's old post](https://norvig.com/sudoku.html), although the Go\n  code is about 100x faster than Norvig's Python (faster compiled language but\n  also an optimized board representation).\n\n  Contains additional functionality like finding _all_ the solutions of a given\n  puzzle and not just a single solution.\n\n* `generator.go`: generate valid Sudoku puzzles that have a single solution.\n  The algorithm is based on a mish-mash of information found online and tweaked\n  by me. Contains additional functionality like generating _symmetrical_\n  Sudoku boards.\n\n  Note: generating hard-to-solve boards with a single solution is fairly\n  difficult. The best way to do this in practice seems to be to generate a\n  _large_ number of boards, sifting through them to find the hardest ones.\n  These boards can then be transformed in a myriad ways to retain the same\n  difficulty but look and feel very different (through swapping rows and\n  columns, rotations, and permuting the existing hint digits). Therefore,\n  a single genuienly hard board can be replayed in many different ways.\n\n* `difficulty.go`: code to evaluate the difficulty of a given Sudoku puzzle;\n  the approach was partially inspired by the paper \"Sudoku Puzzles Generating:\n  from Easy to Evil\" by Xiang-Sun ZHANG's research group.\n\nThe `cmd` directory has two command-line tools: `generator` and `solver` that\ndemonstrate the use of the package.\n\n## Testing\n\nSome tests take a while to run, so they are excluded if the `-short` testing\nflag is provided:\n\n    $ go test -v -short ./...\n\n## Generating printable boards\n\n`go-sudoku` includes some rudimentary functionality to emit a Sudoku board into\na printable SVG format, like this:\n\n![SVG board sample](/doc/genb.svg)\n\nYou can invoke the `cmd/generator` command with the `-svgout` flag to see this\nin action, or use the web interface.\n\n## Web interface\n\nThis repository includes a web interface for generating Sudoku puzzles, by\ncompiling the Go code to WebAssembly. To run it locally:\n\n\t\t$ cd cmd/wasm\n\t\t$ make build\n\t\t$ make serve\n\nThis will run a local webserver; open http://localhost:8899 in your browser\nto generate puzzles!\n\nThe repository also has a GitHub actions setup to automatically deploy the web\ninterface to https://eliben.github.io/go-sudoku on each commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliben%2Fgo-sudoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliben%2Fgo-sudoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliben%2Fgo-sudoku/lists"}