#gameplay-ai

1 messages · Page 36 of 1

celest python
#

there are also more advanced optimizations like directly altering how movecomponentimpl works

#

you can find an example on MassSample repo

#

in Experimental folder

fathom sun
crimson oxide
fathom sun
umbral wave
#

hey guys! is there any documentation of a practical AI behavior tree and planning of implementation out there? i see that all the tutorials and docs about AI are providing that same examples every time and i find myself having really hard times understanding how to create my own AI behavior

crimson oxide
#

there should be a way to fix that

fathom sun
#

Yeah, I hope so. I've seen games even on UE3 that don't have such an issue, still, I can't find much that would achieve it

pine steeple
#

@fathom sun i use a combination of RVO and Crowdfollowing

#

we use rvo for far away AI

crimson oxide
pine steeple
#

and switch to crowdfollowing when they get closer

#

stuttering?

crimson oxide
#

yeah the ai twtichting thing

#

it shows in his video

fathom sun
pine steeple
#

thats crowd following right?

#

no not from other ai

#

but from the player

#

rvo is cheaper than crowd avoidance

#

but looks silly near the player

#

the twitching is caused by the big agents

#

and not configuring the crowd avoidance steering

fathom sun
fathom sun
pine steeple
#
            AICrowdFollowComponent->SetCrowdCollisionQueryRange(150.f);
            AICrowdFollowComponent->SetCrowdAnticipateTurns(true);
            AICrowdFollowComponent->SetCrowdObstacleAvoidance(true);
            AICrowdFollowComponent->SetCrowdSeparation(true);
            AICrowdFollowComponent->SetCrowdSeparationWeight(2.f);
            AICrowdFollowComponent->SetCrowdSlowdownAtGoal(true);
            AICrowdFollowComponent->SetCrowdPathOptimizationRange(1000.f);
            AICrowdFollowComponent->SetCrowdAvoidanceRangeMultiplier(1.f);
            AICrowdFollowComponent->SetCrowdPathOffset(false);
            AICrowdFollowComponent->SetCrowdRotateToVelocity(true);
            AICrowdFollowComponent->SetCrowdOptimizeVisibility(true);
            AICrowdFollowComponent->SetCrowdOptimizeTopology(true);
#

some of my base settings

#

we also dont update steering every frame

#

but this requires engine changes

#

btw ours is configurable

#

i just put in the default values here

fathom sun
#

Oh, that's the component settings, apparently those aren't exposed to details panel in BPs. I was talking about crowd settings in project settings. I'll give your setup a go

pine steeple
#

let me check ini stuff

fathom sun
pine steeple
#
+AvoidanceConfig=(VelocityBias=0.500000,DesiredVelocityWeight=2.000000,CurrentVelocityWeight=0.750000,SideBiasWeight=0.750000,ImpactTimeWeight=2.500000,ImpactTimeRange=2.500000,CustomPatternIdx=255,AdaptiveDivisions=5,AdaptiveRings=2,AdaptiveDepth=1)
+AvoidanceConfig=(VelocityBias=0.500000,DesiredVelocityWeight=2.000000,CurrentVelocityWeight=0.750000,SideBiasWeight=0.750000,ImpactTimeWeight=2.500000,ImpactTimeRange=2.500000,CustomPatternIdx=255,AdaptiveDivisions=8,AdaptiveRings=5,AdaptiveDepth=1)
+AvoidanceConfig=(VelocityBias=0.500000,DesiredVelocityWeight=2.000000,CurrentVelocityWeight=0.750000,SideBiasWeight=0.200000,ImpactTimeWeight=2.500000,ImpactTimeRange=2.500000,CustomPatternIdx=255,AdaptiveDivisions=7,AdaptiveRings=2,AdaptiveDepth=3)
+AvoidanceConfig=(VelocityBias=0.500000,DesiredVelocityWeight=2.000000,CurrentVelocityWeight=0.750000,SideBiasWeight=0.750000,ImpactTimeWeight=2.500000,ImpactTimeRange=2.500000,CustomPatternIdx=255,AdaptiveDivisions=7,AdaptiveRings=3,AdaptiveDepth=3)
MaxAgents=300
MaxAgentRadius=50.000000
MaxAvoidedAgents=8
MaxAvoidedWalls=2
NavmeshCheckInterval=1.000000
PathOptimizationInterval=0.500000
SeparationDirClamp=-1.000000
PathOffsetRadiusMultiplier=1.000000
bResolveCollisions=False
AvoidanceTick=0.125000```
#

AvoidanceTick=0.125000 is our custom tick speed

#

ah

#

its not steering

#

we do thje step avoidance

#
            {
                LastTickTime = CurrentTime;
                SCOPE_CYCLE_COUNTER(STAT_AI_Crowd_StepAvoidanceTime);
                DetourCrowd->updateStepAvoidance(AvoidanceDeltaTime, DetourAgentDebug);
            }```
fathom sun
#

I'll give it a go

pine steeple
#
    const bool bUpdateAvoidance = CurrentTime - LastTickTime > AvoidanceTick;
    const float AvoidanceDeltaTime = CurrentTime - LastTickTime;```
#

if your modifying the engine

#

its UCrowdManager::Tick()

#

this fixed the twitching

#

and boosted performance

#

saved around .2ms for 100 ai on avoidance

#

btw avoidance isnt perfect

#

if they are all coming from the same direction to the same point

#

then they will eventually clump up

#

we dont send them direct to the player

#

but instead we produce a donut around the player

#

once they are near the donut point, then they push to the player

pine steeple
#

we try to disperse them around the donut, but always choose a point in the rough direction they are coming from

#

else it looks weird if they take some weird path

fathom sun
#

So, I've tried to use exactly your setup, and it got worse 😔 Now they form like a line they're stuck in. Like that

pine steeple
#

yes

#

but these are base

#

you now tweak them

#

(which i recommend you expose these in your custom AI bp

#

so you can tweak and play in editor

#

do they still twitch

fathom sun
#

What settings should I be tweaking though? Or should I just try all of them?

fathom sun
crimson oxide
pine steeple
#

?

fathom sun
#

CrowdFollowingComponent.h

crimson oxide
#

thanks

crimson oxide
pine steeple
#

yes

#
    UPROPERTY(config, EditAnywhere, Category = Config)
    float AvoidanceTick = .25f;
    
    float LastTickTime = -1.f;```
#

we customized it ofc

#

to .125

crimson oxide
fathom sun
#

Are you sure that it has been compiled into the engine even?

crimson oxide
#

yeah

crimson oxide
fathom sun
#

Nope 😔

#

I'm wondering how it's going to work using a random point on a donut around the target rather than the target itself as a destionation point

crimson oxide
#

