shortestPath

fun shortestPath(from: A, to: A): List<A>?(source)

Unweighted shortest path from from to to (BFS). Returns the list of agents on the path, including both endpoints. Returns null if to is not reachable. Returns a single-element list when from === to.