{"id":16113285,"url":"https://github.com/patryk27/nonogram-solver","last_synced_at":"2025-08-02T12:09:42.929Z","repository":{"id":230608611,"uuid":"779779449","full_name":"Patryk27/nonogram-solver","owner":"Patryk27","description":"Solves monochromatic nonograms, powered by Rust and Z3","archived":false,"fork":false,"pushed_at":"2024-03-30T19:15:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-24T21:58:31.778Z","etag":null,"topics":["crossword","nonogram","nonograms","puzzle","rust","sat","z3"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Patryk27.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}},"created_at":"2024-03-30T19:06:25.000Z","updated_at":"2024-03-30T19:10:19.000Z","dependencies_parsed_at":"2024-03-30T20:25:11.443Z","dependency_job_id":"27b4f620-eea0-43fe-a139-b294d7d38784","html_url":"https://github.com/Patryk27/nonogram-solver","commit_stats":null,"previous_names":["patryk27/nonogram-solver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Patryk27/nonogram-solver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patryk27%2Fnonogram-solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patryk27%2Fnonogram-solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patryk27%2Fnonogram-solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patryk27%2Fnonogram-solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Patryk27","download_url":"https://codeload.github.com/Patryk27/nonogram-solver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patryk27%2Fnonogram-solver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268385863,"owners_count":24242105,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["crossword","nonogram","nonograms","puzzle","rust","sat","z3"],"created_at":"2024-10-09T20:10:49.369Z","updated_at":"2025-08-02T12:09:42.902Z","avatar_url":"https://github.com/Patryk27.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nonogram-solver\n\nSolves monochromatic [nonograms](https://en.wikipedia.org/wiki/Nonogram),\npowered Rust and Z3, pretty rudimentary.\n\n## Usage\n\n(requires rustup and z3)\n\n``` \n$ cargo run -- \\\n     --cols '1|1|2|4|7|9|2,8|1,8|8|1,9|2,7|3,4|6,4|8,5|1,11|1,7|8|1,4,8|6,8|4,7|2,4|1,4|5|1,4|1,5|7|5|3|1|1' \\\n     --rows '8,7,5,7|5,4,3,3|3,3,2,3|4,3,2,2|3,3,2,2|3,4,2,2|4,5,2|3,5,1|4,3,2|3,4,2|4,4,2|3,6,2|3,2,3,1|4,3,4,2|3,2,3,2|6,5|4,5|3,3|3,3|1,1'\n\n# https://en.wikipedia.org/wiki/Nonogram#/media/File:Nonogram_wiki.svg\n```\n\n```\n******** ******* ***** *******\n  *****   ****    ***    ***  \n   ***     ***    **     ***  \n   ****     ***   **     **   \n    ***     ***  **      **   \n    ***     **** **     **    \n    ****     *****      **    \n     ***     *****      *     \n     ****     ***      **     \n      ***     ****     **     \n      ****    ****    **      \n       ***   ******   **      \n       ***   ** ***   *       \n       **** *** **** **       \n        *** **   *** **       \n        ******   *****        \n         ****    *****        \n         ***      ***         \n         ***      ***         \n          *        *\n```\n\n## Implementation\n\nNonogram can be represented as a set of regular expressions - e.g. column with\nnumbers `1` and `8` is:\n\n```\n^[ ]*\\*{1}[ ]+\\*{8}[ ]*$\n```\n\n... or, with a couple of comments:\n\n```\n^ [ ]* \\*{1} [ ]+ \\*{8} [ ]* $\n  1--- 2---- 3--- 4---- 5--- \n\n1 - any number of leading spaces\n2 - exactly one asterisk\n3 - at least one separating space\n4 - exactly eight asterisks\n5 - any number of trailing spaces\n```\n\nFollowing on this, nonogram-solver builds a regular expression for each column\nand row, then sends those constraints to Z3 and parses its response back.\n\n## License\n\nCopyright (c) 2024, Patryk Wychowaniec, \u003cpwychowaniec@pm.me\u003e\n\nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatryk27%2Fnonogram-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatryk27%2Fnonogram-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatryk27%2Fnonogram-solver/lists"}