Problem
The BT auditor's BuildDecoratorLogicString ignores the Number field in FBTDecoratorLogic, which defines how many operands each operator consumes (prefix notation). The current code just appends the operator keyword, producing garbled expressions for branches with 3+ decorators combined with AND/OR/NOT logic.
Simple cases (1-2 decorators) work fine since there's no logic ops array.
Related
The DecoratorLogic field is gathered (populated on each child node) but never serialized in the markdown output (#7 from code review). Both should be fixed together.
Current behavior
For And(3), Test, Test, Test (meaning A AND B AND C), the output is a flat meaningless string.
Expected behavior
Proper expression like (Blackboard: IsSet) AND (Cooldown: 5s) AND (TimeLimit: 10s).
Implementation notes
FBTDecoratorLogic uses prefix notation where Number is the operand count:
And(2), Test(0), Test(1) means decorator[0] AND decorator[1]
Or(2), And(2), Test(0), Test(1), Test(2) means (decorator[0] AND decorator[1]) OR decorator[2]
Needs a small recursive descent parser walking the ops array with a stack. Then serialize the resulting expression string in SerializeNodeToMarkdown.
Priority
Low. Individual decorator properties are already output correctly, so LLMs can understand what each decorator does. The logic expression is a readability improvement for understanding how they combine.
Problem
The BT auditor's
BuildDecoratorLogicStringignores theNumberfield inFBTDecoratorLogic, which defines how many operands each operator consumes (prefix notation). The current code just appends the operator keyword, producing garbled expressions for branches with 3+ decorators combined with AND/OR/NOT logic.Simple cases (1-2 decorators) work fine since there's no logic ops array.
Related
The
DecoratorLogicfield is gathered (populated on each child node) but never serialized in the markdown output (#7 from code review). Both should be fixed together.Current behavior
For
And(3), Test, Test, Test(meaningA AND B AND C), the output is a flat meaningless string.Expected behavior
Proper expression like
(Blackboard: IsSet) AND (Cooldown: 5s) AND (TimeLimit: 10s).Implementation notes
FBTDecoratorLogicuses prefix notation whereNumberis the operand count:And(2), Test(0), Test(1)means decorator[0] AND decorator[1]Or(2), And(2), Test(0), Test(1), Test(2)means (decorator[0] AND decorator[1]) OR decorator[2]Needs a small recursive descent parser walking the ops array with a stack. Then serialize the resulting expression string in
SerializeNodeToMarkdown.Priority
Low. Individual decorator properties are already output correctly, so LLMs can understand what each decorator does. The logic expression is a readability improvement for understanding how they combine.