should I try mass AI avoidance (?

fathom sun
ashen trail
#

Is there a way to set the timeout for AI Move TO specifically before Blocked triggers? Right now my chars are walking in place for 2-3 seconds before Blocked gets triggered

misty wharf
#

Check the path following component. It has some values that you can adjust. It might be C++ only though

uneven cloud
#

Most games use BTs, for good or ill. FSM are fine for simple behavior, but because the transition logic is within each state, the complexity explodes exponentially the more states that you add.

tawdry zephyr
uneven cloud
tawdry zephyr
#

Fair enough, thanks for the info 🙂

#

It sounds like BT just covers the most bases

uneven cloud
#

Not really, just the most common. Fighting games are typically FSMs, because they don't have a lot of states. Other games makes sense to use Utility. Then you have hybrids.

#

There's a pinned GDC talk that goes into picking the right architecture if you want to learn more. Flame retardant AI is the name of the talk.

tough tulip
#

Would anyone have any idea as to why the AI aren't stopping exactly where they should (the red arrows)? I have made sure that the RVO Avoidance isn't the issue, the move to location or actor node does not accept partial paths, and the acceptance radius is set to 0.

The red arrows are the debug showcasing that the math is calculated correctly. At this point I am running out of solutions to try.

#

All of them also clearly report that they have reached the location they were given in the blackboard

#

Perhaps an even cleaner example:

#

Ah, the stop on overlap setting was the issue 🙃

Stop on overlap was set to default (which is yes), meaning as soon as the AI capsulecomponent reached the move to location by its edge, it would succeed. Turning it off allowed all the ai's to keep going to the exact location.

stark oxide
#

Is there an advantage to using runbehaviordynamic besides it being dynamic 😂

#

Oooo and tag injection so maybe nm cause I just answered my own question

umbral wave
#

hey guys! is there any documentation of a practical AI behavior tree and planning of implementation out there? i see that all the tutorials and docs about AI are providing that same examples every time and i find myself having really hard times understanding how to create my own AI behavior

haughty coral
#

This looks interesting

#

I hope it will be recorded

dense owl
quartz badge
#

why does it say it's aborted but still going to the location??

unborn sphinx
#

is it a bad idea to have one main service ticking on the "root" selector to detect all sensed actors, sort them by how they were sensed, then escalate behavior approtiately? All logic in one tick function that bypasses checks if possible. I hope this is a good idea lmao

#

no more EQS on the sensed actors. It just pools them by priority, then selects a random one from the priotized pools. Usually there would really only be one or two actors in each pool on a given tick

#

BTW this is coming up in like ten minutes Livestream channel 3

plush cargo
#

trying to figure out how to get enums from the actor as a compare but it throws a red triangle.

#

i tried getting it from the context actor and from an evaluator that saves it to and output variable as enum.

#

but this state tree any enum eludes me

unborn sphinx
quartz badge
#

so my ai move to is always aborted, like everytime i try, the second one works fine but when i try to use it again, then it doesn't work, there maybe something wrong with the function for the first move to but i don't know

plush cargo
#

did you check that all valids are valid?

dense owl
umbral wave
quartz badge
slow sphinx
#

I really hope they come out with a new Learning Agent course that is more in-depth. I made a single change to theirs and it imediately fixed the issue I had with them all wanting to drive backwards

dense owl
dense owl
slow sphinx
#

Btw to fix the issue with them driving in reverse I just added a conditional reward that rewards them if their velocity is > 0

umbral wave
# dense owl Well it entirely depends on your definition of more complex AI, if you have a sp...

I guess that the things I still cannot figure out is creating my own stuff.
I get the meaning and use cases of tasks, it’s pretty simple. But decorators, services, the abortion, the correct logic of the eqs and its checks to create the necessary path for the ai, this are the things I cannot understand alone.
And following a tutorial is fine, but the deeper understanding of that is what I’m looking for. Currently my player side of events actions mechanics and everything in that side is pretty fine, Ai tho 😪😪😪

dense owl
hasty lake
#

it seems unreal doesnt really allow you to specify parameters on a context, do i need to hardcode the bbkey and such?

hasty lake
#

i tried with query params which seems almost ideal, BUT, that field doesnt have a bind option (generate around). im confused how to connect these systems.

hasty lake
#
sage patrol
#

I'm a bit confused about the behavior of this Simple Parallel node

#

I know the right side will get aborted once the main task is done, but it seems to never get called at all even though the main task is actively running

#

The main task "fails" for a few frames, which should reset the tree, but shouldn't the right task also get re-executed each time?

ivory rune
#

And would you like to show the whole BT graph?

sage patrol
#

Yes, the right one is definitely not getting called (I did set a breakpoint)

half stone
#

Hello there, I'm new to Unreal and I have some questions about AI.

I'm trying to make an enemy for my game. I want them to chase the player, switch to an encircling logic when they get near enough, get stunned when attacked, and attack when the enemy manager tells them to attack. I also need this to be inheritable so I can have different enemy types.

What engine features should I use to implement this? In other engines I would do a custom FSM implementation and just use that, but I'm not sure if Unreal has it's own way of doing things. I've been looking into behavior trees but I'm not convinced that it is what I need. For example this post is saying that I shouldn't jump between branches. Does that mean that behavior trees are not suitable for something like a stun state? Should I be using StateTree instead? The documentation says that it's an experimental feature and that I shouldn't use it in production. What am I missing here?

Epic Developer Community

This article explains basic do's and dont's about Behavior Trees that majority of community missing.

celest python
# half stone Hello there, I'm new to Unreal and I have some questions about AI. I'm trying t...

For example this post is saying that I shouldn't jump between branches
ChillBar_wave
I wrote that post

Problem with BTs since you manage the control flow by prioritizing, sometimes abstracting away states into prioritizations with decorators get difficult. And most common pitfall starters fall is trying to bruteforce their way into jumping to desired node in BT - which then you abuse how BTs are meant to be used

For things like getting stunned I usually handle this outside of the BT by temporarily disabling or locking braincomponent from AIController and enable it back once stun effect is removed. Using GAS also helps here a bit

But depending on the case you can prefer to keep this on BT too, but since you mentioned this happens everytime AI gets attacked this is more like a "responstion" or "reaction" to an event rather than a "behavior" that should be prioritized so I wouldnt want this to be on BT personally

#

StateTree could be used for this but it's not a complete FSM solution either, I didnt find it convenient enough. Its also buggy af

half stone
# celest python > For example this post is saying that I shouldn't jump between branches <a:Chil...

Yeah I'm getting more and more convinced BT is not what I need. I also need special cases where enemies shouldn't get stunned so just disabling the whole controller is not ideal.

I think I'll give StateTree a try since I'm not expecting any complex behavior from it, just a way to switch between states. If it doesn't work well I might just write my own FSM in C++ and extend it with blueprints.

Thanks for the reply

pallid mica
#

Was it possible to change the NavArea Class of a NavModifierComponent runtime?
I can see the color change of the NavMesh during Editor but not during runtime

#

Ah I didn't enable runtime stuff I think

#

Yap that was it, nvm me

celest python
half stone
celest python
#

read this

#

I'm stacking BTs/tasks/other and adding another layer of behavior deciding to smoothly solve this

pallid mica
#

What's the deal with Nav Paths going from "EndLocation" to "After the NavArea"?
I generate Paths from the current Agent Location to some End Location.

If there is no NavArea in between it properly generates a Path from Start to End, with Index 0 being Start and n-1 being End.
If there is a NavArea (Cost 0) in between it generates a Path from End to "After the NavArea", with Index 0 being End and n-1 being "After the NavArea".

#

Am I missing some setting?

#

Path with no NavArea in between

#

Path with NavArea (green) in between

Start Point is the same as the first image, so should be on the left side.

#

FPathFindingQuery Query(NavMeshSubsystem, *NavData, NavAgentLocation, TargetLocation);

pallid mica
#

Hm, the also seems to have to do with the length of the path

#

Made a small test actor to generate the path

#

It seems to break as soon a I reach a specific Nav Poly

pallid mica
#

Tried with custom Query Filter, same result. If I exclude my Area (so they can't use it) it will generate a path over a different part of the map, which is even longer, and that one works fine.
I'm smelling an Engine bug

calm musk
#

Hey i'm spawning a lot of same AI in a map but only the 50 first of them fire the behavior tree, does anybody knows why ?

feral sedge
#

Has anybody dealt with issues with AI losing connection to navigation when using World Partition? I have a 1.5X4 map and when I go from one side to another the AI enemies work, but on the way back, the AI will only attack if you get close; they stop moving/patrolling). Appreciate any help!

slow sphinx
#

I hope that eventually they add a Graph for the Learning Agent logs so that you can visualize them on a chart.

thick anvil
#

How can I tell when an AI has reached it's destination when using State Tree? I can't figure it out. I tried to use the AI MoveTo node, but it doesn't exist in functions.

#

It feels like I'm missing something

tough tulip
#

Alternatively, you could use the blackboard move to task, that will handle arriving or not arriving automatically

#

If anyone is familiar with the Detour crowd avoidance system, do you know if the only way to make use of it is to create child bp's off the standard class in bp? Or is there a hidden checkbox under a different name?

tough tulip
thick anvil
tough tulip
thick anvil
#

I'm using State Tree tasks, not Behaviour Trees

tough tulip
thick anvil
#

No problem. Also, I believe they are no longer experimental but may be wrong

tough tulip
tough tulip
#

If it is, then you could activate a transition to move to the next state

unborn sphinx
#

is it ok if I refer to my behavior trees as behavior logic trees so that I can call them blts? Goo ok so finally I got my blt workin on a basic level lmao. I think I am ticking too much in one service... or my MeatHuman NPC are clustering.

thick anvil
#

does the "Invert" box turn this from "equals" to "not equals"

dense owl
dusky lily
#

ok, so im stuck here. THis wasnt an issue with my first enemy, only the copies.

dense owl
dusky lily
#

well. its an issue for my first enemy too now. it seems my mesh is busted

dense owl
#

Try removing the mesh and adding it again

#

Also, just to make sure, your enemies don’t have can ever affect navigation on, right?

dusky lily
#

correct

dense owl
#

That’s good

dusky lily
#

ok, well now P properly shows that no mesh is even being generated

#

but I have no idea why

dense owl
dusky lily
#

ok

#

idk if you saw but my lighting build failed horribly. is there anything about having the engine open for hours on end breaking things?

frosty pond
#

Does anyone have a good suggestion on lifecycle methods to use for UBTService instances? I was using OnBecameRelevant and OnCeaseRelevant to bind a listener, but am having doubts based on delegate adding related crashes I'm seeing

#

Unless perhaps I'm not able to bind delegate methods in a service?

dusky lily
#

neight were fixed by restarts 🙃

dense owl
#

Try building paths, not sure what’s wrong with your navmesh there

#

Maybe make sure it’s at 0,0,0, I think I’ve seen people break it that way

dusky lily
#

the whole level is offset from 0,0,0,

dusky lily
dense owl
#

Idk tbh, odd that your navmesh just broke. Maybe try to retrace your steps before it stopped working

dusky lily
#

it worked one time

dense owl
#

That looks like it’s working

dusky lily
#

can it only see the player when theyre NOT on the mesh????

dense owl
#

Sounds like opposite to what’s supposed to happen. Is the player affecting nav? Also are you using pawn sensing instead of AI perception ?

dusky lily
#

yes

#

im using pawn sensing

#

stupid tutorials bro

#

time to switch to AI perception

frosty pond
#

Are we able to use delegates in services or are there multi-threading considerations?

dense owl
dusky lily
#

ok we'll see

dusky lily
#

alright, i made the switch and it works, its just time to figure out why they cant move

dusky lily
# dense owl Prly just an old tutorial

so I started from the ground up using an AI system instead. The new enemy only has the code to move to the player, but cant. So the only thing that can be wrong is the nav mesh

#

aww man

#

i cant even save my level now

#

it works on the base level, but not on my new level

uneven cloud
frosty pond
# uneven cloud You should be able to use a delegate in a service.

It was so odd. I kept crashing around unsafe access exceptions in those initial methods.

I tried putting the bind into on tick, with a guard to only add it once... and it works.

What are the chances that the delegate adding fails because it's all running too early in the AI characters life cycle?

I'm pulling the delegate from an actor component on the ai

uneven cloud
frosty pond
#

It's my first experience with BT in general and was working on pre-spawned characters, but crashes when I try to spawn them into the world

frosty pond
# uneven cloud Unlikely to be happening too early.

It has me thinking I'm approaching the problem wrong.

Is a service a good place to put logic which updates a BlackBoard based on a delegate callback? Is this better suited to live in an AI controller or another construct?

misty wharf
#

It kinda depends on how you want it to work I think

#

Services can be used for that, but sometimes you need to wait for it before moving onto the next task. I think in cases like that, a task node may work better, since you can actually have it only finish after the delegate has fired

stoic cove
#

Why is ai move to returning "aborted" yet my AI seems to move to the location perfectly fine?

#

It works, but the engine is telling me it's not?

#

Is this just an engine bug I can ignore or what's up?

tough tulip
stoic cove
#

Yes

#

Tried both location and actor, same result

#

My AI moves though

#

Like, visually speaking I don't see any issues tbh

#

But the abort error is bothering me

#

I feel like something isn't working as intended

tough tulip
#

Yea that is strange, if you ask the AI to move to multiple locations one after another, does it consistently produce the same result too?

stoic cove
#

Yeah afaik it does

tough tulip
#

That is strange. I suppose as long as the functionality works as it should, you could cautiously move forward. I do wonder what happens if you attach the print string to on success, and then see what the movement result outputs

dense owl
stoic cove
#

Yeah checking the code flow atm

#

to see what's up, might have an idea

dense owl
#

You might be calling the move twice

#

I’ve seen someone have that show up in their log when presented with this issue

stoic cove
#

Yeah indeed I think it's constantly retriggereing the move to node

#

Which then would make sense that it aborts, because a new move to is requested so it aborts the old one

#

Yeah pretty sure this is the problem 🙂

neat hatch
#

how do I fix the issue where the ai perception can see their target through backface culling?

#

currently "TwoSided" is disabled

frosty pond
# misty wharf Services can be used for that, but sometimes you need to wait for it before movi...

In this case I'm listening for a health change delegate, that lives on an actor component of the ai, which writes the updated health % to the black board. Service feels appropriate since I'm not waiting for anything...

It's just puzzling why I'm getting access exception crashes when calling AddDynamic on it. It doesn't happen if the AI is already spawned when the game starts, only after new ones spawn in.

#

I'm starting the behavior tree from the ai controller's begin gameplay method

misty wharf
#

I don't remember for sure but BeginPlay might be sometimes called before the AI controller takes possession of a pawn

uneven cloud
frosty pond
uneven cloud
frosty pond
#

Aha

uneven cloud
#

You need to wait to start it until possession so that you have a pawn.

misty wharf
#

iirc the way I have it set up is that I have a function to start it, and it gets called both from begin play and possess

frosty pond
#

Ok sweet I'll try that out later today when I'm back at my computer, but I think it's all making sense

misty wharf
#

and the function just checks that both the begin play has occurred and there is a possessed pawn

uneven cloud
#

Also, if you are crashing in your BT nodes when you don't yet have a pawn, then you aren't checking your pointers.

frosty pond
#

In this case I have guards around all the pointers I'm accessing

#

Or at least I thought that I did, pretty sure I checked that

slow sphinx
#

Well I just figured out you can't add Observations to a training model without reseting the Neural Network Data Asset. Apparently they haven't added the ability to Transfer weights yet.

#

I'm just assuming that's a common practice in training Ai models becaue CoPilot seemed to believe that I could Transfer the weights to a new model with more input nodes

#

But after investigating it's claims there didn't seem to be any way to do that in Unreal

dense owl
#

o.o Copilot pulling a ChatGPT

slow sphinx
# dense owl o.o Copilot pulling a ChatGPT

Yeah, but they are useful if your familiar with their antics. I wouldn't have figured out that adding observation to the training model would require me to start training over if It hadn't given me enough information to go on.

dense owl
#

Yeah, Copilot can be a useful assistant

slow sphinx
#

The error it was giving me wasn't even related to the correct BP, it was pointing me to another one lol

slow sphinx
#

It's really good at finding stuff though. It helped me find a video that didn't pull up in any of my Learning Agent searches on YouTube for some reason

#

He has 2 videos on it, the only source for Imitation Learning I have found

dense owl
#

Is this for a companion type of AI?

slow sphinx
slow sphinx
#

They have quite the learning curve though, the Epic Games tutorial doesn't go into enough detail in my opinion.

#

But I understand they are only teaching people to use it, I'm assuming with the assumption they have experience training Ai models

dense owl
#

You don’t always want your AI to be super smart either, so prly less popular

slow sphinx
#

Something like driving a vehicle would probably make sense though

#

I've been trying to train it to drive and man does that take a while, the Epic Tutorial said it will only take 2 hours but using their setup it never seems to figure out how to steer

#

or maintain consistent throttle or steering. It seems to be just randomly trying stuff without ever picking up on anything

#

I managed to get it to maintain the throttle for long enough to reach 40 just before stomping on the brake though lol

#

I have to reward it for maintaining it's gear at or higher then 1 though

#

If it's current gear is equal or higher then it's last gear, I reward it

#

Before adding that the best I could do was crash the engine after training it for 1.5 - 2 hours or if I trained it about 1 hour at a time I was able to get it to roll backwards at 1-5 mph until it rolled off the track lol

#

So Idk why they say it should be fully trained after 2 hours, because from what I've seen that's a very un-realistic number

dense owl
#

Yeah I can see how that would be necessary here

frosty pond
#

@uneven cloud @misty wharf Thanks so much, it was definitely because I was starting the BT in BeginPlay instead of the OnPossess.

Now that my service works - I have a question regarding the safety of holding on to references inside of them. The service itself is set to instance, I have the delegate working great - since I need an instance of the blackboard and ai pawn (which I save inOnInstanceCreated OwnerComp and clear in OnInstanceDestroyed - I presume there shouldn't be any issues with holding references?

uneven cloud
slow sphinx
frosty pond
unborn sphinx
#

Because if u train it on a known race line, then it can maybe try and adapt that approach to new tracks?

#

I mean sure it is interesting to try and teach it from the ground up but who's got time for that? lmao

slow sphinx
unborn sphinx
#

Just having it hit the race line at any speed will be learning enough for it

slow sphinx
#

So it's fairly likely that If I start them off on a simple track that it would be much more likely to pickup on it. Might be something I break down and test out this weekend

unborn sphinx
#

trying to figure out that racing line is too next level

#

it should do that AFTER it is trained

#

lik put a spline and highly reward it for staying on it

slow sphinx
#

every time weighting stuff. The longer the episodes the more resources are required and the longer it takes to train

unborn sphinx
#

can u link me the epic tutorial/docs u used?

slow sphinx
#

Yeah sure give me a sec

unborn sphinx
#

so are you training 32 cars at once on the track colliding with one another?

slow sphinx
unborn sphinx
#

thank you

slow sphinx
unborn sphinx
#

btw I am t1000 ur dead now bam

#

lmao

slow sphinx
#

to simplify the training

slow sphinx
unborn sphinx
#

oh i see so it is 32 agents to reduce training time

slow sphinx
unborn sphinx
#

gotcha I was like oh fuck no

#

u can't try and train them all hittin each other

#

lmao

#

that would be WILD

slow sphinx
#

I could probably add more without crashing but idk

slow sphinx
unborn sphinx
#

haha yeah I know I just mean woah

slow sphinx
#

Honestly they probably should have started off with something simpler

unborn sphinx
#

solving a maze walking?

#

that is too easy tho isn't it?

slow sphinx
#

perhaps yeah

#

Nah

unborn sphinx
#

I mean I guess it is cool for the AI to do it in the ML way

slow sphinx
#

I wouldn't think so....getting the handle on training and setting this stuff up is difficult enough

#

the easier the better for beginners

unborn sphinx
#

but like in real life and other systems it is easy for biological organisms and algorithms to pathfind lmao

#

doing it in a natural manner tho would be neat

#

like not borign straight lines

slow sphinx
#

Yeah, reinforment learning is pretty old though. I think it was first successfully used in the 90's

unborn sphinx
#

it would actually be really cool to somehow train the agents to walk in patterns that seem more human

slow sphinx
#

I'm sure you can. The learning agent plugin supports reinforcement learning and imitation learning

#

that YouTube page I linked earlier touches on the Imitation Learning side

#

he has a 45 minute video on what he did and how he set his up

#

I wouldn't recommend that until you've followed the Epic Guide though

unborn sphinx
#

ohhhh cool

#

thanks

slow sphinx
unborn sphinx
#

i am too busy with a game idea lmao I am sharing this with my brother who is looking for a project and is into this on an academic level

#

don't think he has used UE like this before tho

slow sphinx
#
Epic Developer Community Forums

Get familiar with Learning Agents: a machine learning plugin for AI bots. Learning Agents allows you to train your NPCs via reinforcement & imitation learning. It can be used to create game-playing agents, physics-based animations, automated QA bots, and much more! https://dev.epicgames.com/community/learning/courses/M3D/unreal-engine-learning-...

#

The more attention this gets the more likely it will be that they improve and update it

unborn sphinx
#

can u take the trained AI and use it in a game or is that ridiculous?

slow sphinx
unborn sphinx
#

how does the resulting data look? how does it move the npc?

slow sphinx
#

You just have to make a slight alteration to the training manager after your satisfied with it

#

the results are stored in a Data Asset

#

you switch over to Inference when you want to test it or use it in the game

unborn sphinx
#

can it be called from a behaviour tree? lmao

slow sphinx
#

The guy in that video I listed does that yes

unborn sphinx
#

ok this is wild lmao

slow sphinx
#

He trained his to block attack from different angles

unborn sphinx
#

do u think it is feasible to have like 64 agents goin all at once?

#

for a multiplayer scenario server runnin all the bots for clients

slow sphinx
#

Possibly, I only use about 50% of my 3090 utilization

unborn sphinx
#

is the inferencing gpu nased? right

#

that makes sense I am an idiot

#

I was thinking cpu

slow sphinx
#

training will be significantly heavier

unborn sphinx
#

this is great actually a way to use the gpu for npc

unborn sphinx
slow sphinx
#

inference will simply run the data through, training is more intensive

unborn sphinx
#

don't tell me it's using pytorch lmao

#

it can't be

slow sphinx
#

keeping Observations to a minimal will make it less intensive, but you can also control the number of nodes used too. By default it's 128 I think

slow sphinx
#

The training doesn't happen in Unreal

unborn sphinx
#

wow

slow sphinx
#

It passes it off to Python

unborn sphinx
#

I bet the performance could be better then

slow sphinx
#

I'm not 100% it's specifically using Pytorch but it's likely

unborn sphinx
#

i've heard of some ML projects making c++ native spin offs that use no pytorch and they are very fast

slow sphinx
unborn sphinx
#

whisper c++ for example

slow sphinx
#

only the training will be in Python

unborn sphinx
#

oh nice

#

that is fine then

slow sphinx
shadow sapphire
#

Hey guys, I would love some help on this issue. Been stuck for a while.
I have been trying to set up a simple jump/lunge attack for an ai. Thus far I have been using LaunchCharacter and it has been working, but I want to increase the speed of the lunge without the character way over shooting the target.

Is there a better built in function for this in game? Essentially having an AI get player position then jump to that position. I was thinking of alternatively having it just use a transform and a lerp to get it there while having the animation convey the actual jump motion but then I run into issues of what if the player is behind cover.

My level geometry also isnt flat, there are hills ,bumps, and stairs; LaunchCharacter can help clear these obstacles or bounce off them, but the transform will just cause it to phase through hills and such.

unborn sphinx
#

I almost feel stupid for spending so long getting a regular BT working but lmao I doubt I can just plug and ply some trained agents into the game. WIll take work

slow sphinx
#

At least that's one possibility

slow sphinx
unborn sphinx
#

Yeah I know but just things are moving so fast with ML it feels so weird to not be using it but then there is always a double edge sword

slow sphinx
#

Like I said the guy in that video only uses it for 2 different things and he is firing them from a Behavior tree

unborn sphinx
#

gotta find that link

slow sphinx
#

I haven't watched the full video

#

Learn how to use the new Learning Agents Plugin to do real time reinforcement and imitation learning and see how I am using this in Swordai: https://store.steampowered.com/app/2321890/Swordai/, my upcoming multiplayer slasher.

This video assumes you are familiar with the Learning To Drive tutorial from epic here: https://dev.epicgames.com/commu...

▶ Play video
#

He made a follow up video to that one too

#

make sure to like and subscribe to his channel, he has the only video covering It I believe

shadow sapphire
slow sphinx
#

you have to set it up for it in the blueprint I mean

#

like the variables have to be set from there such as the position of the target

shadow sapphire
#

Wouldn't this run into the same issue as transformation where if there is a wall or a hill then the ai would phase through it or slide against it until it reaches its target?

uneven cloud
unborn sphinx
#

That would be my first instinct. And now that I have spent a few weeks working out my own BT from scratch it is starting to give fantastic results. Don't see the need for ML at this point really. But it will be neat to play with to see how it could be used.

#

When should I split a BT into two? I am using it for opposing teams, and decorating certain sequences or parts of sequences away from one team. Most of the other behavior is generally shared. When do I split them into separate trees? I feel like it's less work having them all on one and catching the few differences

#

I guess when I feel like it is more working maintaining the different behavior needs than it would be maintaining the shared behavior changes across them hmmm

#

I guess at the point I would just make subset trees that I can run based on team

dense owl
slow sphinx
#

You will need to perform you own calculations though, tracing for obstacles.

#

Nothing in Unreal is Automated, everything requires a setup and extra logic

slow sphinx
# uneven cloud ML is too much of a black box to give good and tunable NPC behavior.

Maybe not on a large scale but I think it's worth learning how Ai works and becoming familiar with it since it's on the rise and I'm sure if your creative enough you could come up with some decision behavior that makes good use of it.

This Learning Agent plugin isn't designed to replace behavior trees by any means, it actually works with behavior trees and can be used as a leaf on it.

unborn sphinx
#

It could be fun to take just like the bare bones lyra starter game and train the bots. They are pretty rudimentary as is so u miiight have to do some basic bt work but it would be wild as a test setting

#

Or like wat if u could train an agent to select the correct behavior tree to run... 😐

plush cargo
#

Is there any decent combat AI tutorials out there because im seriously at a mental cap. im exhausting myself trying to make my own AI. learning nothing from it either 🙂

quiet fiber
#

is there a way to make an EQS trace ignore the querier that owns it?

#

my whole system has just fallen apart with that single omission of what I thought was a universal feature

unborn sphinx
plush cargo
unborn sphinx
#

what drew you to use state tree?

plush cargo
#

I'll go with BT and take extra care to formulate broad actions via the subroutines

#

Next week

#

Just forgetting ST will ease my mind

unborn sphinx
#

Good call. See what you can accomplish using BT and then maybe adapt that approach to ST if it feels right.

forest tundra
#

please help

rapid tiger
#

Hello, I want to create a Zombie Horde System in Blueprints. So basically I want Zombies to move together in a specific direction. My first thought was:

If 2 Zombies are in a specific range to each other, one of them gets assigned the group/horde leader, and the other zombie follows him. That would work if there's only a small amount of zombies in that specific range. Theres many edge cases I don't currently know how to solve, like what if there's a constellation like this one in the image. If Z2 is in the range of Z1 and Z3 the "Who gets the group/horde leader role" decision would happen twice, if Z2 gets the group leader role in both cases, everything would be fine, but if Z1 and Z3 get the group leader role, then who would Z2 follow?

So I wanted to ask are there any approaches you guys would recommend me for a zombie horde system?

#

The decision would even have to be made three times since Z2 is also in the range of Z3 😄

wind moat
#

Has anyone encountered a bug where in the editor itself, when you start a game NPCs walk on the navmesh just fine, but after shipping the game and playing it outside the editor, they all stand stuck in place?

unborn sphinx
dense owl
#

But maybe you need to be using smart objects

uneven cloud
oblique basin
uneven cloud
# forest tundra please help

You seem to have a fundamental misunderstanding of how BTs and decorators work. You have a decorator for a blackboard value that is changed via a task beneath it. This is not going to give you the behavior you are looking for.

uneven cloud
dense owl
#

the AI just wants to demolish the player 😄

#

on a side note, just wanted to take a moment to appreciate the irony that a user named @slow sphinx is trying to make an AI that uses ML

potent loom
#

Behaviour shaping is very fixable, but making it cheap is something that we're still struggling with in the community

#

There's the extra problem that if your network has a latency of like 400MS to calculate, you end up also being very restricted in application

rapid tiger
# uneven cloud You want a manager to make those decisions, not the individual zombies. How you...

Yeah, so depending on how close zombies are to each other, one of them always has to be the leader, if a horde comes by one single zombie, he should automatically be "picked up" by the leader, so he follows him around.

I wanna add stuff like a small chance that a zombie doesnt follow his leader around anymore after some time, so the horde will get smaller as time passes, but thats something else.

uneven cloud
potent loom
#

As a general statement that's just not true, ML is a function aproximator and you can easily converge the behaviour

#

Large network convergence causes mode collapse so in larger networks the bias-variance tradeoff for convergence and modality is a craftable thing but it's "solvable" with enough time

#

The idea that ML is a black box is mostly just romanticization

dense owl
#

You have real world examples of this being successfully used in a game ?

potent loom
#

There's a stanford project using a giant language model that is pretty cool, but in my cases the cost is easily the most limiting factor

dense owl
#

Should I repeat the question ?

uneven cloud
#

I've seen what ML researchers consider tunable behavior. They clearly have never worked with a designer.

potent loom
#

The question is if it's successfully used in a game, stanford has a game that's using a giant language model yeah

#

It's turn based and everything is done via a massive server

dense owl
#

What’s it called

potent loom
#

the cost isin't practical for real games right now imo

dense owl
#

How much is it?

potent loom
#

it's free

#

I can dig up the paper somewhere

dense owl
#

Oh, so not a real game gotcha

potent loom
#

Well depending on your definition of a real game

#

It's playable

#

You just walk around talking to NPCs and they have dialogue with eachother and you

#

I don't think it's practical to use ML for games either right now for large networks

uneven cloud
#

That's not a real game. LLMs being used in games is unlikely to happen, because you want to control the narrative.

potent loom
#

You want to control the narrative, some people want interesting free expression and dynamic stories

#

different applications

dense owl
#

it's unfortunate but smart AI != fun game. The goal is to make AI that seems smart

#

otherwise you end up having to do what TLOU did and roll it back

#

it's not dissimilar to most things that "make sense" IRL but in game development they're trickier

potent loom
#

Yeah I think the applications of AI for the short term will mostly be difficult to simulate decision making and cost tradeoffs, maybe also dialogue but that's so expensive it seems unreasonable right now

#

things you can do cheaply and don't have a huge scope

dense owl
#

what we need is ML for our own brains first, then we can maybe design smarter AI 😄

uneven cloud
potent loom
#

What spell to cast, for example, is a pretty approachable problem that is something realistic to do right now based on some point cloud data, a few spells, and some metadata about surrounding npcs

#

but like the full EA dynamic combatant simulation seems yeah, totally nuts

#

it's something xD

uneven cloud
potent loom
#

There's room for both things surely, and AI is a big thing with many possible avenues for applications

unborn sphinx
#

I wonder if ML could be used for small tasks like just walking to a goal. The minutia of it, how a human veers off course but still does find the desired path

dense owl
#

Much easier to just use nav costs, see GDC on Death Stranding

unborn sphinx
#

can u add noise to those costs?

#

like different for each calculation?

#

but that still relies on dense nav mesh right? what about smaller deviations?

dense owl
#

Wouldn’t make much sense to do so

#

All the sudden you’re speeding over hard terrain ?

unborn sphinx
#

does the cost typically alter the movement speed dynamically?

#

Imagine an MLMoveTo node all it does is use a trained... uh... floating point magic box... to move along the typical found path. Like it's not doing pathfinding, just path altering.

dense owl
#

That post-mortem is worth a watch

unborn sphinx
#

yes, the cost of a nav poly alters the CMC movement speed?

#

or is typically set up that way?

potent loom
unborn sphinx
#

Back to normal stuff: what would be the difference between an EQS generator returning an actor vs the actor's location vector, when using the result for a test in an eqs query.

Shoul I just use the location? Will it not work if I test against an actor context vs a vector context for distance?

#

I could just try it but I always like to know what the right approach is regardless if whether something seems to work or not

slow sphinx
# oblique basin To say ML for game AI is on the rise is incorrect. The vast majority of attempts...

Could you please quote me where I said 'ML for game AI' is on the rise? because I looked for where I said that and I'm not seeing it. Also, @uneven cloud could you quote where I said it was new? Because the only thing I could find was a reference to me saying that Reinforcement Learning was first successfully used (referring to games) back in like the 90's. After doing a quick search I see that was actually the 80's, but you could say the early 50's if you count that maze (Marvin Minsky).

But hey if you guys have a problem with it take it up with Epic Games, they are the ones that added it not me. I'm just experimenting with it and personally I don't see anything wrong with that.

What I do see a problem with is people openly trying to discourage the use of Ai. They are fighting a losing battle. Ai is inevitable.

#

I also never said that using it in a game was a great idea. I did mention that if your creative you might be able to find some use cases where it makes sense though

#

Also, @oblique basin what I said was that Ai is on the rise and that it's worth becoming familiar with how it works. I never referenced Machine Learning, or specifically said "Machine Learning is on the rise specifically for games and so everyone should jump on it"......Such a statement was never made

uneven cloud
slow sphinx
#

When I said Ai is on the rise I'm talking about next level stuff like what Nvidia is working on.
https://youtu.be/8oIQy6fxfCA?si=F3NdjJT14r02KVUO

With adversarial reinforcement learning, physically simulated characters can be developed that automatically synthesize lifelike and responsive behaviors.

A character is first trained to perform complex motor skills by imitating human motion data. Once the character has acquired a rich repertoire of skills, it can reuse those skills to perform...

▶ Play video
#

And that demo was released a year ago

slow sphinx
pale oyster
#

Is it the best practice to put all the detailed attack logic for enemies inside a custom Task or to put it into the enemy actor's blueprint and just use the task as a way to start the event inside the Actor blueprint? Eg this:

unborn sphinx
#

Is it better to test pathfinding length from querier to generated items (from custom generator, gathering all actors of class with custom logic) or from those same actors/locations provided as context and testing path from context to querier? Lyra seems to do the context to querier method. Is there a reason?

wind moat
unborn sphinx
wind moat
#

@unborn sphinx Oh. It saves the navmesh better? I'll try. And what does build do btw, I never did it. Like Lumen light for example can be so odd, turn around from lightsource and everything goes dark, or it illuminates everything in wierd patchy spot like way. Would building light fix it? (sorry for off-topic, will ask just once)

tawdry zephyr
# slow sphinx When I said Ai is on the rise I'm talking about next level stuff like what Nvidi...

Traditional animation techniques tend to produce stiff and unresponsive behaviours
。。。proceeds to show a video of the worst example they could find 。。。
*・・・➜ shows their own work which looks a lot worse than traditional animation・・・➜ *
(Its cool tech tho)
Also this channel isn't for the type of AI you're referring to, its for coding AI behaviours in games, ML/generative AI is unrelated

unborn sphinx
#

or more transient. less persistent

unborn sphinx
wind moat
unborn sphinx
#

np

slow sphinx
tawdry zephyr
#

Why are you so angry? This isn't the place for it

#

No ones attacking you

#

I didn't say anything at all about TLOU so I'm not sure why you're claiming I said that

unborn sphinx
#

I would argue these learning agents kinda are a little bit in the right place here.

#

this is not generative ai really

slow sphinx
#

And yes it is an attack when 3 people all start pouncing on me

tawdry zephyr
#

I'm not sure what server you think this is, but if you're likening it to Reddit then that's a pretty good indication that you're misunderstanding it's purpose

slow sphinx
tawdry zephyr
#

Weird

#

@pine steeple Can you clean this up

slow sphinx
#

Motion Matching is a Machine Learning algorithm so I find it highly ironic that people would say Machine Learning isn't feasible in game development

tawdry zephyr
#

I think we're going to have more and more people trying to discuss generative AI in here due to the misunderstanding with the conflicting name

slow sphinx
#

Especially since it's used in The Last of Us 2
https://youtu.be/QiY5VZGcDEw?si=mxbdZ3UX88ssJIt-

original video : https://vimeo.com/474306261

the last of us part 2,
the last of us part 2 trailer,
the last of us part 3,
the last of us part 1,
the last of us part 2 gameplay,
the last of us part 2 review,
the last of us part 2 ending,
the last of us part 2 walkthrough,
the last of us part abby,
the last of us part 2 all collectibles,
the las...

▶ Play video
tawdry zephyr
#

I am deeply familiar with most locomotion systems including motion warping
Familiar enough to know that it has nothing to do with this channel
Please take it somewhere appropriate, #animation is a better fit
I don't know who you think believes that motion warping or machine learning isn't feasible in games, but its used in UE5 already for various purposes

potent loom
#

would be nice to have an #machine-learning channel with things like chaos cloth and whatnot

#

probably going to see more like it soon

tawdry zephyr
#

There are already others such as ML deformer for character skin deformations

upper terrace
#

can someone pls pls pls help me.

I'm trying to making a ai ship in which ai ship 🚢 chase enemy ship 🚢 but im not able to make it after spending 3 weeks in it. Can u pls give me a overview of how will do this if u wanna make a ai ship chasing system. And i used ai move to node it doesn't work. It is made for characters so it doesn't work on vehicle properly

dense owl
#

It works with floating pawn movement component too

#

All things you’ve been told before sadly

upper terrace
#

Ai move to node doesn't really work on that.

#

And what I'm doing is controlling ai ship by calculations. And so far I'm making a mistake at a point because when both ship ai ship and enemy ship are in same line like parallel side by side. Then ai ship keep going forward without turning back because enemy ship is in the same direction. Ah basically both forward vectors aligned so ai ship keep moving straight but i don't want that behavior I want to make it always look at enemy ship without considering the x y components. And that's what I'm trying to find of how to do this

#

Check this out

dense owl
#

Yes, you’re showing another game. You want your ships to move in parallel to the ship or not?

upper terrace
unborn sphinx
#

I have a GAS gameplay ability for setting the CMC to running speed. Walk is default. Players hold shift to run. Should I feel bad for adding a one second delay to the end ability, and using a service to constantly retrigger the ability to make the ai run? 😐

#

I should definitely feel bad for that right

fathom sun
#

Hello, I'm wondering whether it's possible to add some custom steering to the AI to the existing UE tools? How should I go about it?

unborn sphinx
#

sounds like a custom movement mode

fathom sun
unborn sphinx
#

oh I don't know for sure, but it just sounds like the CMC custom movement mode. I don't know tho maybe the default one works.

#

never used anything but walk mode lmao sorry

unborn sphinx
#

well it works so I am doing it and it's only ticking like once a second. Players just have to run for min 1 second at a time lmao.

wooden echo
#

is there any way to set how frequently my AI is running its behavior tree?

keen crow
#

Do you guys do autotests (or integration tests) for AI features? How hard was it to setup and does it worth it to support all possible situations to test in the end of the day? 🤔 I'm just thinking about it because I'm about to fix something, but the AI logic is so complex at this point that I'm afraid by fixing one issue I can introduce 3 more

unborn sphinx
#

I just did a functional test and I think I am done my first playable NPC behavior logic tree. damn that feels good what a whirlwind lmao

#

functional test meaning u just play it and make sure it works right? lmao

hot compass
#

The BTTask Blueprint Base's aren't populating in the target selection, also, if creating a variable for it and trying to set it there, they also don't populate there. Any ideas what is being overlooked? Documentation on this is severely lacking.

hot compass
harsh storm
#

Maybe an old picture? Because I can't find that function (in the way that it is written at least)

#

It definitely exists in BTT BP Base though

#

This is the only place I found it

hot compass
#

if he creates a variable by promoting the input pin to the node, and tries to manually set the variable to his BTT Task Blueprint Base, they do not show up in his list of options to choose from

harsh storm
#

He needs to pass in an actual reference to a BTTask.

#

One that is actually instanced

#

Unless he selects the class option

#

But the class option won't allow him to call that function because it expects to be called on an instanced task.

#

So, much like you couldn't select an object reference for BP_Character in the dropdown (because it needs to be instanced), you can't do it for the BTTask either.

hot compass
#

gotcha, that makes sense, he can't quite figure out how to get a reference to it

harsh storm
#

I don't know why he wants one, but you can create a field in the blackboard, and then set that field on Execute AI in the task

#

I'm assuming he wants the reference for one task, inside of another task

hot compass
#

unsure as well, just trying to help ^_^ this isn't my field, so

harsh storm
#

(Which is weird honestly)

hot compass
#

one, sec i'm gonna drag him into the channel so he can give better information

harsh storm
#

I can jump in voice when he undeafens himself

hot compass
#

word

hot compass
harsh storm
hot compass
#

sigh, lol, he'll be kicking himself in the butt for a while for that one

#

happens to all of us, but it sucks worse when someone else points it out to you lol

#

versus wasting a day and discovering it yourself

harsh storm
#

It do be like that sometimes

river hare
# harsh storm It do be like that sometimes

Just wanted to say thankyou one more time for your assistance. I know I kind of rushed out on you, wasn't trying to be rude. also thanks @hot compass for posting for me. Yall's help is much appreciated.

jade gust
#

I have a question, I'm trying to stop AIs from using the same nav link for a certain amount of time so it doesn't look like they're looping. Is there a way to stop a specific nav link from being considered during pathfinding without an engine change?

jade gust
misty wharf
#

Anyone familiar with StateTrees? For some reason the Actor context property on my evaluator is comign out as nullptr and it just started happening randomly

#

It gets it via Context.GetInstanceData, and there is a GetInstanceDataType function defined on the evaluator... it used to work just fine and now it just stopped

misty wharf
#

I created another evaluator in BPs which just prints out the Actor context value and it works just fine... ugh why is this so poorly documented as to how exactly this is supposed to work

celest python
#

I dont even complain anymore

misty wharf
#

Started working after I removed/recreated the evaluator in the ST.

#

Hope this is not a sign of things to come lol

harsh storm
#

I dropped ST because of stuff like this and editor bugginess. BT still works fine.

misty wharf
#

I'm trying it out in a small project just to see how it works. The basic idea seems good because a lot of my BT logic ends up being kinda stateful

spring inlet
#

there isn't a decorator to repeat a task until it finished with success?!

dense owl
#

You can use a decorator to abort out of the branch when your bb key set by the service is set to something

misty wharf
spring inlet
#

yea guess so, just didn't want to reinvent the wheel (and i don't like to have another blackboard key just for "flow control")

dusky lily
#

Hello, im having an issue where my enemy will path towards my enemy on a base level, but on my custom level the enemy will not move at all. It seems like the enemy is inactive when on this level, but works on the base third person level. I have replaced the character and the navmesh. Any ideas why this might not be working?

dusky lily
#

🤡 🤡 🤡

#

turns out, "can ever effect navigation" on a nav mesh is kinda important

ember agate
#

In my decorator, How do I check if a float is set?, I believe it returns zero if its not set, But I need to differentiate between a value that is set to zero and one that hasn't been set at all

dense owl
static crater
#

Some global question. My game uses a basic A* algorithm for navigation. Would it be somehow possible to use BT and tasks with it?

misty wharf
#

What does how your game manages navigation have to do with the ability to use behavior trees?

steady quartz
#

Hello! I'm currently working on a multiplayer game and in client ), if the player moves a little, the AI Sight perception of my enemies can sometimes see the player in a location in which they are not... has something similar happened to anyone? I don't know if its a question of my player's movement replication, or maybe it's the AI Sight replication.

I would greatly appreciate any ideas 😅

static crater
#

However i found that BT might require a PlayerController/AIController. I do not have these cause of optimisation perposes.

#

Sounds werid but my AI currently are plain actors (not a pawn) and do not have controllers.

wise sluice
#

BehaviorTree and Blackboard needs an AIController
They are not expensive 🤔

static crater
#

Thought so

wise sluice
#

What can be expensive is having everything made in blueprint (behavior tree evaluator ticking for instance)

static crater
#

However i'm talking about like 1 to 10k of AI

wise sluice
#

So you should use MassEntity

static crater
#

I thought about

#

However my own code right now is more flexible than Mass

wise sluice
#

That's impressive then

static crater
#

I was just looking into a way to use BT on my custom AI, like the graphs only

static crater
wise sluice
#

Are you kidding? 🤣

static crater
wise sluice
#

I am currently evaluating it and there is thousand of lines split among 20 modules

#

Are you using ECS architecture?

static crater
#

I don't

wise sluice
#

And do you use Actor / ActorComponent

static crater
#

Every AI is its own actor

wise sluice
#

This is expensive

static crater
#

I know, but only actors in view are being updated

wise sluice
#

Same as MassEntity 🤔

static crater
#

It does not really matter to have 10k of actors in world, when they do nothing 🙂

wise sluice
#

The thing is you got them in memory + you spawn them

static crater
#

Yep, true

wise sluice
#

But you will need AIController for each of them since you want Behavior Tree

static crater
#

Indeed, yep, that's basically what i needed to know. Might be a no-go

#

Actually 10k of active AIControllers does not sounds really good

wise sluice
#

What is your AI API only navigation?

#

The one that you told was more flexible than Mass?

static crater
#

Its a custom A* pathfinding system

wise sluice
#

It's just navigation then

#

You just need to plug it into Mass

dense owl
#

#mass is the most obvious route here

#

It’s what it was designed for

wise sluice
#

You make your own Fragment / Trait / Processor driven by your A* system

static crater
#

The more flexable i think is that my code is really easy to read, compared to Mass

wise sluice
#

And you can go with thousands of Agents (that can be actor at some point if you're very close)

static crater
#

Its a few lines of code to just calculate positions instead of actually moving actors

wise sluice
#

Mass is easy to read if you dig into it
But the whole architecture needs a bit of time to comprehend for sure

#

Mass is handling way more than just navigation

static crater
#

Yeah i found Mass a bit hard and perhaps not needed if my own system runs good without it

wise sluice
#

But you need behavior?

#

So either you use BT with 10k actors or you use Mass with 10k agents that run using StateTree

static crater
#

Actually the only reason i thought is not the background of BT But just the ability to use blueprint to create tasks etc.

#

Writing the tasks in c++ is boring

#

However so since BT just needs a AIController i dont think it will work well

#

Actually BT even needs a pawn instead of a Actor right?

wise sluice
#

Yes since they are controlled

static crater
#

Yup

#

With like 10k pawns instead of Actors even, i think it's not performent

#

I should move over to #mass now, but well 😅

wise sluice
#

Try it and you'll see

static crater
#

The idea is that my system now does the same as Mass does with a few lines of hacky code

wise sluice
#

Mass does wayyyyyy more than you do

#

Mass is not only navigation

static crater
#

Then i'm informed badly

wise sluice
#

MassNavigation is just one sub fragment of the MassGameplay plugin

static crater
#

Does MassNavigation uses anything like A* or its navmesh?

wise sluice
#

It's zone graph based but you also have navmesh in the community sample project

static crater
#

Aha okay

#

The problem is that my entire level is procedurally generated, ive been looking in the past to add zone graphs without any luck

wise sluice
#

Not sure what suit for PCG content

#

But there is definitely a way to make something working

#

The navmesh solution works smoothly on my side with 1k agents

static crater
wise sluice
#

The MassNavmesh processor 1.5ms for 10k agents on PC

static crater
#

Yeah since PCG is hot, mass might be somehow improved, not sure

#

So basically, i can generate my A* navigation grid in a second. I think Navmesh is obviously (way) much more expensive

#

Navmesh is basically a no go in either way

wise sluice
#

Yeah so it is definitely something that you need to link with Mass

#

You can drive your agent by giving next location and speed
And you get info from your algorithm

#

For navmesh solution
I have a task that compute each step of the path (so you could do the same but using your A*)
Then Mass just read step by step the path to move the agent

static crater
#

So yeah i assume Mass does actually handle tasks aswell? does it use the Tasks System?

wise sluice
#

it use StateTree

static crater
#

Okay yeah

wise sluice
#

StateTree Tasks are fully in c++ for now

static crater
#

Yeah aha

#

Well, thanks for the advise

wise sluice
#

You're welcome!

indigo field
#

Anyone tried tweaking Cell Height in UE5? Whenever it's different from 10, no navmesh is generated ...?

pastel moth
#

Do people use pawns when having a lot of actors in a game that need an AI controller?

#

Or do they just use the base actor class?

#

Im a bit confused with how that works.

#

Im trying to have a decent amount of entities (like villager NPC's) in my game that will have their own behavior

verbal shore
#

It's a preference, Pawns do not have CharacterMovementComponent, which is considered heavy on performance especially if you have plenty of characters spawned. So it's not related to AI.

pastel moth
#

Ah gotcha. Reading between the lines I think you're saying its safe to use pawn but if I want any kind of replicated movement etc for a large amount of entities.. I'd need to write my own movement component for that pawn.

verbal shore
#

Yes, it is safe to use pawns. If you want a decent movement capability, you can add one of the built-in movement components to your existing Pawn actor manually, or create your own from ground up.

Also for the performance, there are workarounds to keep using Character class, such as reducing tick rate of CharacterMovementComponent when they are not relevant etc. (out of sight for example)

pastel moth
#

I see. Thanks!

spring inlet
#

does someone know if nodememory resets once the node gets executed again? yesn't

wispy flame
#

I had the same issue, made some minor changes and mine works great now, in 15-20 mins its able to navigate the track. DM me if you are still facing this issue, i would be happy to share the changes with you for you to try.

uneven cloud
steady quartz
uneven cloud
steady quartz
uneven cloud
dusk pewter
#

Did the AI controller spawning and controlling change in 5.0?
I have a character, auto possess by player is false and I set an AIC on spawn/placed.
When playing in editor, the AIC spawns but when I debug, it says that my controller is my player controller... what's going on?

#

And I can fix most of it by manually spawning an AIC and possessing

dense owl
#

Is this char placed or spawned currently?

dusk pewter
#

spawned

dense owl
#

Are you using spawn actor or spawn AI from class?

#

And did you set the default AI controller on the pawn

dusk pewter
#

well it seems that if spawned, it won't work

#

but if placed it works

#

5.3.1

dense owl
#

I’m asking about the node you’re using

dusk pewter
#

no node, it's the player start

dense owl
#

You’re not using a spawn node?

dusk pewter
#

no it's my character

#

I'm trying to make it walk like in pokemon 😄

dense owl
#

Ah gotcha so it just defaults

dusk pewter
#

yeah but if i use that player start it fizzles

uneven cloud
dusk pewter
#

ahhhhh that makes sense

#

because it's the "PLAYER" start

#

gotcha

ivory fern
#

Why is StateTreeTaskCommonBase not visible in the C++ class wizard?

little hull
#

Should Ai that use behaviour tree be this impactful for performance?

#

75fps

#

even dragging one ai to scene without game on it reduces fps about 10

crimson oxide
#

Does someone knows how to avoid AI flickering when going into each other while using Crowd Avoidance ?

wise sluice
#

I mean it is related to game tho ...

#

Can you try using Unreal Insight?

misty gale
wise sluice
#

Yeah it's probably something related to logging / visual logging

fair terrace
#

anyone use new StateTree pls help? How i can debug this system?

#

i mean how i can see states

celest python
#

visual logger

fair terrace
neat hatch
#

anyone knows why the simple move to node doesn't work for this path?

#

the hole is a boolean result on the dynamic mesh

#

and the actor that is controlled by the node is a player character

#

and I'm only setting the X and Y vector values

#

leaving the Z value as 0, so it shouldn't be much of a problem, right?

woven bobcat
#

this might be a dumb question, is there a way to somehow tell the ai if the ai see an entity with `` Entity.Player"?

neat hatch
#

and then get the stimulus Tag result from the ai perception

woven bobcat
#

is tha the one with FName or GameplayTag? i prefer it to be gameplay tag based

#

🤔

neat hatch
#

I don't know here, never worked with c++

woven bobcat
#

ah i see

#

i'll check it out anyway

#

thank you 🙂

neat hatch
#

UGH
figured out the issue with the simple move to node

#

the darn target location was above the void

#

so the simple move to node couldn't validate the goal location

dense owl
#

The EQS system has tests for specific gameplay tags

misty wharf
#

It depends on what the goal is

#

EQS could be used and its builtin tag checks require IGameplayTagAssetInterface to work

#

But if it's "sight" or some other type of perception, it's probably better to use the AI perception system. For that you would just write your own logic when perception is updated to check what tags the perceived actor has. This could utilize the interface, or it could utilize something else

woven bobcat
#

🤔

dense owl
# woven bobcat 🤔

Adding to this, there’s an Affiliation feature to that system, which uses GenericTeamInterface if you’re going for friend or foe detection

misty wharf
#

Fwiw, if you're working in blueprints, the easiest way to do this is to just add a gameplay tag variable to your actor. You can then cast to your actor type and check the tag in the perception logic

#

But the interface is also very easy to implement in C++ if you know how to use C++

#

IGenericTeamAgentInterface is much more "fun" to implement lol

#

You can get pretty big performance benefits from using the team agent interface also - say all your enemies are trying to perceive the player... if you don't use the team agent interface, they will linetrace to every single other character in your level to determine LOS

#

but if you implement the team agent interface and set them to only perceive hostiles, they will just need to linetrace to the player

dense owl
neat hatch
#

yeah.... 😓

raven nacelle
#

Hy!
Is there any article that goes into detail about how exactly Unreal calculate a path to be the default navigation system?

misty wharf
#

I don't think so. Is there something in particular you want to know about it or some specific reason you need to know this?

tough tulip
tough tulip
dawn schooner
#

Question about state trees: Let's suppose that I have a state tree with some tasks, one of them has some instance data (in this case, a timer handle), now:

  • The timer starts during that task/state
  • Before the timer runs out, the state changes (for whatever reason, such an event etc).
  • When the state/task with timer is active again, is the instance data reset?
dawn schooner
silent hamlet
misty wharf
#

Anyone know if there's some way to have child state trees similar to how you can run a child BT?

#

I'm noticing that I'm ending up building fairly similar state trees with only a few differences so it's a lot of duplication

neat hatch
#

since yesterday

shy hare
#

hey devss i got a pretty dumb question but i am confused if my decorator 1 returns false then execution will move to 2nd node or abort from the sequence ?

misty wharf
#

You have to understand the composite nodes you are using

#

If you hover over the node it should give you a little description - but basically Sequence nodes will abort if one of the nodes under it fails, and Selector nodes will execute nodes until one succeeds

#

So in your case, if the decorator on 1 fails, the owning sequence node will also fail

dense owl
#

But also why is it the same decorator twice

misty wharf
#

I wonder how exactly is the StateTree Enum compare supposed to be used... Literally any enum value that I try to bind it into errors out because it's not of the "State Tree Any Enum" type...

harsh storm
misty wharf
#

I saw some random mentions on the forums that someone had managed to create a task to do it, but of course they had posted zero details as to how that was achieved

#

The way the state tree component manages the tree it runs seems extremely complicated to just abstract away into a task

misty wharf
#

Wonder what else is lurking hidden in the code that's not been documented anywhere

#

Well I went through the entire thing and all I can say either it requires some FProperty knowledge I don't have, or it's infact incomplete and never worked

#

Yep... "Moved StateTree out of restricted folder"

#

Never been touched since it seems so who knows if this actually even works

harsh storm
#

🪦

misty wharf
#

I guess I'll try gameplay tags, that probably requires less janky support since it's just one type

dense owl
#

I miss MieszkoZ, he left us for #mass , mind you he gets more intelligent questions there 😅

misty wharf
#

lol, yeah I noticed there's been state tree Qs there so I posted it there as well :P

sand kettle
#

When calling MoveTo on an AIController, the navigation system only successfully projects the destination to the navmesh when the destination is within the default agent query extent. Is that correct?

misty wharf
#

Good system. Works as intended.

#

In general StateTree seems pretty nice but also ugh

#

Has any of this been tested at all?

harsh storm
#

They said that they use it pretty successfully for internal projects.

misty wharf
#

I can see that if I add a parameter of type gameplay tag container into the tree itself then it happily binds into that

#

So it seems maybe the binding to object properties aspect is broken or something...

#

Or it needs some kind of additional magic metas in the UPROPERTY but I got no clue

misty gale
#

I wanted to swap ny custom system for ST but seems theres some issues with it

misty wharf
#

As long as you're not trying to use the tag comparisons or enum comparisons it works lol

misty gale
#

I like using tags 🥲

misty wharf
#

I think it will probably work as long as you expose the tag values directly and not as a member of another object

#

It's supposed to let you bind to like.. Character->SomeValue, but this aspect of it just seems to not work at all for me

#

Binding directly to Character itself works just fine

misty gale
#

Currently im using a bunch of uobject Tasks and calculating their value for selecting what to do

#

But i lack any sort or visual for it

#

Biggest reason i wanted to swap to an existing system

misty wharf
#

Yeah

#

If you mostly want it for debugging purposes or such, visual logger is good for that

#

Easy to just log a bunch of stuff into it

misty gale
#

Hmm never used that

#

Damn looks handy

#

And its so old!? How come ive never used it

#

Thanks! Ill try that out 😄

#

Maybe i can avoid refactoring to much lol

misty wharf
#

Yeah it's very useful for debugging AI issues since the systems generally log a lot more into it than otherwise

#

@short aurora do you happen to know how to make StateTree bindings work correctly when using actor properties? Eg. I try to bind MyActor.Tags as the tag container in a Has Tag condition, but it just refuses to work "binding source type '' does not match property type Gameplay Tag Container"

#

Okay I'm starting to get fairly convinced this doesn't work at all because even using the builtin tasks this just doesn't work lol

#

I guess this needs a task to pull the property out of the actor as a workaround...

#

Hm, well, it works on the Context actor but nothing else...

hushed lodge
#

Is there an easy way to troubleshoot a Behavior tree? Its never going to the next sequence, but I caint find why... Troubleshooting BT is always a challenge for me, still new to it....

#

the part in red just keeps going between MoveTo/Wait never goes to the next sequence

#

CustomerOrderStatus = 0

misty wharf
#

Pause during gameplay it will allow you to step through the BT

#

Visual Logger also shows more details about BT execution steps

hushed lodge
#

Visual Logger? Will check into that

dense owl
misty wharf
#

Stepping through it usually helps if it works - you step backwards, and usually it will display a red line or such which indicates which node failed and reset the execution

#

but if that doesn't work, the visual logger should have the output from the BT and why it is executing what it is executing

hushed lodge
#

Ok, thats aweome, I have never used the pause here.. Thanks folks, thats a gamechanger

dense owl
#

Likely, the moveTo is failing

#

Usually you want your first node after the root to be a selector so you have a fall back behaviour.

#

With a sequence, if one branch fails, they all fail

#

Same applies for lower level branches, having selectors and waits on the right branch allows you to see what’s happening better

hushed lodge
#

Yeah, its pretty ugly now, need to get it way more efficient later.. Thank you for that

hushed lodge
#

Found the problem.. where I was setting the BB key I use "Make literal" and it was the variable name plus the default 'none' behind it... damn you CTL A, failed again

uneven cloud
short aurora
misty wharf
#

Yeah I was trying that as well but it just became a huge mess because the property access bits seem to be buggy as hell

#

Oh well, it seems promising but it's not quite there yet it seems

#

Thanks tho

acoustic valley
#

Hi all I hope your well🤗 Im looking for some help please. Im trying to make a basic flying NPC. Ive set up all the logic and the Nav mesh as well as the location I wish for it to go too, and made a component which turns of its gravity. If the Actor/capsule is touching the ground it moves to the location fine, but if its in the air even slightly it doesnt move at all and I can't figure out the reason why.

#

Any helps appreciated👍

dense owl
#

You might have left the channel before we said this but AIMoveTo works with the navmesh and that only works when the actor is on the mesh

acoustic valley
#

does

dense owl
#

Yeah. If you don’t need to worry about any obstacles you can use move directly toward

#

That node doesn’t use navmesh pathing it just goes in a straight line

#

If you want it to avoid collisions though, that’s a bit more involved

acoustic valley
dense owl
#

Crap I just rmbred that’s a BT task mb

#

You wouldn’t have it in normal bp

misty wharf
#

Yeah it sounds like it's a navmesh issue

#

If the actor is not on the navmesh then it won't pathfind

#

Depending on how you need it to work, you could keep the actual actor on the navmesh and just have its mesh "fly", so effectively it's still walking for the navigation to work

#

Otherwise you'd need to come up with some other solution I think

ionic beacon
#

What kind of AI would be best for fish in an underwater environment?
Navmeshs, patrol points, etc
We plan to have multiple types of fish, friendly, hostile, environmental etc with a fairly complex equation for skittishness, sensitive to light, etc.

#

Want it to be somewhat optimized, but obviously ai pathing in a 360 environment can get expensive.

#

(Trying to go for similar fish ai to a game like subnautica, where they mostly free roam within a confined environment)

misty wharf
#

Seems you could just have them move in random directions tbh

#

If they collide with something they can just go into another direction

ionic beacon
#

Definitely, I just dont want it to have awkward jagged movement, like moving straight to one point then abruptly turning to the next point

#

movement like the left, not right

misty wharf
#

You could use EQS to generate a set of points that are valid to move into within a certain area and then have them move on paths along those points or something like that, then smooth out any corners

#

with the EQS generated points you'd effectively have a point grid of sorts, and you could have it stored somewhere so you don't need ot keep regenerating it every time someone needs to move

ionic beacon
#

EQS is exactly what I think I needed, my team was already planning that as one of the solutions but we were jsut gonna make all the points ourselves manually but good to know this could work too

misty gale
#

If you have the points , just mapping them to a spline goes a long way

acoustic valley
rough ginkgo
#

Im looking into eqs system for making my fish AI, Im wondering if there is a way to write it in code so I can just use a state machine AI and use eqs to choose where it goes in a designated area. Is this even possible or should I find another way to do it?

storm hare
rough ginkgo
misty wharf
#

You can call EQS from code just fine, it isn't limited in where you can call it from

storm hare
rough ginkgo
#

still just looking at it will help me figure out how the eqs system works

#

its my first time using it

misty wharf
#

Look at the existing BP nodes, they should give you the basic idea on how to call it

rough ginkgo
#

alright

rough ginkgo
#

does the eqs system work in a 3d space? all the stuff I can find only uses a floor, I would want it to move on all 3 axis

misty wharf
#

Yeah it's just a question of using a generator that generates locations in 3D

rough ginkgo
#

perfect

limber prawn
#

is there a dynamic way to assign behavior trees in an AI_Controller? For instance, i have 5 NPCs that could reuse the same controller, but they each need a different BT. I tried using gameplay tags, but OnPosses fires before the tags get added. Any ideas? 🙂 I'm just trying to increase reusability and cut down on the number of files i need to make

limber prawn
# rough ginkgo Im looking into eqs system for making my fish AI, Im wondering if there is a way...

https://www.youtube.com/watch?v=iY1jnFvHgbE&pp=ygUKdW5yZWFsIGVxcw%3D%3D this video is jam packed with good info about AI, and EQSs

In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.

By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...

▶ Play video
harsh storm
#

That's the straightforward way anyway

limber prawn
#

ooh!

#

great idea, thank you :)

harsh storm
#

Some people might complain about architecture, but meh in this case.

limber prawn
#

yea i'm trying to approach things the "correct" way when possible, but im also just trying to get things done haha

royal mist
#

Hmm so I'm trying to make sense of the EQS system. I have a EQS query to find a path. but it seems to run repeatedly and causes the pawn to run around the nav mesh, without any particular goal, instead of going where I click.

#

basically I should be able to click on the unit (works), and then click to direct them across a grid (bork'd)

#

this is the logic calling the BT, which is run by InputAction_Click (on completed)

#

and this is the simple BT

dense owl
royal mist
#

idk i thought the idea was stupid too but a colleague was insistent on it so i ended up listening to them lol

#

I'd rather implement some form of a* since im using a grid anyway

dense owl
#

EQS can help the AI choose where to go tho, see 3rd pinned link video it has a section on EQS @royal mist

royal mist
#

i see

unborn sphinx
#

I am that colleague and I just said the EQS could find points on a grid and that there is a pathfinding grid aka the grid is on the navmesh, right? So i guess that gets me thrown under the bus lmao

#

sorry PathingGrid

unborn sphinx
#

*maybe

dense owl
unborn sphinx
#

lmao yeah I have been thinking about that saying when I heard it here it's great

uneven cloud
tired copper
#

Hello anyone here know how to integrate ai to a click team game??

misty wharf
#

What exactly is a click team game? And what's the problem integrating AI into one?

tawdry zephyr
misty wharf
#

Yeah that's what it made me think of also but that has nothing to do with unreal right? 🤔

tawdry zephyr
#

They might just be lost ... very lost 🤣

misty wharf
#

Always a possibility

misty gale
#

Can you add and remove things from a StateTree at runtime?

misty wharf
#

"things"?

misty gale
#

Tasks, states, actions?

misty wharf
#

Don't think so

#

Unless you find some way to recompile the tree representation

misty gale
#

Ugh

#

I kinds dont wanna do a giant tree with all jobs and their related actions

wise sluice
#

RIght now, we don't have many options with StateTree 😔

misty gale
#

Subtrees is that a thing?

wise sluice
#

It's within the same file

#

No separated file as you think compared to BT

#

Anyone already inherited from GenericSmartObject, the actor is hidden by default 🤔 ?
Does that mean, the SmartObject is intended to just be an Empty Actor without visual?

misty wharf
#

Interesting, I hadn't even noticed there was a GenericSmartObject actor

#

My SO's are just regular actors which have meshes and things on them

#
    UPROPERTY(EditAnywhere, Category = SmartObject, NoClear)
    TObjectPtr<USmartObjectComponent> SOComponent;
#

This seems wrong. Since when is EditAnywhere valid for components?

#

I was under the impression using it on components was a quick way to break your actors

#

Ugh, this state tree really is nothing but trouble... lol

#

This is so full of gotchas in how it works

#

Now it's just randomly refusing to trigger a transition

#

Or maybe it's invalid for it to transition to itself to repeat the state? I don't know

#

Although if I make it transition to its parent state it also refuses to transition to it so I guess repeating itself is not the issue... but it tells me absolutely nothing that would help me figure out why

#

If it goes back to root, and re-evaluates the whole state tree, then it happily reactivates the same state again

#

So this makes very very little sense :P

misty gale
#

that sounds rather strange

wise sluice
#

How do you prefix your SmartObject Definition?

wise sluice
misty wharf
#

Oh that's the magic word? Interesting 🤔

#

The Wait State will move execution to itself indefinitely on success or failure until its parent State selects a different State.
This part in the ST docs seems to suggest you certainly could make a state loop over and over

#

But why does it refuse to do that then...

woven bobcat
#

would like to move this topic here too to hear folks here suggestion

#

hello, so im not very knowledgable in this topic so please corret me if im wrong.

So im in the process of making my ai and my game designed to have tons of AI's.. for player controlled pawn, if you want a replicated custom movement, you have to use character movement component but i remember i read that is not the case for AI.. do i have to built AI equivalent of CMC from the ground up? I dont mind trying to attempt to build one. i know it will take months and i have to see of CMC do it..

I dont want to go this route but if i have to, anyone have attempt to do this? if so, can you advice me on things i need to do / donts? any pointers?
any technology built in unreal you can suggest me look into?

wise sluice
#

Hey !
CMC is very expensive even using the NavWalking logic especially if you're using DetourController.
What kind of movement do you need @woven bobcat ?
If you want less than hundred AI moving all together, i guess a pawn with a basic movement component should be enough
If you want more than one hundred AI, you will probably need ECS architecture handle thanks to #mass (which support Network replication but is a whole universe to understand)

harsh storm
#

You can get more than 100 without ECS btw.

#

You just need to optimize for it. Because UE's skele renderer is heavy, animations are heavy, and CMC is costly.

#

You need to define "tons" to be honest. But if you're lookin' at over 1k, CMC is definitely not going to work.

#

Heck, even 500 would be quite the challenge.

wise sluice
#

Thanks for the clarification
I had only 15 characters and I was getting huge cost ^^'
So my guess was 100 would be expensive as well

harsh storm
#

I've done like 300 fine.

#

Just need to know how to optimize it.

#

Which most people don't. By most, I mean a vast majority.

#

But CMC is costly

wise sluice
#

Definitely, I investigated UnrealInsight and i had no idea how to optimize my AI (it was only parallel task animation and CMC bottlenecks 😦 )

#

If you have resource about CMC optimization, i would love to hear about it
Or pawn locomotion in general even if i'm fully focused on Mass right now

harsh storm
#

I don't have any specific resources. Just things I've picked up over time.

#

Also, yes, UE's transform system is total butt. So some things are just slower because of that as well.

wise sluice
#

Something that we can't fix easily ahah

harsh storm
#

Animation sharing, navmesh movement mode, logic LOD, and animation budgeter are things that help a lot

celest python
# wise sluice If you have resource about CMC optimization, i would love to hear about it Or pa...

If you have resource about CMC optimization, i would love to hear about it
Simplest trick is aggregating its tick calls
Second is making sure FindFloor is called in sequence inside of that aggregator, separating this from CMC tick gives you huge benefit on caching the instructions
Third is altering MoveComponentImpl directly, also known as "vblanco trick". You can search the keywords on server

#

I didn't count obvious ones like scaling CMC ticks based on visibility etc. but if you need those too search for KaosSpectrum's messages on this channel

harsh storm
#

When you combine all of these things, you can do more than what people think. It's just laborious to set up.

#

Hopefully the thing their working on to make the CMC stuff a bit more generic could improve this. But I have my doubts.

celest python
#

@shadow furnace also made async CMC possible recently iirc

#

waiting to finish BP2CPP annoy him about how he did it

harsh storm
#

@dawn schooner Also seems to have gotten vblanco trick to work on multiple threads

celest python
#

@dawn schooner how many loops you have in a single code block? (i.e. how do you handle mark render dirty on another thread - or do you at all?)

harsh storm
dawn schooner