Concurrent AI

Why State Machines Struggle With Concurrency

Finite state machines (FSM) work well for linear control, as only one state is active at the same time. That’s what they’re intended for, so pretty quickly, your design starts to take advantage of this. Since only one state runs at any moment, the FSM becomes a resource allocation strategy — deciding […]

Using Resource Allocators to Synchronize Behaviors

If your low-level behaviors are designed to run concurrently, and you’re using parallels to fork control inside hierarchies, whole subtrees of behaviors can run at the same time. Now you can generate many interesting concurrent behaviors, but the problem is that most of them are just not realistic. For example, it’s probably […]

How to Build Concurrent Behaviors

For multiple behaviors to run at the same time, they must not compete over the same resources. In practice, you have two design strategies to ensure that your behaviors work well in parallel. Both of these involve getting the most out of the other modules in the game engine — where possible. […]

What Are Concurrent Behaviors?

In game design, behaviors are concurrent if they are active within the world at the same logical time. Typically, this implies that your actors can do multiple things at once.
Note: Traditionally, in computer science, two tasks are concurrent if they are running simultaneously on the hardware. Now, you can still implement concurrent […]

Why Do Your AI Behaviors Need Concurrency?

Most games today require purposeful yet responsive behaviors from the AI actors. This implies that actors must do two things:

Pursue active long-term goals in the game.
Respond to events from the world.

A solution without concurrency would have to resolve each goal one by one in a sequence, and incoming events would presumably suspend the […]

Game AI Character