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): boolean
import { reachableBy } from '@driftengine/ai';

Parameters

ParameterTypeDescription
toolsreadonly ToolDefinition<NavigateArgs, NavigateResult, W>[]
argsNavigateArgs
worldW

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.