{"id":18263074,"url":"https://github.com/baifei2014/pathfinding","last_synced_at":"2025-08-29T05:15:51.204Z","repository":{"id":203087630,"uuid":"708786820","full_name":"baifei2014/pathfinding","owner":"baifei2014","description":"pathfinding library about dijkstra and a_star algorithm","archived":false,"fork":false,"pushed_at":"2023-10-24T02:40:31.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T11:07:23.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/baifei2014.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":"2023-10-23T11:48:43.000Z","updated_at":"2023-10-23T11:49:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3ab2c71-fadf-45a9-a7f6-c8c5fa43b071","html_url":"https://github.com/baifei2014/pathfinding","commit_stats":null,"previous_names":["baifei2014/pathfinding"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baifei2014/pathfinding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baifei2014%2Fpathfinding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baifei2014%2Fpathfinding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baifei2014%2Fpathfinding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baifei2014%2Fpathfinding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baifei2014","download_url":"https://codeload.github.com/baifei2014/pathfinding/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baifei2014%2Fpathfinding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272633004,"owners_count":24967357,"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-08-29T02:00:10.610Z","response_time":87,"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":[],"created_at":"2024-11-05T11:09:48.304Z","updated_at":"2025-08-29T05:15:51.186Z","avatar_url":"https://github.com/baifei2014.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\npathfinding library about dijkstra and a_star algorithm\n\n## Examples\n\nThe following are demonstration examples of two algorithms\n\n### Dijkstra\n\n#### first step\n\n- generate graph\n- define start, goal\n- define cost of cost so far and shortest path by came from\n\n```go\ngraph := implementions.MakeDiagram4()\n\nstart := implementions.Location{X: 1, Y: 4}\ngoal := implementions.Location{X: 8, Y: 5}\n\ncame_from := map[implementions.Location]implementions.Location{}\ncost_so_far := map[implementions.Location]int{}\n```\n\n#### second step\n\n- do search\n- construct path\n\n```go\nimplementions.DijkstraSearch(graph, start, goal, came_from, cost_so_far)\n\npath := implementions.ReconstructPath(start, goal, came_from)\n```\n\n#### third step\n\n- draw path on graph\n\n```go\nimplementions.DrawGrid(graph, path)\n```\n\n### A_Star|A*\n\n#### first step\n\n- generate graph\n- define start, goal\n- define cost of cost so far and shortest path by came from\n\n```go\ngraph := implementions.MakeDiagram4()\n\nstart := implementions.Location{X: 1, Y: 4}\ngoal := implementions.Location{X: 8, Y: 5}\n\ncame_from := map[implementions.Location]implementions.Location{}\ncost_so_far := map[implementions.Location]int{}\n```\n\n#### second step\n\n- do search\n- construct path\n\n```go\nimplementions.AStarSearch(graph, start, goal, came_from, cost_so_far)\n\npath := implementions.ReconstructPath(start, goal, came_from)\n```\n\n#### third step\n\n- draw path on graph\n\n```go\nimplementions.DrawGrid(graph, path)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaifei2014%2Fpathfinding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaifei2014%2Fpathfinding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaifei2014%2Fpathfinding/lists"}