{"repo":"valantonini/AStar","free":true,"listed":false,"github":"https://github.com/valantonini/AStar","clone":"git clone https://github.com/valantonini/AStar.git","description":"A 2D A Star (A*) pathfinding implementation in C# focused on ease of use and extension.","language":"C#","stars":157,"topics":["csharp","algorithms","pathfinding","game-development"],"license":"MIT","category":"game-templates","readme_excerpt":"A 2D A (A Star) algorithm for C# ===== The world is represented by a WorldGrid that is essentially a matrix of the C# short data type. A value of 0 indicates the cell is closed / blocked. Any other number indicates the cell is open and traversable. It is recommended to use 1 for open cells as numbers greater and less than 0 may be used to apply penalty or priority to movement through those nodes in the future. The WorldGrid can be indexed via either: 1) The provided Position struct where a row represents the vertical axis and column the horizontal axis (Similar to indexing into a matrix P rc ). 2) The C# Point struct that operates like a cartesian co-ordinate system where X represents the horizontal axis and Y represents the vertical axis (P xy ). Paths can be found using either Positions (matrix indexing) or Points (cartesian indexing). A Go version is also in to works Example usage Options - Allowing / restricting diagonal movement - A choice of heuristic (Manhattan, MaxDxDy, Euclidean, Diagonal shortcut) - The option to punish direction changes. - A search limit to short circuit the search FAQ q. why doesn't this algorithm always find the shortest path? a. A optimises speed over accuracy. Because the algorithm relies on a heuristic to determine the distances from start and finish, it won't necessarily produce the shortest path to the target. Changes from 1.1.0 to 1.3.0 - Introduced path weighting to favour or penalize cells. This is off by default and can be opted into usi","default_branch":null,"files":null,"tree":[],"storefront":"/r/valantonini","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/valantonini/AStar/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}