Re: structured programming of automata with behavior trees

Lauren Pullen <[email protected]> Sat, 18 Jul 2026 03:58:32 -0600
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
On 7/17/26 18:33, gettimothy via Squeak-dev wrote:
> At first glance "Behavior Tree" sounds like a "State" design pattern.
Nice catch.  Every state transition inputs #tick and will output 
#success, #failure, or #running.  There are special machines that 
perform logical AND (Sequence) and logical OR (Fallback) on an ordered 
sequence of machines, and the whole of it is arranged as nodes of a tree 
and runs left to right, top to bottom.  Like the input and output names 
suggest, it's for discrete time sampling of progress status.

You can leave off the #running output, but then an earlier transition 
might start failing before the in-progress transition determines whether 
it was successful.  If you're controlling a robot that's carrying 
something, this object is slippery and the robot loses its grip on it. 
Or perhaps kids in the back seat, asking "Are we there yet?" every five 
seconds.  You want to be able to tell the difference between "yes" 
(#success), "no" (#running), and "the car broke down" (or the driver 
needs to take a restroom break) (#failure) so you can celebrate, 
continue asking, or throw a conniption as appropriate.
Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]