-
Notifications
You must be signed in to change notification settings - Fork 1
AIPathGraphSolver
jay19240 edited this page Dec 11, 2024
·
2 revisions
Implements the A* algorithm to find the shortest path between two nodes in a graph.
- new AIPathGraphSolver(): AIPathGraphSolver
-
heuristic(graph: AIPathGraph, nodeA: AIPathNode, nodeB: AIPathNode): number
- graph: The path graph.
- nodeA: The node A.
- nodeB: The node B.
-
solve(graph: AIPathGraph, startNode: AIPathNode, endNode: AIPathNode)
- graph: The path graph.
- startNode: The starting node of the path.
- endNode: The destination node.