{"id":20323708,"url":"https://github.com/erthium/hashiwokakero","last_synced_at":"2025-09-22T23:31:46.107Z","repository":{"id":210761222,"uuid":"727076966","full_name":"erthium/hashiwokakero","owner":"erthium","description":"Generator and solver algorithm repertoire for the logic puzzle Hashiwokakero.","archived":false,"fork":false,"pushed_at":"2024-10-11T05:53:36.000Z","size":216,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-14T19:36:30.293Z","etag":null,"topics":["cpp","puzzle","puzzle-generator","puzzle-solver","pygame","python","sdl2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erthium.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":"2023-12-04T06:11:31.000Z","updated_at":"2024-10-17T14:50:55.000Z","dependencies_parsed_at":"2024-02-27T11:51:01.234Z","dependency_job_id":null,"html_url":"https://github.com/erthium/hashiwokakero","commit_stats":null,"previous_names":["ertyumpx/hashiwokakero","erthium/hashiwokakero"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fhashiwokakero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fhashiwokakero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fhashiwokakero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erthium%2Fhashiwokakero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erthium","download_url":"https://codeload.github.com/erthium/hashiwokakero/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233905073,"owners_count":18748581,"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":["cpp","puzzle","puzzle-generator","puzzle-solver","pygame","python","sdl2"],"created_at":"2024-11-14T19:29:22.866Z","updated_at":"2025-09-22T23:31:40.714Z","avatar_url":"https://github.com/erthium.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hashiwokakero Puzzle\n\nGenerator and solver algorithm repertoire for the Japanese logic puzzle Hashiwokakero - aka Hashi - created by Nikoli.\n\nThe project is still being worked on, check [issues](https://github.com/ErtyumPX/hashiwokakero/issues) and [milestones](https://github.com/ErtyumPX/hashiwokakero/milestones) for the process.\n\n## License\n\nThis project is licensed under the [GNU GPL-3.0](https://github.com/ErtyumPX/hashiwokakero/blob/main/LICENSE) license.\n\nMain purpose is to provide a free and open-source software for puzzle enthusiasts. Feel free to use the source code. Referring to the repository would be very much appreciated.\n\n## Setup\n\nThe project is written in Python 3.11.6, although should work on any Python Interpreter above 3.5.x.\n\nApart from built-in packages, only third party package is PyGame 2.5.2 with SDL 2.28.2.\n\nFor easy setup, create a python virtual environment and run:\n    \n```bash\nmake init\n```\n\nMass puzzle generation scrips are currently being worked on, see [ISSUE#3](https://github.com/ErtyumPX/hashiwokakero/issues/3).\n\nYou can easily clone or fork the project, see below to find how to use source scripts.\n\n## Puzzle\n\nSimplyfied rules from [Wikipedia](https://en.wikipedia.org/wiki/Hashiwokakero).\n\nPlayed in rectangular grid. Encircled cells are islands numbers from 1 to 8 inclusive. The rest of the cells are empty.\n\nThe goal is to connect all of the islands by drawing a series of bridges between the islands. \n\nThe bridges must follow certain criteria:\n- All islands must be connected.\n- Bridged cannot cross.\n- Bridges are only established orthogonally, never diagonally.\n- At most two bridges connect a pair of islands.\n- An island must hold bridges that mathces it's own number.\n\nPlot-twist is that there may not be only 1 solution. Sometimes the structure of the board allows to have 2 different ways to go and still fulfill all the rules.\n\n\u003cimg src=\"https://github.com/ErtyumPX/hashiwokakero/assets/49292808/d4093342-5ae5-43e2-8fda-da4ad8901cec\" width=\"250\" height=\"250\" title=\"Unsolved Hashi\"\u003e\n\u003cimg src=\"https://github.com/ErtyumPX/hashiwokakero/assets/49292808/3e6096df-abb5-4f02-a41e-70d7056f9337\" width=\"250\" height=\"250 title=\"Solved Hashi\"\u003e\n\n## General Structure\n\n### Terminology\n\n**Generator**\n\nFull Grid: A grid that satisfies given w and h dimensions and has no empty edges.\n\nCycle Step: Iteration count of the generator algorithm. Since generation is random, \nit may not reach that iteration count. Still is important if the user wants to stop \ngenerating at some point\n\nMax Puzzle: A puzzle which cannot be extended anymore, which has no node that could \npotentially have another bridge in an empty direction.\n\n\n**Solver**\n\nCompleted Grid: A grid that is completely solved.\n\nSolving by Rules: Solving the puzzle by using the rules of the game, without any brute force method.\n\nSolving by Brute Force: Solving the puzzle by trying all possible combinations of bridges. This method is used after solving by rules method is tried but the puzzle is still not completed. This occures because of the nature of Hashi, sometimes there could be more than 1 way to go and the rules are not enough to solve the puzzle.\n\n\n### Generator Algorithm\n\nWill be written soon...\n\n### Solver Algorithm\n\nWill be written soon...\n\n### Difficulty Precision and Mass Generation\n\nWill be written soon...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferthium%2Fhashiwokakero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferthium%2Fhashiwokakero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferthium%2Fhashiwokakero/lists"}