{"id":17918612,"url":"https://github.com/ollevche/n-puzzle","last_synced_at":"2025-04-03T08:29:23.157Z","repository":{"id":101917071,"uuid":"214697570","full_name":"ollevche/n-puzzle","owner":"ollevche","description":":1234: N-Puzzle solver built up on A* (with modifications), Greedy and Uniform Cost search algorithms. Available Heuristics are one of Manhattan, Hamming and Euclidean","archived":false,"fork":false,"pushed_at":"2021-01-31T21:12:37.000Z","size":1540,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T22:12:06.016Z","etag":null,"topics":["astar","astar-algorithm","euclidian","greedy","hamming","heuristics","manhattan","npuzzle-solver","uniform-cost-search"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ollevche.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":"2019-10-12T18:42:15.000Z","updated_at":"2021-03-13T18:58:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"766a6c97-6c41-4496-8362-1328a8e9fc24","html_url":"https://github.com/ollevche/n-puzzle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fn-puzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fn-puzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fn-puzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollevche%2Fn-puzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollevche","download_url":"https://codeload.github.com/ollevche/n-puzzle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246964902,"owners_count":20861760,"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":["astar","astar-algorithm","euclidian","greedy","hamming","heuristics","manhattan","npuzzle-solver","uniform-cost-search"],"created_at":"2024-10-28T20:11:59.674Z","updated_at":"2025-04-03T08:29:23.132Z","avatar_url":"https://github.com/ollevche.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :1234: N-puzzle\nSolver of an N-Puzzle that uses a modified version of A*, Greedy and Uniform Cost search algorithms.\nYou can choose between Manhattan, Hamming or Euclidean admissable heuristics.\n\n## How to use\n\n Run using the gradle wrapper\n\n  ```./gradlew run```\n  \n This will build the app; generate a random 3x3 puzzle (8-puzzle) and solve it using A* and Manhattan heuristic.\n Program args can be modified in the build.gradle:\n * -a \\\u003calgorithm\\\u003e - one of the three algorithms\n * -h \\\u003cheuristic\\\u003e - required for astar and greedy; forbidden for uniform\n * -r \\\u003cN\\\u003e - optional; will genereate a N*N solvable puzzle\n * -f \\\u003cfile path\\\u003e - optional; will read the input from file\n *   | - optional; repeatable; gives the possibility to enter args again; will run another solver in a separate thread;\n     * so ```['-a astar -h manhattan -r 3 | -a astar -h euclidean -r 4']``` will solve two puzzles in parallel\n \n #### If no argument for the input source is provided, you will be promted to manually enter input in the following format:\n ```\n 3\n 1 2 3\n 4 5 6\n 7 8 0\n ```\n \n  #### Some puzzles may be unsolvable. The solution is in snail format:\n ```\n 1 2 3\n 8 0 4\n 7 6 5\n ```\n\n## How to test\n\nYou can run all the tests using ``` ./gradlew test ``` or individual tests using ```./gradlew test --tests \u003ctest Class/Method\u003e```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follevche%2Fn-puzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follevche%2Fn-puzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follevche%2Fn-puzzle/lists"}