Support Stream – Behavior Trees – March 10th, 2015

The next stream will be all about Behavior Trees and how they function in UE4. All you AI junkies better be there!

WHAT
Senior Gameplay Programmer Broder shows off AI features and how to implement them.

WHERE
Follow us on the official Unreal Engine Twitch channel:

WHEN
Tuesday, March 10th @ 2:00-3:00PM EST Countdown]

WHO
Broder, Senior Gameplay Programmer
, (@]())

Feel free to ask any questions on the topic in the thread below, and remember, while we try to give attention to all inquiries, it’s not always possible to answer’s questions as they come up. This is especially true for off-topic requests, as it’s rather likely that we don’t have the appropriate person around to answer. Thanks for understanding!

EDIT: We’re doing a double feature since the weather interrupted the previous stream. Make sure to stay tuned after it ends, so you can watch the Multiplayer Stream

EDIT: The YouTube archive is now available

EDIT: A rough draft of the project is available for download

Notes on the project: AINav error will appear, it can be ignored. The “Get Best Patrol Location” has been replaced as we discussed in the video.

Wait… no Multiplayer Shootout game anymore?

Livestream Double Feature

The multiplayer twitch starts immediately after this one ends

Oooh… It will be a looong night! (Time zone difference)

Yes! Finally something about this. This is going to be an epic night :smiley:

Woohoo, I’m excited about this one, plus its a double header!

:slight_smile: I like you. Haha.

Context:
I have created a reinforcement learning ai, both negative and positive reinforcements, and currently im faking it entirely and im not using Behavior trees at all or any part of the stock ai system in ue4, i made my own implementation in c++.

Question:
What would be a good starting point to converting to using the stock ai system using blueprints ?

For example there are various rules i need to define and I’m not entirely sure what to do where, really.

I was thinking using a Behavior tree for the functionality since it has states / actions and rules to go between. But where would i describe my rules for reward or punishment for a transition (would i do it like normal rules are defined ?) what about rules that describe what the entity sees ?

Maybe i just need to study ue4’s ai more.

Edit: Also I double DennisSoemers question below.

Wooooo, can’t wait, thanks Epic!

Question: What would be the best way to guarantee to our C++ code that a certain Blackboard asset has a certain key (which may or may not have a value correctly set)?

My initial thought would be to create a subclass of UBlackboardData in C++, and somehow hardcode the keys that I want to be guaranteed to exist there, and then attempt casting to this subclass in parts of the code that depend on the guarantee. The problem with this is that as soon as I add a class that derives from UBlackboardData to my project, even without any other code, upon launching the editor crashes with an Assertion fail (more specifically: Assertion failed: !DelegateInstanceInterface->IsSameFunction(*InDelegateInstance) [File:d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\core\delegates\DelegateSignatureImpl_Variadics.inl] [Line: 950])

***UPDATE! NEW TIME!


2947e806450a414997b797096bbafb975ba8c628.jpeg

FOILED! and I are both stuck due to inclement weather. The stream is being rescheduled to March 10th 2pm. We’ll be on before the multiplayer stream. See you then!

Hi there,
So , if i understood , 3:30PM-5:00PM Multiplayer , 5PM ~6PM Behavior Trees ?

Sorry, edited my post to say “before” not after.

It’ll be 2:00 PM EST for behavior trees. I updated the countdown clock as well, so let me know if that helps.

omg YUSSSS Please. take me, my body is ready.

Thank you for sur that help

Great, looking forward to this stream. Here are some questions.

  1. Can you go over the settings for Observer Aborts with a few examples?
  2. What is the correct way to control an animation from a behavior tree? Specifically I have a jump animation, the center time of the animation is root motion, but the beginning and end are not. Also, a movement nudge needs to be applied to the Actor jumping while in the root motion portion each tick so that the one animation can be used for a range of jump heights and distances.

Thank you

I’m so down! Cannot wait :slight_smile:

Nice! this one I can’t miss. Gotta see if there’s any little secret in the AI system to discover.

[question] Can you go over specifically the differences between instanced and non-instanced BT nodes, how memory is allocated, deallocated and managed? How are nodes marked as instanced and not? best practices etc
[question] What is your best practice for handling networked AI actions/tasks ? (next question is related) I imagine you replicate specific montages, specific cosmetic values with replicatedusing functions and normal movement replication do its job.
[question] Could you go over UE4’s version of special moves that Epic is using for fortnight? I’m familiar with the UE3 versions.
[question] Can we get an updated roadmap on character AI systems in development and overall AI systems being worked on? I know there are plans to expand the pawn actions system, port over the hot spot manager and do some more EQS optimizations.
[question] Are there any plans to pass blackboard values as dataprovider params to EQS queries via the run EQS behavior task?
[question] Whats Epic’s typical workflow for managing multiple different templates for similar AI, eg an easy/medium/tough pistol guy, a easy/medium/tough rifle guy that is basically a pistol guy with different character and controller settings? Do you make new AIController, and character blueprint instances or have shared config files or a difficulty float type for configuration settings?

Question:
Is there an easy way to create Decorators of which the condition is checked every frame (or at least regularly) in C++? The 4.7 Release Notes mentioned specifically for Blueprint-implemented Decorators the following:

But I did not figure out yet how to achieve this in C++. The best I’ve found is to use a blackboard based Decorator (which does seem to get updated when the Blackboard value changes). But this requires also creating a service to regularly check and update the condition, and write it to the blackboard, and it requires the blackboard to have a key specifically for this (meaning that the Blackboard Asset, Service and Decorator are all very tightly coupled and require each other just for the sake of getting one condition to update often, and I’d prefer to be able to create a very modular Decorator that can easily be plugged into any Behavior Tree without requiring a specific Blackboard key and a specific Service).

[Question]

Best way to simulate non-traditional NPC Character movements such as vehicles, spaceships, etc. that don’t conform to straight ‘move to’ commands?

(ie: follow a curve etc in 2d as well as 3d space, could target points along a road etc. be used to work and would it be the simplest way to simulate a curve etc.? what would be the simplest solution possible?)