Bundle Classic AI algorithms: graph search, adversarial game search, optimization and tabular reinforcement learning (-lib ai)
BreadthFirst
Breadth-first search: fewest-hops path, ignoring edge weights. The result cost is the hop count.
Operations
FindPath # function
Finds the fewest-hops path between two nodes.
function : FindPath(graph:Graph, start:Int, goal:Int) ~ SearchResultParameters
| Name | Type | Description |
|---|---|---|
| graph | Graph | graph to search |
| start | Int | start node id |
| goal | Int | goal node id |
Return
| Type | Description |
|---|---|
| SearchResult | search result |