Article

Behavior Trees for Next-Gen Game AI (Video, Part 3)

Alex J. Champandard on December 20, 2007

Here’s the 3rd and final of my lecture at the GDC in Lyon a few weeks ago. Be sure to view the overview of behavior trees in part 1, as well as the following discussion of goal architectures and planning in part 2. This video is exactly 15:03 minutes long, and is worth roughly 5.5 Mb of bandwidth!






In the video, I discuss how to use parallel tasks which handle logical forks and joins to create concurrent subtrees. Then I show how you can use read-only concurrency to monitor the assumptions of a tree which can help it bail out if something goes wrong. Also, I explain how decorators can be used as resource allocators to help synchronize independent trees that were edited modularly. Finally, I sum up the whole talk and give you some ideas for expansion.

Discussion 4 Comments

alexjc on December 21st, 2007

[B]Gabriele[/B], There's not much out there in terms of behavior tree library. I'm currently working on Game::AI++ but it does more than the simple implementation mentioned here, so it's not as easy to work with... The ideas I present in the talk are not designed for multi-threaded environments. As I mentioned, it's all in a single hardware thread only using [I]logical concurrency[/I] in a Windows 3.1 cooperative scheduling way. Alex

blog on June 27th, 2008

A new feature has been posted.

Here’s the 3rd and final of my lecture at the GDC in Lyon a few weeks ago. Be sure to view the overview of behavior trees in part 1, as well as the following discussion of goal architectures and planning in part 2. This video is exactly 15:03 minutes long, and is worth roughly 5.5 Mb of bandwidth!

$$$http://files.aigamedev.com/videos/btngai-part3.640x507.flv$$$ $$$ $$$

In the video, I discuss how to use parallel tasks which handle logical forks and joins to create concurrent subtrees. Then I show how you can use read-only concurrency to monitor the assumptions of a tree which can help it bail out if something goes wrong. Also, I explain how decorators can be used as resource allocators to help synchronize independent trees that were edited modularly. Finally, I sum up the whole talk and give you some ideas for expansion.

Click here to read the original post.


jstrout on April 22nd, 2012

Thank you for the videos, this was a great introduction to the topic. It seems to me that BTs solve a lot of problems posed by HFSMs and scripting languages, but they're not ideal at everything. In particular, it seems that a BT designer needs to jump through a lot of hoops to make a properly interruptable tree. For example, if my dog is patrolling, and he suddenly gets shot with a BB gun, he should bail out of the patrol behavior and react right away (with an entirely different tree). But so too if he is eating, hunting for a bone, etc. And other things should also make him bail out in different ways: spotting a squirrel, hearing a call from his master, etc. I know you can set up Interrupter decorators and parallel compositions to make all that work, but it seems like a lot of repetitive work that is easy to screw up -- a sign that we may be using the wrong tool for that problem. But this post is from 2008... have any new insights emerged in the last few years that make dealing with this easier?

netgnome on April 28th, 2012

doh, realized it was a necro-post.

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!