{"id":26959062,"url":"https://github.com/xzripper/astard","last_synced_at":"2026-01-16T00:49:37.675Z","repository":{"id":283193753,"uuid":"950987181","full_name":"xzripper/AStarD","owner":"xzripper","description":"A* (A-Star) search algorithm for 2D spaces (grids) for D.","archived":false,"fork":false,"pushed_at":"2025-03-19T02:34:17.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T02:39:04.474Z","etag":null,"topics":["2d","algorithm","algorithms","astar","astar-algorithm","astar-pathfinding","d","game-development","pathfinding"],"latest_commit_sha":null,"homepage":"https://github.com/xzripper/AStarD","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xzripper.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":"2025-03-19T01:48:47.000Z","updated_at":"2025-03-19T02:35:29.000Z","dependencies_parsed_at":"2025-03-19T02:39:06.043Z","dependency_job_id":"e84e3863-de45-40ec-80cc-c78fdb30326b","html_url":"https://github.com/xzripper/AStarD","commit_stats":null,"previous_names":["xzripper/astard"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2FAStarD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2FAStarD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2FAStarD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2FAStarD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xzripper","download_url":"https://codeload.github.com/xzripper/AStarD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246939247,"owners_count":20857916,"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":["2d","algorithm","algorithms","astar","astar-algorithm","astar-pathfinding","d","game-development","pathfinding"],"created_at":"2025-04-03T04:34:19.811Z","updated_at":"2026-01-16T00:49:37.670Z","avatar_url":"https://github.com/xzripper.png","language":"D","readme":"# AStarD\nA* (A-Star) search algorithm for 2D spaces (grids) with straightforward/diagonal movement with 4 available heuristics:\n- **Manhattan**\n- **Euclidean**\n- **Octile**\n- **Chebyshev**\n\nAStarD is extremely easy to use, while its performance fits within the average A* execution time.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/8f7e315c-2bba-4262-b8a0-174234545af0\" width=\"600\"\u003e\u003cbr\u003e\u003ccode\u003e[[0, 0], [1, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 8], [9, 8]]\u003c/code\u003e\u003c/p\u003e\n\n```d\nimport AStarD.AStar;\n\nvoid main() {\n    int[][] grid = [\n        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0],\n        [0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0],\n        [1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0],\n        [0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],\n        [0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0],\n        [1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0],\n        [0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1],\n        [0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0],\n        [1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],\n        [0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0],\n        [1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1],\n        [0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1],\n        [0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1],\n        [1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0],\n        [1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0],\n        [0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0]\n    ];\n\n    AStar(grid, [0, 0], [9, 8], Heuristic.MANHATTAN, true); // Returns [[0, 0], [1, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 8], [9, 8]]\n}\n```\n\n**`AStar` signature:\u003cbr\u003e`ASPath ASter(Grid2D p_Grid, Position2D p_Start, Position2D p_Target, Heuristic p_Heuristic, bool p_AllowDiagonalMovement)`\u003cbr\u003eWhere `ASPath` is `int[2][]`,\u003cbr\u003e`Grid2D` is `int[][]`,\u003cbr\u003e`Position2D` is `int[2]`.**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzripper%2Fastard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxzripper%2Fastard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzripper%2Fastard/lists"}