Skip to content
/ AStar Public
forked from valantonini/AStar

A Star (A*) algorithm in C# focused on performance/features

License

Notifications You must be signed in to change notification settings

Radomiej/AStar

 
 

Repository files navigation

AStar - Enhanced Edition

.NET Core

An A Star (A*) algorithm for C# based on Gustavo Franco's implementation.

The grid is represented as a 2d byte array (byte[,]). Blocked locations are marked as a 0, anything else is considered traversable.

Unlike a cartesian coordinate system that uses X for horizontal and Y for vertical on a 2D plane, the point used in this library represents a matrix index where X is the row and Y is the column (Pxy)

Options allow for the use of diagonals and punishing direction changes.

var pathfinderOptions = new PathFinderOptions {PunishChangeDirection = true};

var pathfinder = new PathFinder(new byte[40,40], pathfinderOptions);

var path = pathfinder.FindPath(new Point(1, 1), new Point(30, 30));

About

A Star (A*) algorithm in C# focused on performance/features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%