{"id":34696771,"url":"https://github.com/lesander/takuzu","last_synced_at":"2026-05-27T10:02:25.168Z","repository":{"id":37658240,"uuid":"265910685","full_name":"lesander/takuzu","owner":"lesander","description":"A binary puzzle (takuzu) solver written in python.","archived":false,"fork":false,"pushed_at":"2022-06-22T02:06:47.000Z","size":8,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-13T16:24:24.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/lesander.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}},"created_at":"2020-05-21T17:28:17.000Z","updated_at":"2023-03-08T04:11:28.000Z","dependencies_parsed_at":"2022-09-15T00:51:18.798Z","dependency_job_id":null,"html_url":"https://github.com/lesander/takuzu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lesander/takuzu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesander%2Ftakuzu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesander%2Ftakuzu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesander%2Ftakuzu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesander%2Ftakuzu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lesander","download_url":"https://codeload.github.com/lesander/takuzu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesander%2Ftakuzu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33560727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":[],"created_at":"2025-12-24T22:36:11.074Z","updated_at":"2026-05-27T10:02:25.161Z","avatar_url":"https://github.com/lesander.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# takuzu\nA basic binary / takuzu puzzle solver written in Python 3.\n\nImplemented [rules](https://en.wikipedia.org/wiki/Takuzu) (2/4):\n1. Each row and each column must contain an equal number of 0s and 1s;\n2. More than two of the same digits can't be adjacent;\n3. ~Eliminate the impossible;~\n4. ~Each column and row is unique.~\n\n## Installation\n```shell\n$ git clone https://github.com/lesander/takuzu.git \u0026\u0026 cd takuzu\n$ pip3 install -r requirements.txt\n```\n\n## Usage\n```python\nfrom takuzu import Takuzu\nboard = [[None, 1,    None, 0],\n      \t [None, None, 0,    None],\n      \t [None, 0,    None, None],\n      \t [1,    1,    None, 0]]\ntakuzu = Takuzu(board=board, debug=False, silent=False)\nresult = takuzu.solve()\nprint(result)\n\n\"\"\"\nresult =\n[[0, 1, 1, 0],\n [1, 0, 0, 1],\n [0, 0, 1, 1],\n [1, 1, 0, 0]]\n\"\"\"\n```\n\nYou can compare the result with a known solution.\n```python\ntakuzu.check(solution) # returns True or AssertionError\n```\n\n## Testing\nSome scenarios can be tested.\n\n```shell\n$ python3 -m invalid_boards\n$ python3 -m tests.4x4\n$ python3 -m tests.12x12\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesander%2Ftakuzu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flesander%2Ftakuzu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesander%2Ftakuzu/lists"}