JSPM

abstract-astar

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 311
  • Score
    100M100P100Q81767F
  • License MIT

Versatile A* (A Star) implementation in TypeScript.

Package Exports

  • abstract-astar

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (abstract-astar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Overview

Versatile A* (A Star) implementation in TypeScript.

It is a bit embarassing to implement this algorithm: I assumed the world did not need another implementation and that I would be able to use a library for my needs.

However, every implementation I found during a 40 minute search made too many assumptions in order to simplify the developer experience. This library makes no assumptions whatsoever which makes it more adaptable. Reasons you might want to peek into this

  • Uses a Min Heap structure for speed.
  • All concerns injected into search function.
    • Injected cost function is given the cameFrom map thus supporting incorporating the shape of the path into the cost ex. penalize a path that makes turns.
  • Makes no assumptions about the structure or nature of the graph.
  • No dependencies on any other libraries (except for unit testing).