Skip to content

Pathfinding algorithms in Javascript/Typescript

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt
Notifications You must be signed in to change notification settings

Macil/pathfinding

Repository files navigation

@macil/pathfinding JSR

This library implements several pathfinding and graph algorithms. This library works with Typescript and Javascript in both Deno and Node.

Where possible, this library does not need an entire graph to be provided to it ahead of time. Many functions allow nodes and edges to be provided by a successor function executed for each node encountered, meaning that graphs are lazily initialized which allows for procedural and infinite graphs to be used.

Algorithms

Directed graphs

  • A*: find the shortest path in a weighted graph using an heuristic to guide the process.
  • Dijkstra: find the shortest path in a weighted graph.

Undirected graphs

Related Projects

This project was ported from the Rust pathfinding library.

License

This code is released under a dual Apache 2.0 / MIT free software license.

Contributing

You are welcome to contribute by opening issues or submitting pull requests.

Implementations of additional similar graph algorithms, especially those in the Rust pathfinding library, are welcome.

About

Pathfinding algorithms in Javascript/Typescript

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Stars

Watchers

Forks

Packages

No packages published