Most FTC autonomous code is a state machine, and a state machine is fine until the robot has to change its mind. An opponent blocks the lane. A game element slips out of the intake. The battery sags. Every one of those is a transition you did not draw, and the honest fix is another flag, another branch, another special case.
The thing a state machine is bad at is exactly the thing a match demands: abandoning what you are doing because something more important just became true. That is not a transition between two states. It is a question asked continuously about all of them.
The question is not what happens next. It is what should be happening right now.
A behaviour tree re-evaluates from the root on every tick. High-priority branches are checked first, so a safety condition does not wait politely for the current action to finish — it takes the tick. Preemption is the default behaviour rather than a special case someone remembered to code.
The cost of re-asking that question is why this had to be written carefully. The steady-state tick path allocates nothing on the heap, so the garbage collector has no reason to run mid-match. A tree that re-evaluates 50 times a second is only an improvement if it never causes a pause.
Change the world state and watch the tree re-evaluate from the root. The highlighted leaf is the behaviour that owns this tick.
An AI plugin suite for FTC that will not answer without a source.
The layered command-based stack Team IK19859 actually competes on.
Control systems, autonomous routines, and the competition record behind them.