Behavior Tree

Building Event-Driven Conditions for an Asynchronous Sensory System

This article continues a series of tutorials building simple dog behaviors for a simulation game. Last time, you learned how to use polling to build tasks that monitor conditions in the world, for example to keep the growling behavior running while another dog is nearby.
In practice, there’s also another way to implement these kinds […]

My Plans for the Next 11 Months: Killzone 2, AiGameDev.com and Game::AI++

Over the past month, I’ve received quite a few questions about the stuff I’m working on — and some of you even seem genuinely interested! So I figured I’d take the opportunity to write a post about my master plan for 2008. It’s taken me until now to write this since there was […]

Monitoring Assumptions for Behaviors Using Polling Conditions

In last week’s tutorial, you learned how instantaneous conditions can check information from the world to affect how decisions are made in a behavior tree. However, using this approach, once a decision is made the behavior will run until it terminates on its own — which reduces the responsiveness of the AI.
This article shows […]

How to Affect Behavior Choices Dynamically Using Instant Conditional Checks

Sensory systems have many different roles, as discussed in the last article. However, the best place to start is to implement a single condition that checks information from the world, and affects the decisions in a static behavior tree. For example, picking a fixed growling reaction to another dog when it’s nearby.
This tutorial […]

Watching Level Designers Use Scripts to Disable Your Autonomous AI: Priceless

You’ve been building an autonomous AI to improve the gameplay on your next-gen title and everything is finally falling into place:

Bachelor’s degree and master’s research in AI, 4 years.
Two AAA titles of experience (plus prototypes), 5 years.
Revamping of the AI architecture with new features, 2 years.
Watching designers disable the AI with scripts, timeless!

“There are […]

Using Conditions as the Building Blocks of a Sensory System

Wednesdays on AiGameDev.com is dedicated to tutorials. This article continues the long-running series which focuses on building simple dog behaviors for a simulation game.
At this stage, the decision making process is in place, but it’s based on random decisions instead of taking into account any information from the world. This, in effect, is […]

Understanding Behavioral Exceptions and How to Deal with Them

A few months ago, in the early days of this blog, I noted the importance of understanding the different possible types of failures of actions, and all other tasks for that matter. This article looks into ways for your AI logic, in particular your scripts or behavior trees, to deal with these problems more […]

Popular Approaches to Behavior Tree Design

jjacobsson asks about behavior trees: “What is the root conceptually? How does it deal with events? Is the tree evaluated from the root down to a leaf often / all the time?”
The first thing to note is that behavior trees are rather flexible, so they can be applied in a variety of different ways. […]

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

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 […]

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

Here is part 2 of my lecture at the GDC in Lyon two weeks ago. Be sure to view the overview of behavior trees in part 1 first if you haven’t already. This video is exactly 21:48 minutes long, and is worth roughly 7.9 Mb of bandwidth!

In the video, I go over […]

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

Quite a few people asked for a PDF of my slides from my lecture at the GDC in Lyon, but I promised to do better and release a video with the animations an the whole audio. Here is the first part of the talk; it’s exactly 22:37 minutes long.

In the video, I go […]

What Does a Behavior Tree Editor Look Like?

After my talk at GDC, a few people wondered what a behavior tree editor actually looks like since I kept mentioning their benefits, including their flexibility and intuitiveness. From my experience with the AI designers at Rockstar, I noticed a boost in productivity of multiple orders of magnitude by providing them with this […]

Behavior Priorities: Avoid Them or Embrace Them?

Most AI programmers I know (myself included) have a love-hate relationship with priority-levels for AI behaviors. Developers often use them reluctantly — assuming there must be a better solution out there. These priorities are the subject of this week’s developer discussion.
Basically, the idea is to assign priority levels to every AI behavior to […]

Beyond AI Pseudo-code and Towards Sensory Systems

Over the last few weeks, this tutorial series designed and implemented simple dog behaviors using random decisions structured within behavior trees. This article shows you the C++ source code of the game’s AI logic as it is today.
Also, it’s time for you to put your thinking hats on; you need to decide what […]

A Lazy Approach to Designing Consistent AI Behaviors

When logic is built from multiple modular behaviors, you must make sure they work together consistently. Typically, to do that, your AI stores a variety of information shared by the behaviors to make sure there aren’t any clashes. Of course, this takes a lot of time and effort, but luckily there’s a lazier […]

Event-Handling Strategies for Juggling Purposeful Behaviors

