From the NannyMUD documentation
2000-12-12
NAME
_find_shortest_path - Width-first search of numeric database.SYNTAX
mixed * _find_shortest_path(mixed *database, int from, int to, int max_nr)DESCRIPTION
Given a database, this very costly efun finds the shortest path between two points in the database. The arguments are: database An array of arrays of integers. The first element of the database holds an array with indexes for other elements to which the first element is considered connected. from The index of the point where you want to start. to The index of the point where you want to end. max The largest number of steps you accept. Setting this to a very large number will ensure an exhaustive search of the database for possible paths; beware the case of NO connection (in which case all of the database is searched).NOTE
This efun has the potential to be so costly that its use is restricted; it needs approval.