The Behaviour Foundation

  1. Home
  2. Docs
  3. The Behaviour Foundation
  4. Behaviour


VisAI splits AI functionality into 3 core pieces. BehaviourDecision, and Action

Behaviours are the Structure of an AI, giving you a comprehensive way to plan dynamic AI behaviour. 

Decisions are the Thought of the AI, giving you complete control over the way your AI plans its next move.

Actions are the Instructions for the AI, giving you a straightforward way to bring life to your AI. 

On this page, we’ll be focusing on Behaviour, the Structure. Let’s get started!

VisAI uses a structure that’s designed to work with virtually any AI type, and provides a straightforward and comprehensible way to design your AI. Entire AI designs can be built easily, even by those without any AI experience. You’ll use a structure of BehavioursGoals, and Plans to design your AI. 

Behaviours are what the AI is, or does. As an example, an AI Behaviour could be “Cook”, “Ranged Enemy”, or something else that fits your game better. When creating Behaviours, ask yourself “What defines the AI as a whole?”

Behaviour allow you to change large parts of how your AI functions at runtime with minimal overhead. It also allows you to organize AI functionality into comprehensive “boxes”

Goals define what the AI wants. As an example, an AI might want to Find Enemies, Purchase a house when it has enough money, Cook a Meal, or anything else you can conceptualize. When creating Goals, ask yourself “What does this AI want or need?” 

Goals allow you to give your AI a scope within the game environment. Something to put their focus on. 

Plans define how the AI could get what it wants, general requirements of the goal, or just different ways to achieve a goal. As an example, a Ranged AI might have plans such as “Tactical Attack” or “Simple Attack”, where a Cook AI might have the plans “Gather Ingredients” or “Cook Ingredients”. 

Plans can be used in any way that makes sense for your AI and it’s Behaviours/Goals. You’ll find more and better ways to use plans as you create with the framework. 

Regardless of the type of AI you’re building, the structure ends up looking something like this:

You can use a tool such as SimpleMind to create entire AI designs with this structure.

Creating Behaviour from a design is easy, and can be completed in 2 steps: 

  • Register Behaviours/Goals/Plans with the AI’s Subsystem. 
  • Create the Behaviour Tree Structure.

That’s it, let’s get started!

B/G/P Registration

To register B/G/P’s, you can open the Enumeration files found in the Subsystem’s “Base/BPs/” directory. 

Add each Behaviour, Goal, and Plan you have planned for your AI in the appropriate enumeration list. 

(Yours won’t be named this unless you’re working on an AI from the FPS.)

BT Structure

Next is creating the structure. Navigate to the folder your new AI is held in, and find the Behaviour Tree. 

These are the 3 types of Selector nodes you’ll use to create your AI’s tree. You’ll see a few of them already aligned for you. 

Simply recreate the design of your AI with the selector nodes shown above! You can change the values of each by clicking the blue part (decorator), and changing the settings in the details panel as shown below. 

Next Steps

Once you’ve completed your tree, you’re done! Your AI now has a structure to work from. The next step would be to start on Decisions. You can find more information about Decisions here

Check out the Designing AI page to get more information on how Behaviour, Decision, and Action work as a whole. 


How can we help?