plan_pathfind
Find shortest or alternative paths in weighted graphs. Solves routing, dependency, and critical-path problems using A* and Yen's algorithm.
Instructions
Find the shortest (or k-shortest) path between two nodes in a weighted graph using A* + Yen's algorithm. Use for routing, dependency resolution, project critical-path discovery, or 'how do I get from X to Y' questions on graphs. Set kPaths>1 to also return alternatives. For full graph structure analysis (centrality, communities), use analyze_graph. For task-to-time-slot assignment, use solve_schedule. Free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | ||
| edges | Yes | ||
| start | Yes | Start node ID. | |
| end | Yes | Goal node ID. | |
| heuristic | No | A* heuristic. 'zero' = Dijkstra (default). | |
| kPaths | No | Return up to k alternative paths (default: 1). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Node IDs from start to end. | |
| totalCost | Yes | ||
| breakdown | No | ||
| nodesExplored | No | ||
| found | Yes | False if no path exists. | |
| executionTimeMs | No | ||
| alternativePaths | No | Only present when kPaths > 1. |