4 ms·
They state that Behavior Trees provide the same functionality as Finite State Machines, however since there appear to be no loops (remember they are a tree) how
by whitten 11y ago
They state that Behavior Trees provide the same functionality as Finite State Machines, however since there appear to be no loops (remember they are a tree) how would you handle iteration or recursion ?
Finite State Machines don't have memory per se, but duplication of states can create the illusion of memory.
if you have five states in a row that expect a particular situation/sequence, then this could emulate a counter up to five. I think this could be done with multiple states in a behavior tree. But a FSM could have a physical loop back to a previous state which would emulate an unknown number of states. I don't see how to do this with Behaviour trees.
I'd like to see more details, and of course, if anyone actually has used these, I'd like to hear how repetition is supported, or even time varying values.
- forrestthewoods 11y agoTo handle loops I believe most implementations have a "restart on complete" flag on trees or nodes. So if the first node was a sequence node you could set it to start back at the first node after the last is done. There's a second post that may answer some of your other questions. "Advanced Behavior Tree Structures" https://gamedevdaily.io/advanced-behavior-tree-structures-4b9dc0516f92#.djupivlag https://gamedevdaily.io/advanced-behavior-tree-structures-4b... Unity has a decent behavior tree plugin called Behavior Designer. I've only used it a tiny bit so I'm still getting a grasp on what it does and does not handle well. Poking at it, or simply it's documentation, may also help. https://www.assetstore.unity3d.com/en/#!/content/15277 https://www.assetstore.unity3d.com/en/#!/content/15277 http://www.opsive.com/assets/BehaviorDesigner/ http://www.opsive.com/assets/BehaviorDesigner/
- fenomas 11y agoYou might try this GS article - it goes into a lot more detail about real-world use. http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/...
- lvsz 11y agoIteration's just syntactic sugar for GOTO. Granted it'll make the tree more complex, but that's to be expected when you want complex AI.