AI / Apache Burr Interview questions
How does Burr decide which transition to follow when multiple conditions could match?
Conditions on the outgoing edges of an action are evaluated in the order they are specified in with_transitions(...), and the first one that evaluates to True is the transition Burr takes.
with_transitions( ("check", "adult", when(age__gte=18)), ("check", "child", when(age__lt=18)), ("check", "fallback", default), # only reached if neither above matched )
This means ordering is meaningful: a broad default or loosely-matching condition placed early can silently shadow a more specific one listed after it. If none of the conditions evaluate to True, execution stops early rather than raising by default — which is why most graphs end with an explicit default catch-all on any action that could otherwise dead-end.
More Related questions...