{"id":30673151,"url":"https://github.com/pikonha/8-puzzle","last_synced_at":"2025-09-01T05:41:38.040Z","repository":{"id":56558038,"uuid":"295261986","full_name":"pikonha/8-puzzle","owner":"pikonha","description":" 🕹 Implementation of a 8 puzzle game using traversal algorithms.","archived":false,"fork":false,"pushed_at":"2020-10-31T17:23:29.000Z","size":383,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T02:10:31.642Z","etag":null,"topics":["algorithms","breadth-first-search","data-structures","depth-first-search","hacktoberfest","puzzle","traversal-algorithms","uniform-cost-search"],"latest_commit_sha":null,"homepage":"https://picolloo.github.io/8-puzzle/","language":"JavaScript","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/pikonha.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}},"created_at":"2020-09-14T00:16:36.000Z","updated_at":"2021-03-02T00:38:22.000Z","dependencies_parsed_at":"2022-08-15T20:51:00.590Z","dependency_job_id":null,"html_url":"https://github.com/pikonha/8-puzzle","commit_stats":null,"previous_names":["pikonha/8-puzzle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pikonha/8-puzzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pikonha%2F8-puzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pikonha%2F8-puzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pikonha%2F8-puzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pikonha%2F8-puzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pikonha","download_url":"https://codeload.github.com/pikonha/8-puzzle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pikonha%2F8-puzzle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273077227,"owners_count":25041358,"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-09-01T02:00:09.058Z","response_time":120,"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":["algorithms","breadth-first-search","data-structures","depth-first-search","hacktoberfest","puzzle","traversal-algorithms","uniform-cost-search"],"created_at":"2025-09-01T05:41:29.642Z","updated_at":"2025-09-01T05:41:37.970Z","avatar_url":"https://github.com/pikonha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 8 Puzzle\n\nThis is an implementation of a 8 puzzle game being solved through traversal algorithms.\n\n## Roadmap\n\n- [ ] Depth first search\n- [ ] Breadth first search\n- [x] Uniform cost search\n- [x] A\\* search\n\n## Data structures\n\n- Depth first search\n  - Open nodes: **stack**\n- Breadth first search\n  - Open nodes: **queue**\n- Uniform cost search\n  - Open nodes: **sorted list**\n- A\\* search\n  - Open nodes: **sorted list**\n\n\u003e \"Half of the starting positions for the n puzzle are impossible to resolve.\"\n\u003e\n\u003e \u003ccite\u003eJohnson, Wm. Woolsey; Story, William E. (1879), [\"Notes on the \"15\" Puzzle\"](https://www.jstor.org/stable/2369492?origin=crossref\u0026seq=1#metadata_info_tab_contents)\u003c/cite\u003e\n\n## Tasks\n\n- Node\n  - [x] Structure\n  - [x] Is objective\n  - [x] Compare\n  - [x] Children\n- Open nodes\n  - [x] Structure\n    - [x] Queue\n      - [x] Find\n      - [x] Pop\n    - [x] SortedList\n      - [x] Sort\n      - [x] Find\n      - [x] Pop\n- Runtime\n  - [x] Interval\n  - [x] Generate random inital state\n- Search\n  - [x] Weights\n  - [x] Prediction heuristic\n\n## Bonus\n\n- [x] Display node\n- [x] Display solving process\n\n## References\n\n- [N-Puzzle solvability](https://en.wikipedia.org/wiki/15_puzzle#Solvability)\n- [Order array nulls last](https://stackoverflow.com/a/29829370/8500815)\n- [Generate initial state](https://stackoverflow.com/a/18650169/8500815)\n- [Swap array index](https://stackoverflow.com/questions/872310/javascript-swap-array-elements/14881632)\n- [Tree visualization](https://github.com/putuprema/BinarySearchTree-J)\n- [Generate random arbitrary](https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpikonha%2F8-puzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpikonha%2F8-puzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpikonha%2F8-puzzle/lists"}