Sequence
Tick children in order. Continue after Success; return at the first Running or Failure. Return Success when every child succeeds.
10 / MISSION EXECUTION · REACTIVITY AND MEMORY
A drone takes off, inspects a station, returns and lands. The assignment stays fixed. Compare a Behavior Tree (BT) with a finite-state machine (FSM), then change the tree’s memory semantics. Follow the decision that actually reaches the action.
Predict: the drone is partway through an inspection when a hold request arrives. Does the controller check that request again—or remember its earlier decision?
The first two implement the same interruption policy. The third changes only the root fallback’s memory: a Running mission can skip the higher-priority hold check.
One assigned mission; known waypoints, exact own position, service progress, an ideal hold-request input and a sensor-failure flag. No allocator or peer network is involved.
A selected action advances for 0.25 s at 1.5 m/s; the final decision tick adds no interval. Inspection needs 3 uninterrupted seconds. Halting it discards partial service; completed actions stay complete.
Altitude is modeled during takeoff and landing. Both views observe the same position. Drone meshes and the inspection yard illustrate it; aerodynamics, collision avoidance and battery dynamics are absent.
A fair comparison: the reactive BT and FSM share actions, inputs and guard priority. A tree is not automatically safer or more capable. Memory and interruption semantics determine the behavior.
ONE ASSIGNMENT · THREE EXECUTION POLICIES
Drag to orbit · scroll to zoom · Focus drone for a closer view. Dashed lines show the fixed route; the vertical guide shows altitude. Camera movement never advances the mission.
EXECUTION LOGIC / LATEST TICK
Select a node to inspect its semantics.
LOCAL OBSERVATIONS / ACTION STATE
Only a completed inspection counts. A hold discards partial progress; after release, inspection starts again at zero.
| Time | Action | Position (x, y, z) m |
|---|
EVENT HISTORY / THIS RUN
Mission completion requires a successful inspection and landing at home. An aborted mission can return and land while still failing the inspection objective. With the reactive BT or guarded FSM, a permanent hold reaches the time budget without completing.
PREDICT · COMPARE · EXPLAIN
Load a paused case, jump to the event boundary, then step once. Inspect which nodes were visited and which action was halted.
Independent copies use identical initial conditions and action primitives, up to the same 30-second budget. Opening this table never changes your active experiment. “Completed” measures the mission objective; hold violations remain visible separately.
| Event | Controller | Outcome | Time | Hold ignored | Service discarded |
|---|
THE RULE BEHIND THE REACTION
A Behavior Tree passes a tick through its control nodes. Each visited child returns Success, Failure or Running. The return status determines which child gets ticked next.
A finite-state machine instead stores the current execution state and follows explicit transitions. With the same guards and action semantics, it can produce the same trajectory and outcomes.
Tick children in order. Continue after Success; return at the first Running or Failure. Return Success when every child succeeds.
Try children in priority order. Continue after Failure; return at the first Running or Success. Return Failure if every child fails.
Start at the first child on every tick. Here, the root checks the hold branch before the mission. A newly Running hold halts the previously active mission action.
Resume at the remembered Running child. Here, only the root fallback has memory. Once execution is Running, the root skips the hold branch until execution returns.
The inspection action itself returns Failure when its sensor has failed. The execution fallback then selects an abort return and landing. The memory-root variant can still observe that action failure even though it skips the higher-priority hold condition.
The FSM uses the same top-priority hold guard as the reactive tree. A hold maintains the current position. The memory-root variant deliberately demonstrates a skipped guard; production controllers need explicit interruption and safety contracts.
Primary vocabulary and control-flow source: Colledanchise and Ögren — Behavior Trees in Robotics and AI: An Introduction. Modern reference vocabulary: Fallback nodes and Sequence nodes in BehaviorTree.CPP. The three small executors, action latching and interruption policy are declared educational implementations, not a flight-control stack.