top of page

BEHAVIOUR TREE

ROLE

Solo Developer

DESCRIPTION

With this project I wanted to get more familiar with UCSS and Behaviour Trees in general. This is created with simple complexity in mind. 

YEAR

2023

GENRE

Research and testing

PLATFORM

None

OBJECTIVE

Due to my fascination with AI I have always wanted to experiment with various existing models in order to create my own take on it. With this in mind I started getting familiar with the Behaviour Tree. This tree is heavily inspired by The Kiwi Coder

​

With my tree I wanted to create a system through which you can easily create complex AI behaviour. Since a tree is very modular it aligns perfectly with my vision for creating AI systems. Through my testing case I went through various iterations in order to test functionality. One of the things I wanted to create in my tree was a Conditional Node (CN).

 

The CN would compare data from Node X with the condition in order to give a certain result. My plan was to expand upon this by creating a visualized version of an if statement. For AI this would be crucial if you want to create complex behaviour. For example if the distance between the AI and the player is less than 10 it should switch from patrol to attack. 

 

Due to the setup of my nodes I was unable to create the conditional node. I discovered the complexity of UCSS and in general I am not fond of front-end related things. The reason for my node system not being able to handle conditional nodes is because the nodes were able to have multiple entries, but only 1 exit. In order to make them able to have multiple exit points it would require a complete different system under the hood where each condition would be tied to at least 3 exits eg. less, greater, equal, etc. This would be based on the condition type and at that point I realized why pretty much no one does this. 

VISUALS

This was a testing case with the conditional node. The issues I had consisted of not being able to determine which input node was which side of the condition. The lack of documentation in order to figure out how I can have multiple exits based on the type, and the sheer amount of conditions there are for complex capabilities.

bt action.gif

In here is a sample where you can see a simplified tree for an agent that goes from attacking behaviour to patrol due to the distance of the target being too far. 

bt full.png

My BTree was capable of having multiple sequencers with various action nodes in order to create quite diverse behaviour. The overview was very clean as well.

bt conditional.png
bottom of page