Re:Behavior trees for AI: How they work
by ajayjain on Saturday April 25, 2015 @05:02PM
(#9439553)
I used this article (and some other pieces) to help with some robotics research in Python a few months ago. Behavior trees are fantastic abstractions that definitely simplify FSM code, but I found that working within the constraints of decorators could really complicate behavior architectures that can instead be implemented more linearly. Specifically, I wanted to have an overall obstacle avoidance behavior separated from individual movements, but ended up implementing an obstacle avoidance function library totally separate from the BT.
Re:Behavior trees for AI: How they work
by skybrian on Saturday April 25, 2015 @07:26PM
(#9439891)
Nice article. This looks a bit like a way to implement a scripting language that uses lightweight threads in a system that doesn't have it built in.
If you're using a language that has either lightweight threads or async/await built in, would you still use a behavior tree, or would you just write code?
Re:Behavior trees for AI: How they work
by Jare on Saturday April 25, 2015 @08:06PM
(#9439995)
A behaviour tree can be data-driven easily, which opens opportunities for easy editing via DSLs, graphical tools and even changing the AI on the fly at runtime. If you can afford it, do BTs.
Re:Behavior trees for AI: How they work
by nickhuh on Tuesday April 28, 2015 @01:09AM
(#9450604)
Interesting article. It seems to me like what you really want here is to do this in a lisp/scheme. Then you can use the full power of lisp (it's the exact same syntax as the behavior tree), leverage lisp's built-in control flow constructs, and just implement nodes as functions with side-effects that return either true, false, or null or something.
Or you used FSM for less than you usually would. Like pure state based use-cases instead of shoe-horning it. Which I did, heh.
If you're using a language that has either lightweight threads or async/await built in, would you still use a behavior tree, or would you just write code?
Essentially you're going to need a wrapper to create a tree from either a DSL or e.g JSON from a GUI.