Combining Learning Agents with Behavior Tree ?

Hello. I’m a student working on an Action RPG game.

I’m entirely new in LA, and I just have completed following example.
Unreal Engine 5.4: Learning Agents for Character (Part 1)

I want to implement the boss’s actions with Reinforcement learning using Learning Agents.

I think it will be difficult to make detailed movements with Reinforcement Learning alone, so I want to use Behavior Tree to make them more detailed.

How can I combine LA and BT?

Also, is it valid to use Reinforcement Learning to create bosses for RPG?

Combining Behavior Trees with reinforcement learning is an interesting idea which can enable game AI to deal with the game complexities while not being repetitive and dull. I did toy with Unreal’s BT to enable RL few years ago (and unification seemed plausible if I remember correctly).

However I don’t think current state of learning agents incorporates BT functionality. Although there is a white paper for this very purpose, not Unreal based yet, but for a 2d game called Raven.

  1. A Reinforcement Learning Behavior Tree Framework for Game AI

I hope there are other papers too on this very idea.

I haven’t tried it yet but I think you could run the normal Ai using the behavior tree and use it to train learning agents using Imitation Training, then after a bunch of iterations you can transition them over to Reinforcement Training. They should utilize the characteristics of the behavior tree so long as you have enough observations and the rewards are set up to reward the right behaviors.

Here’s a tutorial on Imitation Training

Right now it’s possible to use both IL and RL in combination with behavior trees due to Learning Agent’s (LA) flexible design, but it’s not straightforward.

You want to create a custom BT Task which works with the LA manager. You still need to add the pawn or controller of the AI as an agent, and possibly remove them when not relevant.

Sorry for the delayed response.