Intelligence · function
reachableBy
Whether a route exists for this agent right now, without writing one.
Explained in Agents and behaviour.
function reachableBy<W>(tools: readonly ToolDefinition<NavigateArgs, NavigateResult, W>[], args: NavigateArgs, world: W): booleanimport { reachableBy } from '@driftengine/ai';Parameters
| Parameter | Type | Description |
|---|---|---|
tools | readonly ToolDefinition<NavigateArgs, NavigateResult, W>[] | |
args | NavigateArgs | |
world | W |
In depth
The guard, as a question. navigate@1 answers it as a side effect of doing the thing, so a
caller wanting to ask had to route and then undo. drift/ai.reachable is this, and so is any
consumer's own policy that wants to score a destination before proposing it.