{"id":21560649,"url":"https://github.com/armanx200/8-puzzle","last_synced_at":"2025-04-30T13:12:18.573Z","repository":{"id":220495960,"uuid":"751793792","full_name":"Armanx200/8-Puzzle","owner":"Armanx200","description":"This Python script demonstrates a solution to the classic 8-puzzle problem using the A* search algorithm with the Manhattan distance heuristic.","archived":false,"fork":false,"pushed_at":"2024-04-24T16:52:08.000Z","size":6,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-24T09:16:37.235Z","etag":null,"topics":["arman-kianian","astar-algorithm","github","machine-learning","python"],"latest_commit_sha":null,"homepage":"https://github.com/Armanx200","language":"Python","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/Armanx200.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}},"created_at":"2024-02-02T10:44:21.000Z","updated_at":"2024-09-04T13:42:48.000Z","dependencies_parsed_at":"2024-02-02T11:54:02.686Z","dependency_job_id":null,"html_url":"https://github.com/Armanx200/8-Puzzle","commit_stats":null,"previous_names":["armanx200/8-puzzle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armanx200%2F8-Puzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armanx200%2F8-Puzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armanx200%2F8-Puzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Armanx200%2F8-Puzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Armanx200","download_url":"https://codeload.github.com/Armanx200/8-Puzzle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235426488,"owners_count":18988420,"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":["arman-kianian","astar-algorithm","github","machine-learning","python"],"created_at":"2024-11-24T09:16:39.598Z","updated_at":"2025-01-24T11:13:58.208Z","avatar_url":"https://github.com/Armanx200.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 8-Puzzle\nThis Python script demonstrates a solution to the classic 8-puzzle problem using the A* search algorithm with the Manhattan distance heuristic. The code includes a PuzzleNode class representing states in the puzzle search space, and the a_star function performs the search to find the optimal solution path.\n\nPuzzleNode Class\n- Represents a node in the puzzle search space with state, parent, action, and depth attributes.\n- Implements comparison, equality, and hash functions for use in A* search.\n- Checks if the node's state matches the goal state and finds the position of the blank (0) in the puzzle.\n- Generates child nodes by making valid moves from the current state.\n- Calculates the Manhattan distance heuristic for the node's state.\nA* Search Algorithm\n- Utilizes a priority queue (heapq) to explore nodes with lower total costs first.\n- The main loop continues until the goal state is reached or no solution is found.\n- Explores child nodes, considering their cost and heuristic value, and updates the frontier and explored sets accordingly.\nExample Usage\n- The script includes an example usage section with a predefined initial state.\n- If a solution is found, it prints the solution path with each step, otherwise, it indicates that no solution was found.\nArman Kianian\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanx200%2F8-puzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmanx200%2F8-puzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanx200%2F8-puzzle/lists"}