{"id":21113604,"url":"https://github.com/bencornelis/takuzu_solver","last_synced_at":"2026-04-24T18:10:59.610Z","repository":{"id":94219504,"uuid":"67359517","full_name":"bencornelis/takuzu_solver","owner":"bencornelis","description":"A program for solving Takuzu puzzles","archived":false,"fork":false,"pushed_at":"2017-10-20T19:49:17.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T10:26:48.479Z","etag":null,"topics":["rspec","ruby","strategy-pattern"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bencornelis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-09-04T17:43:38.000Z","updated_at":"2017-10-01T21:30:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"8fa691f9-8e51-4590-8018-f9595cd76126","html_url":"https://github.com/bencornelis/takuzu_solver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bencornelis/takuzu_solver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencornelis%2Ftakuzu_solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencornelis%2Ftakuzu_solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencornelis%2Ftakuzu_solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencornelis%2Ftakuzu_solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bencornelis","download_url":"https://codeload.github.com/bencornelis/takuzu_solver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencornelis%2Ftakuzu_solver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32234908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["rspec","ruby","strategy-pattern"],"created_at":"2024-11-20T01:57:16.020Z","updated_at":"2026-04-24T18:10:59.577Z","avatar_url":"https://github.com/bencornelis.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Takuzu Solver\n\nA ruby program for solving [takuzu](https://en.wikipedia.org/wiki/Takuzu) puzzles.\nYou can try takuzu out [here](http://0hh1.com/).\n\nInstead of brute force and backtracking, this program attempts to obtain the solution step by step, like a human. Because of this, it will not work on puzzles with multiple solutions.\n\nIt continuously applies three strategies (contained in `lib/strategy`) based on the rules:\n\n* `MatchingCounts`:\n  * each row and column should contain an equal number of 0s and 1s\n  * e.g. 1xx101 can be filled in as 100101\n* `ThreeInARow`:\n  * more than two of the same number can't be adjacent\n  * e.g. 00xxxx can be filled in as 001xxx and 1x1xxx as 101xxx\n* `IdenticalLines`:\n  * each row and column is unique\n  * e.g. given rows 100101 and 1001xx, the second can be filled in as 100110\n\nWhen applying all strategies successively to all rows and columns does not change the grid, it stops and prints the filled in grid.\n\n### Solving Puzzles\n\nEmpty spaces are represented with periods.\n\n```ruby\ngrid = %(\n1 0 . 0\n. . . 0\n1 . . .\n. . . 1\n)\n\nTakuzu.build(grid).solve\n\n1 0 1 0\n0 1 1 0\n1 0 0 1\n0 1 0 1\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencornelis%2Ftakuzu_solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbencornelis%2Ftakuzu_solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencornelis%2Ftakuzu_solver/lists"}