Assume you have a long-term AI behavior controlling a character in a game. It could be implemented as a script, a behavior tree, or any other sequence of actions to follow. How do you deal with events happening in the world in a way that’s coherent with this active behavior?
The AI logic needs […]

On the Effectiveness of Random Decisions in Structured Behaviors

This tutorial on AiGameDev.com continues the series which builds simple AI logic for a simulation game. The previous article established a first design. This time, you’ll see how it can be implemented at the low-level.
It’s surprising how effective random decisions can be when they are structured together into a tree of sequential behaviors. […]

Chatting Up Façade's AI: 23 Ideas to Talk Your Game Into

Façade is not only a successful attempt at moving beyond traditional branching narrative, but it also makes significant progress towards emotionally interactive characters. It offers critical insights into the development of behavior trees that operate concurrently to generate rich behaviors, as well as the application of natural language technology to games.

The Backbone of AI Behaviors: Movement and Animation

This article continues a series building the AI for a simulation game from the ground up. Last week, you found out what assets and libraries this project uses, and you helped figure out a first design to show off some simple but useful behaviors.
The best place to start implementing game AI is with movement […]

Teaming Up with Halo's AI: 42 Tricks to Assist Your Game

Halo is not only one of the best-selling game franchise of all time, but it has become a landmark in the first-person shooter genre. Thanks to Bungie’s openness, developers on the projects have been able to share their insights in the creation of the game and technology, which has influenced the whole industry significantly over the years.

A Procedural Knowledge Approach to Task-Level Control

When it comes to building powerful decision-making and control systems, robotics research is the best place to turn to for decades of experience. Many of the popular ideas in game AI today can be traced back to robotics controllers. In particular, PRS provides design methodologies and tricks for building behaviors that are responsive and purposeful.

Game AI Technology Faceoff: Attack Behaviors

In last week’s sketches, you saw two different ways to implement simple suspicious behaviors for an action game. This Sunday you’ll see how well these two systems handle an additional attack behavior.

Game AI Roundup Week #41 2007

There are 9 more Smart Links from the blogosphere this Saturday. Visit the tumbleblog at news.AiGameDev.com (or subscribe by RSS) for updates on game AI as they happen throughout the week.

Game AI Technology Faceoff: Suspicious Behaviors

In last week’s sketches about game AI, you learned how to create behaviors by dealing with parts of the problem space at a time. This Sunday’s sketches shows how two different AI techniques solve the same in-game scenario.
What’s the Challenge?
“Implement the suspicious behavior of an immobile soldier. The soldier should respond to unexpected […]

The Art of Recursively Decomposing Problems

In the previous sketches, you learned what a behavior lookup table looks like in practice, and how it can grow very quickly in size as you add more variables to the problem.
The way to reduce complexity in practice is to “divide and conquer” by breaking down the table into smaller parts. To do […]

Finite State Machine Attacks Harmless Developer!

Since there were no questions about game AI this week, I’m going to ask myself one! Spare me the embarrassment of doing this next week by contacting me with your queries.
An obviously astute reader (hehe :-) asks “Why are you so harsh with finite state machines? Don’t game developers use them all […]

Understanding Behavior Trees

One of the primary goals of game AI is finding a simple and scalable solution for editing logic. Finite state machines have the advantage of being quite simple, but for large systems you’ll need a hierarchical FSM to provide reusable transitions between states.
Such HFSMs are certainly a popular way for making scalable logic. […]

The Motivation Behind Game::AI++

The last post about Game::AI++ was very popular, so here are more details since I’m busy writing some documentation anyway! It’s more of an executive summary this time, so feel free to comment or ask further questions…

Note: You can still sign-up to the newsletter in time for the first release on August 1st.

What […]

Using Decorators to Improve Behaviors

How do you build complex behaviors without them becoming too complicated? Most modern games require intelligent and realistic actors to support the design, but it’s often difficult to create their AI.
One solution to this problem is to use modularity to assemble behaviors from simpler parts. Previously, you learned about sequences, selectors and […]

Type-Safe Behavior Tree Builders for C++

At GDC ‘07 there was a talk about behavior trees. It’s the type of AI that Halo 2 uses, as described by described by Damian Isla at GDC ‘05. The first part of this year’s talk was by Lauren McHugh who’s working on the AI for Spore — EA’s delayed mega-hit for […]

Enabling Concurrency in Your Behavior Hierarchy

Assume you have a tree of behaviors, with conditions and actions as leaf nodes, and sequences and selectors as branches. This type of logic is very linear, and will only ever do one thing at a time. So how do you get your AI to support concurrent behaviors?
The answer is to use […]

Game AI Character