#gameplay-ai
1 messages · Page 178 of 1
Yeah, so you can add it into the False output of the Branch
since that's where it would go once you reach the last point
what would the code be called to do that
It's mostly the same nodes as you have there, you can just use set blackboard value as int to set the value to 0
so set blackboard value as int?
the value must have a input wired to it
wait nv,
let me try it
Anyone got any papers / talks to link me to that describe breadcrumb trails?
Idea being something like after a player is spotted they'd leave breadcrumbs for the enemy to follow for a short time to help deal with them stepping out of the cone and the agent immediately losing sight of them
Look for GDC splinter cell AI and you'll find.. there was also a game called Republique that did it.. also Dishonored 2 had a GDC talk with it in
was there even such AI in any game? I wasn't even aware of that mechanic despite knowing those 2 games.
Besides the references mentioned above, I would recommend looking into the Prediction AI Sense. It will try to determine the next possible locations for a given target
Hi, any idea how to get the navmesh to work with different sized actors?
I can successfully generat nav points for all sorts of pawns. While the one in the screenshot is fine for a character, it's far to near on the edge for the vehicle. How do I get better results for the vehicle?
I have a BehaviorTree sequence which is 1) Find Location 2) Move to Location. THe problem is there a brief delay between find location and move (so the AI kind of move/stop/move/stop) is there a way to smooth it out; so for example make it find the next location before the move has completed?
there's a boolean to let the bot continue even if it reaches the position @sharp junco
anyways, guys I want to make a bot behavior which gets inside the building and looks for loot. I am not sure how I should handle the bot inside the building. I mean I can do it with spline but then I have to place the spline in every type of building
What boolean is that? I'm looking on the "Move To" node and not seeing anything obvious?
I do it in C++, it has the boolean there
Most of those solutions assume that you have a list of waypoints at the start; whereas my wayspoints are calculated on the fly based on the current location; also the simply parrallel solution also doesn't seem to actually make a difference
is it absolutely necessary to use behaviour trees as opposed to just using blueprint?
and what would be the downsides to not using a behaviour tree
Custom logic for testing the nav point locations
You can do whatever. Not using BT's just means you have to manage logic manually
BT's can be very convenient for orchestrating sequential logic. You can certainly do it in plain BP's as well, but it can be more of a hassle as plain BP's usually don't have an easy mechanism to wait for the previous task to finish before starting the next one, and managing what happens on failures
But it really depends on how you want your AI's to behave. BT's aren't perfect for everything
Hi, I'm currently experiencing a issue with the Gameplay Debugger not rendering any of the EQS or Perception debug lines/shapes? does anyone know anything I could be missing? (i am making sure theyre active inside the gameplay debugger and the EQS test pawn is working correctly, just the debugger isnt playing nice.)
Hello guys how does this would work like and "or" or like and "AND" or maybe something else ? :)!
Squize is right that you will eventually need some custom code, but you should be able to get to something roughly good by configuring multiple agents in Project Settings -> Navigation System -> Agents. Configure two agents here, one for your vehicles, one for your other pawns. Make sure that in one of them, Agent Radius is large enough for your vehicle.
It's an AND. All conditions must pass. If you need more complex decorator logic, check out the composite decorator (it contains a mini blueprint that lets you make more complex boolean inferences)
Will also mention I'm using UE5
The only thing that springs to mind is to make sure that your player is possessing a pawn when using the gameplay debugger (it doesn't appear otherwise). I'm also fuzzy on whether the EQS testing pawn is active at all during gameplay. It might only do its thing in the editor.
yeah i have it working in editor to test my query, and oh? do you need to posses the AI Pawn to see its debug perception?
ok, thank you
I have this very simple code attached to an enemy in my game, along with a move to node when the enemy can see the player. However as soon as I drag in multiple enemies the AIPerception seems to get all messed up
any way of fixing this?
Messed up in what way?
No, but you do need to select them in the outliner.
AI Stops running towards me and doesn't really seem to know what to do
As soon as 2 enemies sense the player at the same time they both stop sensing the player all together
however having just one sensing me works just fine
even when having 2 spawned in the level
If they block on the sight trace channel (visibility by default iirc) they can block each other from seeing you
Depending on how your level is laid out and how they're trying to path to the player, they can also block each other from moving
Tested that, also happens when they see me from different directions
Hmm
would also happen in this scenario
It's like the aiperception is synced across all enemies in some way
Maybe try adding some print nodes into your logic to see what's going on, you can also try using the gameplay debugger to visualize perception and pathing to some degree
It's not synced so that's not it :)
I added some print nodes and as soon as 2 enemies see the player the first branch from the second picture always returns false
the tick can see player check?
yeah
Ohhh I think I know what's happening
They see each other which triggers a perception update event
which then sets can see player to false, because what was seen was not the player
would that also happen the ai has no stimulisource?
pawns are registered as stimuli sources by default
aahh
so I should render the enemies as friendlies and the character as an enemy and all should work?
and then turn this off
That would be one way to do it yeah. That's only doable in C++ though
Simple BP only solution would be to split your update check into two - first check if it's a player, and then if it is, check if it was successfully sensed or not
This way you would only update can see player when the stimuli is from the player, and ignore others
Nice :)
how does AI aim with fps games? does it see?
yeah, ai sight to see and shoot.
does it cost rendering a screen?
Two broad systems. You need some way of understanding what to shoot at (AI Perception in Unreal to determine what they can see), and secondly aiming. It's very easy to hit with hitscan weapons (You know the location of shooter and the target exactly by just using Get Actor Location), so a lot of the work is figuring out how to miss in a believable way.
set random vector to make it miss
not sure what you mean by this
Yeah, using some sort of accuracy factor to deviate within a cone is pretty typical.
i can't say it because i never made any AI with FPS. Maybe look at Lyra has it. But Lyra bots seem so good at shooting accurately lol
There are many ways to do it
Typically you just linetrace to "see"
which is what the perception system does
You can use that to select aim direction as well, and add in any factors like inaccuracy
Is there any tutorial out there for adding hit reactions to AI / make them able to take damage?
The content sample has a pretty good sample for blending a physics based animation on hit. Is that what you're looking for?
Which one do you mean?
It's on the Physical Animation map, there's one where you can click on bones to demonstrate hit reactions.
I've actually never seen this content example project before. It's got a ton of great stuff in it.
especially the math
its doing a better job than my high school teacher
i wish i had this when i was going to school 😄
using UE5 and AI perception hearing is giving off this stimulus location
Try drawing a debug sphere at those coordinates
I'm getting a feeling it might just be some kind of glitch with printing it, because if it was a million km away from your actor it wouldn't trigger the stimuli
Thing is as well i see my ai react (stop moving" then do do nothing, they use to then move to that stimulus
both true and false
you're probably getting false when it gives you that weird value
yeh
right, so that means the vector is actually uninitialized so you're basically getting garbage as the position
but its then breaking the AIs hearing and so they wont go that position
hearing cannot have a value if it's not successfully sensed
you will have an easier time if you use the On Target Perception Updated event
that one will give you just the stimulus that was currently received, so you don't need to get+iterate
and you won't get nonsense values like that either
ok seems to be working much better now, just need to check something then i might have another question
With my AI if i make one noise the AI will head towards that stimulus, how do i have so that when if i was to make a second noise they would go towards the newest noise instead?
Just change the movement target whenever you receive hearing stimuli
each noise will generate a new stimulus value
I'm building a robot that should move on a grid through a terrain that can and will be hilly. In other words, it won't be flat! I have a feeling that the UE4 isn't quite made for a grid based movement where the robot should only walk straight lines from grid center to grid center - so I thought about writing my own A* pathfinding instead. I've done that before so it shouldn't be a problem but I'm wondering if I can still use the data from the navmesh to determine walkable / non-walkable areas etc.
Thanks. Fixed this by doing a check if there was a value change on the move to location vector
How does the perception system in unreal works behind?
Does it do raycast to the objects in its range?
There's a grid based pathfinder in there already.. they built it for fortnite (pre battle royale I believe)
For vision queries yes.. its using a timeslicing system though
what is timeslicing syste?
You mean AGridPathAIController and UGridPathFollowingComponent?
Timeslicing is where you calculate the costs of the raycasts and only do a few per frame based on the overall budget.. essentially spreading the raycasts out over a number of frames
I seee.
Wouldn't determining the number of objects within the range of perceptions and then raycasting be similar in terms of cost?
I mean raycasting without knowing where to cast could be expensive
Is there a demo? I can't find anything related to this on the internet
Do I have to set a grid up in the world? I assume it's not as easy as just swapping out the PathFollowingComponent of my AAIController
The bots in the screen(viewport) seems to be in some stationary position but when i check it in the objects hierarchy it changes its position(which is correct because it either roams or gets into the safe zone area). Does it look stationary because MoveTo function isn't multicasted?
i though basic movements get multicasted by default
How can I check if an AI character is stuck on it's path to it's move to destination?
????
is your navmesh setup properly?
Yeah
One example:
Two characters from two different starting points move to the same destination. One does arrive earlier and the other one never reaches the destination, because the first Character is occupying the space.
you can increase the acceptance radius for that @charred lava
But what if I want a low acceptance radius?
Like a cover point where Ai characters needs to be close to the wall (close to the destination point with a low acceptance radius).
i am not sure, your both characters were supposed to collide if they were made to traverse to the same location
not sure
unreal has a bunch of shit to get you confused'
That's a fine scenario. I just wanna do "Something is blocking my path, I should do something else then".
doesnt the navmesh has some sort of filter to avoid obstacles?
You can create your own filter that excludes NavArea_Obstacle
Does a “Do n” node exist in behavior trees
There's a Loop N times decorator
Thank you
Is there an easy way to smooth two different move to's together. So lets say I wanted to do a move to, and then immediately start another. Is there a way to have that happen without the AI stopping for a split second?
are you doing this with a raw AITask MoveTo BP node or something? Because AFAIK BTTask_MoveTo supports updating target location or actor without any extra actions if you tick one checkbox in the task properties
I doubt anyone's used it outside of epic, it was built for Fortnite, so I assume it works. But I don't think there's a demo.
No, its more about controlling the costs of raycasting every frame. Imagine you have 100 characters who need to detect sight of each other. You don't want 100 raycasts per frame. So you do say 4-5 every frame and eventually you've done the 100, but over say 8 frames.
wouldn't this lead to missing a target in some frame?
Yeah, potentially, but in reality the time between raycasts isn't that long, imagine it taking 3-4 frames, which is just ms
Nobody would ever be able to tell
and it allows you to budget your raycasts better
aghh I see. Thanks for this
i have a problem with path points
when the ai is blocked it just keeps moving around to try get to the spot, but is there a way to make it move on to the next path point if its blocked? like when i close the door
For the Navigation System I can set the NavAgentHeight and also have the boolean "CanCrouch". What does those "Can .." properties do? I Imagine that when CanCrouch is ticked that the Agent is able to reduce it's NavAgentHeight? But if so, how does the agent now what height he has when crouched?
if by AI debug tools you mean the gameplay debugger, it requires you to possess something for it to draw
I'm a bit confused about what navigation agents settings are for.
I have two characters with vastly different sizes, and step heights. I've set them up in my agent settings. Should I be assigning these agent settings to the characters somehow? Or should I be mirroring the settings in the movement components?
should I be mirroring these settings here in movement components? also should they have seperate nav datas since they're quite different?
also I can't seem to get ai to step up onto things consistently. It'll often just get stuck on thing it should be able to step onto. I've tested by setting step up to 200 in the movement component and sometimes they can step up onto tall wall and then also get stuck on small objects. Everything has "can step up onto" enabled
As I understand it. Unreal attempts to assign your agents to NavMeshes automatically. It uses the Radius and a few other things to fit them.
Yeah I noticed in the world outliner it had created two navmeshes
I'd like to make sure the agents are choosing the correct ones
I haven't used it, but I wonder if Preferred Nav Data will let you choose the data to use?
Aha, then this thread has some interesting diagnostics in it: https://forums.unrealengine.com/t/agent-radius-never-works-for-my-ai-in-4-11/356883/4
I don't know if I like the solution, but it does show how to get which nav data is being used by an agent.
That's more CMC, and I know from experience that can take a lot of tuning to get working well.
Make sure your NavMesh is generating the way you want. A good trick is to change the color of your second navmesh (which you've done). But the P shortcut doesn't enable drawing of it. You need to go into the outliner and "enable drawing" on your second or third navmesh.
I like to create obstance courses where the larger agents can't get through places (but smaller ones can) and test the behaviour to see which path they take.
Generally speaking, if you tune your character capsule radius to the navmesh agent radius, it seems to work pretty well.
Why my AI keeps running Behavior Tree when I didn't call "Run Behavior Tree" node inside its AI controller?
I even disconnected ROOT connection and its still running
It all started happening after my UE crashed and I have no idea what is going on
hi!
I am trying to make a basic patrol behaviour, but my Behaviour tree gets stuck on Move To node.
I have checked and it reaches the destination. exactly to the destination to be precise even though it has an Acceptable Radius. but what happens is MoveTo doesnt complete, it waits a bit then restarts from the Root again, without continuing the sequence.
can i get any help here? i have seen lots of issues on web but none has an answer.
Do you ever see it go to the Wait node?
It's possible the StartLocation is invalid somehow, which would cause the third node to fail.
Then you'd start over.
no it never goes to Wait node
and the locations are valid they are set at begin play
and this is the actor's location
Okay. It sounds like that first MoveTo is failing.
and i have an acceptable radius of 100
Add a "Force Success" decorator to the first MoveTo node.
Just to see if that's what is blocking your sequence.
when i add force success the the first moveTo
it works and the 2nd moveto doesnt fail
but i dont understand why the first one fails
even though it reaches the destination
Neither do I! That's weird. Can you show me the details for the first Move To, with the Advanced section open?
This guy here:
my bad
i miss clicked before the screeenshot
{
Super::BeginPlay();
if (AIBehavior)
{
APawn* PlayerPawn = UGameplayStatics::GetPlayerPawn(this, 0);
RunBehaviorTree(AIBehavior);
GetBlackboardComponent()->SetValueAsVector(TEXT("PlayerLocation"), PlayerPawn->GetActorLocation());
GetBlackboardComponent()->SetValueAsVector(TEXT("StartLocation"), GetPawn()->GetActorLocation());
}
}``` and this is how i set them
oh
maybe i should set it then run ?
it crashed :D
You should be able to set this at any time. That's how BT's are supposed to work: as you update variables, the behaviour advusts.
Your BT looks fine. This should work.
You're going to have to debug (read output log etc...) and look for why that first moveto is failing. it might be something specific about your game.
Sometimes adding a short wait at start of a sequence can help fix weird behaviours like this. But otherwise I'm out of ideas for you 😦
by default, at least in UE4, shortcut for changing which navmesh is drawing in editor is alt+n. It can be found in editor preferences under shortcuts.
Oh, cool! Thank you.
i have put wait at start, still fails, then i swaped the MoveTo s since the 2nd one wasn't failing. but now the second one(now the first one) fails and it doesn't go on
@static crystal you want query extent in project settings to be a bit larger than capsule size. If you have you have default settings in movement component, it'll pick the first one that it can fit into. It checks height, then radius, then step I think. In project settings you can put round numbers, it's ok for agent there to be a bit larger than your character. You can check what agent it picked if you look at AI and activate gameplay debugger, ' by default, but there's also console command to activate it
Hi!
Again i have a similar behavior tree issue with my MoveTo, It doesn't do anything (then it wasn't succeeding at all). This time i think a video would explain better
Can you help me why this is happening and why my behaviorTree is not working as expected ?
seems like you set some delay elsewhere
i also suspect this, the investigate vector value is transferred to the chase vector value
hence it stops there, although i see the value changing in your video.
{
Super::Tick(DeltaSeconds);
if (LineOfSightTo(PlayerPawn))
{
GetBlackboardComponent()->SetValueAsVector(TEXT("PlayerLocation"), PlayerPawn->GetActorLocation());
GetBlackboardComponent()->SetValueAsVector(TEXT("LastKnownPlayerLocation"), PlayerPawn->GetActorLocation());
}
else
{
GetBlackboardComponent()->ClearValue(TEXT("PlayerLocation"));
}
}``` this is how i set the values
the clear also works if i go behind the wall
but even if player location is set it doesn't move to it
then it means 1 thing i guess, it moves only when sight is confirmed. Once clear means it has no clue
thus the investigate stuck at the same spot it stops
try open your sight debugger too, it might give you better hint
MoveTo does not update the location live iirc
So if your location is set to X, the move to starts, and now you change location to Y... it will still try to move to X until it reaches that point
i cant find sight debugger ? how to i open it
i think it is at the BP on the right side
tho it works in the gamedevs tutorial in udemy
it flawlessly runs towards the player
somewhere lets you tick it
mine doesnt event flinch
does the tutorial even show himself in front of the AI?
it shows exactly as i took the video
both game and the tree
the tree progresses the same
what about the sight radius?
but the character moves
I don't know how it's set up in that particular tutorial
is your sight radius wide?
It can update it if you assign it to move to an actor instead of a location
maybe that's what they do in the tutorial, or maybe their BT aborts the task when it changes, not sure
it s 360 degrees i think since it s not specified , and since the value is updating i am prettysure it sees me
strange 1
i also had an issue with moveto above the question, the first moveto was failing for no reason and the 2nd one was working fine
here it s kinda the same
I would add some visualization to show where it's actually trying to move
either look at it in the gameplay debugger, or draw some debug spheres or something
and compare that to what the location is set to
yeah, that's the last way to see if something went wrong
(can also visualize that via a different color debug sphere for example)
well
i jsut drew it on playerlocation
i am getting the values from blackboard and drawing sphere and everything seems as expected
this should not be complex 1 but your case is strange
somewhere must be ticked wrongly or something missed
Hello I am new to ai.. what is the best way to control and spawn an ai only on the client side.
At present when I spawn on server things work; but when I spawn on client the ai does not work.
Got it working ... Spawned ai pawn - spawned controller - possessed ai pawn .. all on client
If I run an EQS query in my BT like this
does anyone know why the node might get stuck running?
the query looks like this
my assumption was that if it ran through all the generators and didn't succeed at setting the BB value it would fail
but I'm probably misunderstanding something about how this works...
things work well when one of the generators succeeds at finding a navigable point, the issue is when they all fail I want the query node in the BT to fail
EQS details in AI debugger show this, Im not exactly sure how to interpret it -- seems to just be chillin
Your understanding about how Multiple nodes work in EQS is correct.
EQS will fail if none of the Option nodes find anything.
Have you tried this with an EQS testing pawn to see what it does there? You'll probably need to tweak your contexts a bit so that they provide something when used with a test pawn.
no I haven't tried the test pawn yet, I will do that thanks!
I have a separate but somewhat related question -- I expected these two values to take the Point supplied by my context class and project upward and downward to find the navmesh
but this doesn't work
I have agents of various sizes, and I can't use their character origin Z as my Point context Z
even if I set these values very high
I have to use the location of the agent's feet as the Point's Z to successfully find a navigable location
this is not a great solution though because what if my terrain isn't flat?
any ideas why Project Down and Project Up aren't doing what I expect?
I have used that successfully, so it's not completely broken. Let me see if I can find what I might have done differently.
Something is very odd about this setting. It works for values up to 250 for me, and beyond that, it has no effect.
I tested it by hovering the test pawn up and down and tweaking values. Source code might have clues here, but there's nothing obvious.
Aha. It's in project settings, under Navigation System -> Agent -> "Default Query Extent". It seems this is used to limit the maximum distance you can project at runtime.
I had to restart my editor to get this setting to work, but it did work once done.
@opal crest oh great thanks for figuring that out!
When planning out my AI controllers for all my enemies in my game, Is it a good idea to have a master AIC to pull children off of for each if they're going to have similar behaviors or is it best to have individual AICs
shared behavior into a base class is always worth considering. Not worth it when you end up with an inner system (ie too highly configurable), but otherwise, yes, share the shared functionality
Sounds good. Thank you
has anyone ran into issues with step up height? The the navmesh is working properly and paths them through objects they should be able to step over. But then they'll often get stuck on the object. They dont actually step over it.
maybe I also need to increate Perch height?
I think it was related to the characters root capsule being scaled
yep that sounds about right
really want to avoid scaling things with recast/detour/default nav
and also in general
When stringing multiple move to tasks on my AI to follow a set path, he will deaccelerate for a few frames whenever he finished a Move To action.
I turned off "Requested Move Use Acceleration" in the AI's character movement component. It helped but it's not completely gone. What else can I tweak to improve this? My AI should theoretically keep the speed, because I set the next goal on the same frame as he reaches the end of the previous path.
I assume you've turned off Use Fixed Braking Distance For Paths in CMC as well? Otherwise you would likely be seeing more than a few frames of deceleration.
Is state tree just for mass ai or is it an experimental replacement for behavior tree?
None
It's a general purpose system that mixes selectors and FSM logic into single tool
Useful/used for mass because it allows fidelty based behaviors
suddenly all my characters are floating off the ground for some reason. I'm pretty sure I didn't touch anything lol
navmesh is also floating off the ground
anyone know why this might happen
You probably have some invisible geometry that navmesh is detecting.
I turned on debug collision and couldnt see anything
and it global
affects all the characters, even the player, which is weird
didn't think the character used navmesh
Unless your character is using AIMove, they don't.
ok actually you're right
its some huge broken collision mesh
had to walk far to find the edge
tyvm
np!
So I can use it for AI if I want to, but it’s much more general purpose than that
As someone who doesn't have years of real-world game AI development, I hear that "Smart Objects" is a ubiquitous term. Is there a recommended UE flavor of smart object implementations?
oh snap, there is literally a pre-built feature called Smart Object
https://docs.unrealengine.com/5.0/en-US/smart-objects-in-unreal-engine---overview/
wow thats a lot to take in. looks great though
Smart Objects became popular after Will Wright's talk about them at GDC when he described the implementation from the Sims 1
Nice. I discovered the term from Bobby Anguelov's great AI talks
They're conceptually the same as lots of multi-agent coordination approaches
from the multi-agent systems literature
looks like we're getting some sort of new path system https://github.com/EpicGames/UnrealEngine/blob/ue5-main/Engine/Plugins/Runtime/NavCorridor/Source/NavCorridor/Private/NavCorridor.cpp
some sort of portal based nav corridor that is built from a regular navigation path
Hey guys I'm having an issue with my AI perception, essentially what is happening is my AI is perceiving not only my player character but other instances of the AI. As a result they all coagulate in a big clump instead of going after the player. Im using 'get currently perceived actors' with 'none' as the sense to use, but for some reason the AI pawn is showing up in there. I have only used sight config in the project and my player is the only actor in the entire project with a stimuli source (again, only sight). Is there a setting that I'm missing or something?
Hello Folks!
Has anyone here tried to find the current closest enemy in the sight perception? Any idea how I should approach it? Checking the list of enemies for closest distance in tick seems bad. But if I try some observer pattern and make the players rep_notify when the position changes, that's bad too
you could store the perceived actors in a heap
based on their distance to perceiver
that way the min distance one would be at the root
yes I can store them but I will have to update the distance at tick() to know if something is changed, isn't?
I guess
the other way would we to use Rep_Notify for position change but the characters which are unsubscribed or not in the perception will call the callback as well, which is bad
how many perceived actors are we talking about anyway?
I mean, if the numbers aren't in the hundreds I wouldn't worry about performance 😄
if i make a map and the key is the pointer to actors position then I think I wouldn't even need to update the values? 🤔
need to connect those two pieces so the ai can walk down the stairs. Tried everything with the nav mesh generation. Did i miss some other setting? There has to be a way
what's the collision mesh like of the stairs?
that's not a very good idea
i should make a custom mesh for the collision right?
you should make simpler collision mesh so that it's just a slope upwards
and let animation blueprint handle feet planting on the actual stair geo
doing that already
that way the navmesh should generate more cleanly without fiddling about with step heights and what not
will do that
now the navmesh isnt generating at all on my whole map
but still in different levels
I’m curious on this but I’m reading thru the code and I can’t make sense, what are you referring to by corridor?
A bot in AI….
Sorry for the late reply, basically, I was having it so it found the taget's location, moved to, and then tracked while moving to that target. Once within a certain range, it was finding a new position to move to within the character's radius, afterwards attacking
I 100% admit it's probably not the most optimal/could probably combine some of them. Only started learning UE a week or two ago, so sorry if it's a mess. 
I was originally following along to a video made by ryan laley, but the final video in his series kinda broke the AI/overall felt like a downgrade compared to the previous one. I took some inspiration from the final video, but it's having this issue where once it finishes the final move to inside of the left sequence, it'll stop for a second, and then start the next move to inside the attack sequence.
Trying to figure out how to extend/replace existing AI with my own, to facilitate non walking behaviours such as flight pathfinding in complex environments.
In a way that still preserves behaviour trees, blackboard, etc.
I've got the algorithm, but trying to make it as similar to existing AI implementation as possible.
Specifically, what classes to derive from, what functions to override i.e. AIController etc
is there any decent info for EQS beside the same how to find the player tutorial
cant seem to find any thing useful beside that info.
the file name literally says corridor 😄
but reading through the code it seems that it is for expanding navigation paths into navigation "corridors" instead of an array of point goals
I wouldn't be surprised if those are then used to convert into navigation lanes used by mass crowds
Verse will introduce "AI Scripting"
I doubt it's a new feature, it's just a simpler way of saying that yes, the same AI related functions you can call from BP are callable from Verse :P
Or I suppose in context of Fortnite probably just that the game will expose an AI logic related API
I see, I think I understand
so i have a melee behaviour tree where the enemy attacks the player based on a 33.33% chance , I recently implemented a special attack that triggers based on a 5 sec cooldown and on a condition where the ai isnt attacking, this is causing the enemy to interrupt the main attack to start doing the special attack, any tips to setup the condition?
i'll try that
Hi, is there a guide of how to setup the AI Perception system in c++ ? a video or a blog
using c++ ?
Ok, sounds good
I'll check the video out then
Thanks
Yeah, I kind of spent the whole day making a simple c++ task
But I'm just learning, and for the time being I only want simple stuff ( maybe a guard that can spot the player or smth like that )
Does anyone know of any examples out there showcasing an implementation of Mass AI with vehicles as well as an AI LoD system? I imagine that the city sample would have it, I am just a bit intimidated to download that...
CitySample is literally Matrix Demo
Let's say I've an AI that can follow me on the ground and it has its CanFly checked, When the player goes flying, would the AI be able to follow me in the air as well. If I have IsFlying in ANimBP bind to a blendspace..
Potentially, but you would need to implement the logic to make it fly yourself
What is the most common way? DO i check if the player is flying then toggle fly for the AI as well?
Do you know?
It depends entirely on how it needs to work in your game
Checking if player is flying could work, you could also compare the player's altitude, so for example if the player is only a little bit off the ground it wouldn't make the AI fly
but as said it depends on the behavior you want to have
So I got my ai flying but it won't ascend to the player's height. If I go certain height the AI stops. I have my navmesh correct. The BT MoveTo should take care of the that. Right>
I don't really know how navigation is going to behave in flight because navmesh is only for ground-based movement
Is it possible to have an AI have back to back move to commands without the AI stopping?
So instead of having a continuous goal of reaching xyz, can I have it go to the first target, and then switch to second target without the AI braking first? Currently it'll reach the first target, stop, and then start moving towards the second.
Would I just need to create a variable for the location, and then update the variable every time I have a new location, to achieve this?
Here's my current design. The idea would be to run the sequence once to find the first location and run towards it, once I'm within 800 units of the first location, set the second location, exit the sequence, and then run towards the second location.
sorry to necro, have a question. Is it possible to add this to a custom moveto blueprint? or am I SOL/should use the built in one.
Actually, if you remember, the scripting language that Epic bought did event driven AI as one of its primary use-cases.. what was the name, Skookum! Yeah, so the skookum guys specifically mentioned AI as a core part of the scripting language.
Its probably coming full circle back to UnrealScript 🙂
@celest python I'd be curious to hear your thoughts on this video: https://www.youtube.com/watch?v=5ZXfDFb4dzc
This stream will cover my preferred solution to game AI decision making.
Timestamps:
00:00 - Stream Start
01:05 - Intro
03:45 - Past Experiences
12:36 - Problem Definition
20:49 - Approach Overview
31:...
I know this, still on my watchlist
Couldnt find time to watch
But it's a solid one no doubt
sooo goood
I mean I'm saying this without having years of AI knowledge, but I loved watching it
I'm trying to adhere to the concepts he describes while also trying to employ data locality and tick aggregation
But they are time sliced afiak
Profile first lol
BTs are able to run on high counts
Its overoptimized in a bad way
Also since its timesliced (iirc) it should be fine
Rather than BT's tick context of decorators and tasks should be the problem i guess
@celest python What is time slice?
Also, have you dove into the Gameplay Behaviors module?
and the new smart objects plugin?
What is time slice?
It skips the current tick if current operation took longer thannms
have you dove into the Gameplay Behaviors module?
and the new smart objects plugin?
nope
probably Megafunk did
and zoombapup
oh that is so cool
can N be user defined?
Yes
in some .ini file
check my message history about EQS in #cpp
we had a convo about it with siliex
what is EQS? environmental query system?
I have not used EQS yet. What is a great use case for it?
Sorry, I should have been more specific: what is an example of a real-world task that EQS is used to solve?
it is hard for me to visualize specific usages from general usage due to my lack of experience with building out AI
Hiding from something, finding a good position for cover, selecting a spawn point based on specific params for AIs
Awesome. So after the agent has decided on a task, the EQS may provide useful info for how it can specifically accomplish it
yes
thank you m'lord
I might go about having a state machine for high level goals, and then a behavior tree for each state
Are you a solo dev
yes
it seems like a behavior tree can be nice for how to execute a behavior, but becomes overloaded/too complex when it is responsible for high level decision making (I might be wrong here, just my naive observation)
I'm also a solo dev, I'm always trying to go simple as possible and sacrifice from efficiency sometimes. I tried multiple patterns like FSM -> BT, BT -> FSM, FSM <-> BT
they come with a cost of complexity and complex graphs, also communication between them gets harder too
I try to be task oriented and try to keep everything in a single graph and implement mechanics in BP now
Usually rather than implementation being difficult, tools being seperate and UE lacking some functionalities being a problem
Awesome, thank you for sharing
If you are fine with the fact BTs cancels behavior immediately and snap to most prior one without giving you a chance to "blend out" current task/behavior, it's always a good option
One way or another you always find a workaround but when you try to prevent that cancelling/snapping behavior you always abusing BTs
I saw many people reset/disable BTs, set blackboard keys to "jump" to another node etc.
These are fine but when you add ten more task to BTs it gets insanely complex
because you are working with invisible values of BB and relying on "branch" like decorators (branch nodes in BP)
Alien Isolation has a source leak(?) (its probably legal, just a modding tool) on github
I recommend you to take a look at that
ıts called OpenCAGE
Its a very cool usage of BTs
also this: https://youtu.be/Nt1XmiDwxhY
thank you!
I wonder how exactly do you make AI scripting part of a programming language though 🤔 like how exactly do you specifically support something like that outside of just being able to call the engine APIs for it
Hey guys! Is it normal that HISM instances won't affect nav mesh until a small delay and then re-register the HISM component?
Is there documentation out there for the AI Behaviors (also called "Gameplay Behaviors") plugin? I can't seem to find any other than it briefly being glossed over when talking about Smart Objects.
I have no idea what purpose the UGameplayBehaviorConfig class serves. All it does is just have a reference to a UGameplayBehavior
I'm thinking about using Smart Objects as a means for helping an agent accomplish an already chosen goal as opposed to using Smart Objects as a means for choosing a goal /OldManRantingAtClouds
@leaden mural is there a way to quickly determine what processors will be run on an entity config other than manually going through the code of processors and cross referencing the fragments/tags its looking for?
I'm going through your wonderful sample project 🙏
currently not really
it's a big opportunity for a debugging UI
yeah, would love something like this
I feel like thats going to be a big source of bugs for people going forward
certain processors will/wont be running outside of the developer's expectations
oof that is pretty rough that I don't automatically know exactly what processors are running on an entity config given its fragments/tags, and I need to spend time (re)familiarizing myself through each processor. Even then there is lots of room for user error with the cross referencing. What if there are hundreds of processors? 
Something like this? https://blog.singularitynet.io/ai-dsl-toward-a-general-purpose-description-language-for-ai-agents-21459f691b9e
Have specific stuff like FSM's as a core part of it.. UnrealScript did that back in the day, it had FSM as a core feature. The skookum guys demo'd what was kind of like an event drive HFSM or something. I didn't pay a huge amount of attention, but it was clear they intended a scriptable lightweight event driven behaviour selection mechanism
Blockchain can kiss my... 🙂
Wait I was thinking of this: https://github.com/robotics-4-all/smauto-dsl
Interesting, that just felt like it could be implemented as a more general purpose feature in the language so it wouldn't really be AI specific, but I'm not really very familiar with UnrealScript or Skookum so maybe there's something I've not thought of
Are AI controllers really buggy in ue5 or something?
hey folks
what is the best way for ai to run away from player?
EQS?
os some normalaize location from player
invert the output then use that to set the ai rotation. Then use get forward vector to pick a final target location
i know this but is this a best way ?
there is no best way to do anything
pick what works best for your project after evaluating the tradeoffs of each option
is EQS heavy for server?
it's experimental so performance is probably pretty bad yes. in addition to being unstable
can have some go to function that ignore Z vector
Verse works on top of generated bindings, like how UHT generates boilerplate code for reflection. I think I saw an example of what you are talking about by event driven HFSM in Insomniac's GDC for SpiderMan and if they are the same thing I dont think something fancy like that will be possible
Well, thier implementation was clearly biased towards AI type code. Basically event-driven with a hint of action selection thrown in. I think the point is that the script is lightweight enough you can do logic in it and not take forever (I'm looking at YOU blueprint). So this will be a really good choice for AI style code, because its diff-able and yet doesn't need compilation in the way C++ does.
I guess the real question will be if there's some sort of structured code, like say common classes implemented in the language. That way beginners will start off with better practices than say blueprint offers (which frankly is a bit of a shitshow for most beginners).
Its been "experimental" for like 5 years now, I think its beyond the experiment, and I haven't had any issues with instability.
Do you think would Lua be a good candidate* for this btw?
Since its ultra lightweight
But on the other hand lacks OOP
I recently started to use it, and I'm slowlying decaying more towards to it's further implementations 😄 Not sure when it will cause any trouble though
its actually pretty good because it's calculation time can never take more than a time you provide in a .ini file
its time-sliced
My Custom BTDecorator C++ class seems to not subscribe properly to the BlackboardKey changed event.
void UBTDecorator_ConditionalTimeLimit::OnNodeActivation(FBehaviorTreeSearchData& SearchData)
{
UBlackboardComponent* MyBlackboard = SearchData.OwnerComp.GetBlackboardComponent();
ensure(MyBlackboard);
MyBlackboard->RegisterObserver(BlackboardKeyToCheck.GetSelectedKeyID(), this, FOnBlackboardChangeNotification::CreateUObject(this, &USOCBTD_ConditionalTimeLimit::OnBlackboardKeyValueChanged));
}```
I guess it has something to do with instancing? How do I fix this?
Np 
I used Lua for one of the worms games and honestly, I'm not a huge fan. I think overall the table based syntax was a bit weird. I expect skookum (or whatever Epic end up calling it) will be far better to be honest). I preferred something like AngelScript for my own game engine back in the day.
There was also one called Game Monkey Script 🙂 but I went with Angel back when I was into writing my own engines
pre V12 and UE4
and Unity 🙂
Man I've used a bunch of crappy engines 🙂
Anyone have an idea where I should begin checking why my AI doesn't move? I'm getting a location (which I'm drawing as a debug sphere to ensure it's where I want--it is) and using the MoveTo node to attempt to get there. The showdebug shows the AI is Running but it doesn't go anywhere. I have a NavMesh covering the entire area as well.
check visual logger
Epic should have hired you when developing UE5 
What's visual logger?
Anything related with AI is always logged to there
Even very low level things - It's incredible 
send a screenshot
MoveTo issues should be logged from pathfollowing component
it should log what PathFollowingRequest returned
blocked, invalid etc.
or success but error is in somewhere else etc.
this is the last segment and nothing changes after that
that's what I mean by 'segment'
Here's the area after that last bar
on first LogPathFollowing log
what does it say on the invisible part
does it provide more info about RequestMove
from what I can see its successfull and its moving
so
it either fails after a few ticks with blocked result
not relevant with pathfollowing at all, maybe movement component issue
or something else but still on the logs
This is the first LogPathFollowing entry
hm, yeah, I'm not seeing where the issue lies. Maybe it's a movement component thing
but max speed is set to 400
can you print velocity?
Has anyone had the issue that the AI always chooses the same point in the environment query system?
It always does, no matter which one you choose: the grid, cone, donut...
It always chooses this one
then its a movement component issue
thanks, I think I"m getting it figured out. I work with another person on this project so sometimes things will change that I didn't know would have been messed with lol. Someone set the CMC max walk speed to 0. :X
no, not max walk speed. the walk speed.
the max I checked before
Thanks for your help!
Np 
If anyone is interested, I just pushed my AI Token System to GitHub: https://github.com/intaxwashere/AITokenSystemUE
Let's say you have 10 ranged enemies spawned to attack your player, but if all of them would attack at once player would get stressed out. In that case you need to solve which ranged enemies should have the priority to attack and that's where tokens come into play
Or let's say you have a single AI in a horror game, but you don't want it to be difficult and creepy at early game
You provide a token after a checkpoint reached in gameplay so it can enable it's more creepy behaviors to scare the player
GDC links I'vep put to readme has some real world examples from Spider Man and DOOM
It's also used in Division 2 and probably god of war (judging by my experience 😂)
interesting
yeah we were thinking of some kind of system for dealing with that attack situation in my fps project
Lol i love this intro in the readme "What are "tokens"
Not an NFT thing obviously."

Nice to see a system for this. I've implemented attack slots on characters, and there's a surprising number of little edge cases to watch for.
So it's a priority system for AI actions
not priority, but the way how you let AIs to obtain tokens can cause it to be a priority system
its basically provide a token class and a container component for it, and gives you helper functions to check if you have a specific type a token
in token class, token categories (collection of tokens, i.e. a glorified array but an object) loop all available tokens and provide possible obtainers (called subscribers)
you can also select a random obtainer from given array, or prioritize them
hey folks
i have a simple task
and i wanna when some boolean is true stop this task
but if ai in working in this task it don't check anything
what should i do
If you have a decorator set to abort it, it should definitely work
unreal freezing when i do this
then you have a bug somewhere
how is the tree set up with the decorator and that task?
and if you play it with this, it just freezes the whole editor and everything?
yes
It seems that the decorator would cause the sequence to always fail unless it changes the AIStatus in that branch
therefore if the decorator is reached, it would exit from this sequence, and enter the next one in the parent selector
so the logic which is causing it to freeze would most likely be in there somewhere instead of here
but without the decorator it is ok
and if decorator work
it mean that sequence won't work next time
i break all line except this for debug
freeze again
this decorator made ue freeze
even with no abort
why? 😐
as I said
the decorator requires AIStatus to not equal Go To Food Area
this check is done before it enters the MoveToLocation task
you can set the main decorator you have in the sequence to abort if the value changes
or you can have this decorator check that the value is equal to food area same as the one above, and also have it abort if the value changes
what the different with my own
my issue is when ai reach the move to task
if my state change in this time
it didn't check it
so the way yours is set up right now it requires it to not be in move to food area state
if that check fails, it causes the node to fail, which causes your sequence to fail
which means it goes back to the selector, and it will execute whatever is next in the selector (because this is how selectors handle failed nodes)
but if you set it up so that the decorator checks for equals to move to food area, then it would not fail the check, but if you set it to abort on value changed, it can still abort if the value does change
Decorators are always checked once before the task runs so it's always going to work that way
But if you set it to abort when value changes, it will monitor the value, and if the value becomes different, then it will abort during the task
so why in my case it won't work
If it's set up the way as it is in your screenshot, then it will check if the value is not equal to move to food area, and at least based on your screenshot, it would be equal
hey anyone active rn
anyone know if there's a good example somewhere for the new state trees? the docs do a decent job of explaining the mechanics but i'm not even sure how to set it all up in the first place
edit: figured out step 1 at least. to properly init a state tree in the details panel, the state tree in question needs to have its schema set to "Brain Component"
hello folks i have some issue i need some good idea or way to do this
my ai wanna go from point A to point B
A(10,0,0)
B(4000,0,0)
my ai is in (100,0,0)
and it see some enemy
i wanna cancel the move to node in behaviour tree
how should i do it
Just cancel/update the moveTo with a new target location(enemy location)?
Any way of leaving a infinite Loop node with a task? If I try to use the FinishWithResult Failed / Aborted it gets stuck at the FinishWithResult Task. Do I need to write my own Loop node?
The reason I don't use a Decorator (with Observer aborts = self) in the same node as the Loop node is that I want to quit the Loop at the end of the Sequence whenever a Decorator returns true.
There aren't really a lot of clean ways to do it as far as I know. You can add a second decorator to the one with the loop, and have that look at a BB value or something else to choose when to abort
Or a custom looping decorator yeah
(Looping decorators can only be done in C++ since the stuff used for it is not BP exposed)
that's a bummer
What's the difference between Failed and Aborted?
In this example it gets stuck when Aborted and when Failed, the above selector chooses Wait.
If you check the Selector comments it'll tell you. It's not getting stuck, it's just when you abort, the whole tree restarts. If you fail, the selector carries on to the next node.
Aborted = finishing aborting = failure
Failed = finished as failure
Not really descriptive ^^
When I abort in this case, shouldn't it go to the left wait task after the FinishWithResult (Aborted) task? It's stuck for me again.
I don't know if there's really any distinction between failed and aborted
Like... the resulting behavior in selectors and sequences is the same
I think in C++ you can probably see the specific reason, but I don't think anything makes use of it by default at least so maybe if you wrote some custom nodes that look at those values it could do something
Not for me. When I set the FinishWithResult node to Fail instead of Abort, it will cause the above selector to choose the next node. When setting it to abort, it's just stuck.
I will just use it with Fail in the future x)
🤔
Maybe I'm mistaken then, I definitely was under the impression they're effectively the same, because aborting and failing are both "negative" results
I wonder where I got this impression from then lol
BTTaskNode.h shows that
1. Success, Failure, and InProgress can be used with ExecuteTask and FinishLatentTask
2. Abort and InProgress can be used with AbortTask and FinishLatentAbort
For ExecuteTask and FinishLatentTask:
Success/Failure both signal that a node has ended while InProgress stays on the node. UE4 uses an event driven behaviour tree so it doesn't automatically reevaluate all conditions, instead it will stay on a node in progress. Frequently InProgress is used with TickTask so the AI will continue doing something every tick, like walk forward some distance.
Success signals success while failure signals failure to the behaviour tree. Where the behaviour tree goes next depends on the parent node, usually a selector or sequence. Selectors end when a child node succeeds while sequences end when a child node fails.
For AbortTask and FinishLatentAbort:
These are used when something outside of this task results in the task prematurely ending. The task did not succeed or fail, it simply has been stopped. The last common control node in behaviour trees is simple parallel (selector and sequence were mentioned above). It allows for both a main task and background nodes. When the main task ends (due to success or failure) the background nodes are told to abort. AbortTask and FinishLatentAbort then return either InProgress while the abort is in progress (in case you want to clean up) and Abort when the abort is completed.
That makes sense. The background task in a Parallel node can be aborted while the main task needs to finish with success or failed.
The Parallel node can be set to not abort the background task on finish or to immediately abort.
Yeah
Hey
How can I check with
UAIPerceptionComponent```
if an AActor is no longer visible to the AI in this frame?
You can probably just bind a delegate to the perception target updated or whatever it was called
the successfully sensed is false when sight is lost
if you don't want to use the event for some reason, you can use get actors perception or something along those lines, but you may need to filter out other sense data from it
Thanks, the solution that I've been provided is to use cpp void GetCurrentlyPerceivedActors(TSubclassOf<UAISense> SenseToUse, TArray<AActor*>& OutActors) const; and I think that it's the correct one
regarding the component usage
Ah
That would probably work, but it will return all the perceived actors' infos
I think there was a function which you can use to get perception info for a specific actor which may be more convenient to use
Hey, I've got some troubles during my AI is going to specific location. As you can see the greener zone is not large enough. So the AI is blocked in teh wall. Any idea?
It seems like the AI is trying to navigate through a corner too tight for its capsule. I would guess the navmesh agent radius is not setup correctly. I think fiddling around with those settings should help resolve your issue. Or possibly reducing the capsule radius if needed
Hi all, AI newbie here. I am hitting a bug that has me scratching my head. I have a working AI using a BT and AISight sense to get the player target. My player actor has the AIStimulusSource attached. All working fine.
However, when I attach a simple weapon actor to my NPC, it breaks the sight sense and targeting. I confirmed this is the problem by running PIE and deleting the weapon actor from my NPC. Immediately, the AI starts working.
The weapon is fairly simple. An actor w/ collider and static meshes. How can this be interfering with the AISight sense when that is driven off the AIStimulusSource??
Ok digging deeper... if I set the Collision mode to No Collision it works as well. But doesn't work on Query Only (No Physics Collision) .... why? Why would this block sight? It's only interfering with a tiny part of the overall sight radius as well...
AI sight uses line traces to test visibility
the default channel it uses is Visibility (this can be changed in project settings)... so if your attached actor blocks on that channel, it would prevent the AI from seeing through it
this makes sense thanks. ill keep tweaking this, at least i have a root cause now 🙂
I'm trying to reuse my "dropped" weapon item as an equipped weapon as well, so a lot of the collider/visibility crap you need when it's on the ground just need to be changed on equip...
ahhh... i even implemented this already. however I just turned it all off in an OnRep function... not on the server!
no wonder my Collison view looked fine in PIE. that was confusing.
Had a fun day of art generation and general sillyness today, cos my boss has Covid so we couldn't have a management meeting 🙂
Narrative fun!
Thinking of getting a license for Davinci Resolve Studio so I can script that and automate a video generator using this stuff
It was a nice series of tweets on Twitter 😄 I've read them all
Hehe.. could you tell I was going a bit mental with it?
Up at 6am writing python code must've sent me a bit loopy
It's understandable I guess 😄 That thing doing amazing things
Finally managed to make myself a simpler interface so I can quickly experiment with the prompts.. hopefully making some discover of nice images easier
but its damn hot right now, so having a nuclear hot GPU isn't a great idea 🙂
Especially if it's an expensive one 😄
Having played with prompt based generation for a few weeks now, it feels more like sculpture than anything. Somewhere in the raw material, there's a nice image, and your job is to find it.
Yeah, very much so
Feels inverted from traditional creation.
Whats interesting, is that each model and setup has quite different aesthetics
Stuff coming out of Midjourney is way different to DallE2, stuff I've been doing in Disco is completely different to both.
So its not just prompt, its stuff like model choice etc.
And of course artist choice in prompt text.. its all quite weird
I've been looking at a few papers on using text->3D mesh, they're kind of crap right now, but clearly everyone's thinking the same thing now that images are plausible
Yeah, I played with one of the NeRF ones on paperswithcode. Very rough, but frequently recognizable.
My prediction, is that neural radiance fields (nerfs) will be the medium that we'll use for text->mesh
Have a look at InstantNerf by Nvidia.. its pretty amazing
My 2800 Ti 12 Gb of VRAM has started to look small with all of this stuff, lol.
Open pose wrecked me.
I'm wondering if NVIDIA are watching and thinking they need to release more Titan GPU's with more ram?
Fingers crossed for the 4xxx series being decently affordable.
Yeah, might have to cross more than fingers for that :), but with crypto dying, might well be!
Yeah, I think they know there's a market for more RAM, and they will absolutely charge for it.
I can live with them charging a bit more.. I just want MOAR RAM 🙂
Having 48gb is definitely reassuring though
Getting a 3090 based PC too for some other work, feeling that's going to be a bit underpowered 🙂
Yeah, at 48 Gb, you have some headroom to play with things.
It was quite nice to load ALL of the models at once 🙂 everyone else running stuff on Colab were moaning that they were out of mem
Yep. Increasingly, the tone of the githubs for papers seems to be "well, you can run this on Colab, if you want, but you won't like it"
Unless you stump up the $50 a month 🙂
What a day its been
Our government is basically destroying itself, so its been a fun day all round
They're still going 🙂
Apparently two goups in No10 one asking him to stay, the other asking him to leave 🙂
So, 90%+ chance he stays? (living in the US has leveled up my cynicism 🙂 )
I reckon he'll go kicking and screaming
backstabbed so many times 🙂
I've been watching the stuff about the US insurrection thing.. what a trainwreck
Trump and Johnson and the likes of Bolsonaro... goddam destroyed the world 🙂
Hard to say about UK politics as they're globally less visible but at least in the case of Trump it seems it was just the culmination of years of politics aiming towards that goal
They just needed the final piece to the puzzle :P
Yeah, its definitely been coming a US house full of nutjobs
There are plenty of other countries went the same route though, because the nutjobs also run the media
I see it as more of a case of demon summoning gone wrong. The GoP courted a particular set of voters, and they never expected to lose control of them.
Lose control? Do they look like they're unhappy about the direction it's going lol
That republican arizona thingy was it the other day.. utter lunacy
one conspiracy theory after the next
And the one that was likely to win was saying there was voter fraud 😦
I think the demon summoners are unhappy 🙂 the problem is the demons are in charge now.
If you look at any news there's like two people in that party who seem to be unhappy with the direction out of what 50'ish members of congress they have?
Bannon definitely sowed the seeds on behalf of Murdock
Murdoch?
I don't see the next 5 years or so going well honestly
It really depends on how well they manage the voter suppression which surely is planned
No, we're definitely in a serious crisis, as much light as my defenses make of it.
I mean, this whole russia-ukraine thing defo came about because of trump/johnson and the rest
Probably get more space in news for the US stuff than finnish stuff... which seems upside down
finland seems to be mostly sane still though?
yeah more or less, we have those populist elements as well though
I mean its easier to report on the trainwreck that is the US
But I guess nobody in your media bought it all.. Bannon was over in the UK stoking the fires, I guess he didn't go to Finland
tks, I adjust pawn capsule and navmesh agent radius, everything is working now!
I wonder if there is any GDC or article about mixing utility systems with FSMs
I'm thinking about using conduits and scoring transitions with tags, so the transition class with most score will evaluate.. but nature of FSMs make it quite complex 
Seems interesting
Been wondering anyone or any games ever made very complex ai? The only i ever think is complex is ML by OpenAI
That thing can beat world champions in team environment.
Define "complex"
ML != Game AI btw
Game AI just something you do with your tools and every agent behave based on pre-defined rules
If you mean intelligent by complex, Alien Isolation's "Alien" character is a nice game AI
But if you mean graph/code complexity, DOOM probably
That's basically what I do with BT's to be honest.. mix BT and Utility a lot.
There's ML in different areas of games now. But mostly not for playing them, but for stuff like animation and player toxicity prediction etc.
Do you write custom composites or just adding a layer of utility systems with decorators etc
I found it very difficult to add utility to BTs since its prioritize things more than my utility score
I don't write the utility into the BT itself most of the time, I write it into the data that decides what goes in the BB
Example being things like enemy selection, scoring based on visibility, proximity, firepower and the like
Ah, I see
the thing is, they are still Game ai as they play the game like your ai
like Riot's ai chat filter study?
So I have a bunch of external code that feeds data into the BB, think of it like the perception system, but more generalized and most of that does a bunch of utility scoring
the old chat filter is word matching
Yeah, stuff like that.. you can train a language model to predict toxicity and just run that on chat transcripts
Called sentiment analysis
Loads of transformer based models to do that.. HuggingFace have a lot of fun tools in that area
there's such public library for this, right?
Why didn't you prefer a service instead?
Yeah, I did a sentiment analysis chatbot for a quick demo this year.. was good fun. We fed in from Discord, Twitter and Twitch chat and did sentiment analysis for that
same thing eventually, but just curious
Honestly? I can't remember why 🙂
fair 😄
I mean its just some code that runs at a specific frequency, so probably no reason other than my thoughts at the time
Eren, why would you say ml isn't game ai when it's playing in same environment?
I guess technically to keep the BT a bit cleaner
He means there's a distinction between traditional "Game AI" and ML
usually because Game AI has mostly been about doing logical decision making, where ML really doesn't do that
You can think of Game AI as a bunch of fancy if statements 🙂
it's almost the same i thought as they both try to decide what is the best
ML is a function approximator
unless...
While zoombapup here it's not up to me to talk about ML 😅 but Game AI is just a code.. nothing more. It's just running on your favorite AI tool, be it Behavior Trees, State Machines or GOAP editor etc. and you define those behaviors. But ML is a concept
no, they're very different.. obviously ML can be used to select decisions, but its not the same
The reason the games industry hasn't really caught onto ML? because they're massively conservative and are scared of it 🙂
Also, traditionally they want very precise control over the decisions, which is not how ML works
They want "if my gun has less than 10 bullets left and I see an enemy, run to the ammo and reload" control... ML doesn't really give you that
ML probably wouldnt obey the game design either tbh 😄
Game AI is ultimtaely rigid and thats how people like, its not enjoyable to play against an unpredictable target
lol i can see why the law is there. Only USA and probably EU
Nope, ML would want 1 million examples of what to do in a given situation, then give you a probability distribution over the available answers 🙂
Yep but they can be answers that player never thought of, many games rely on player learning experience
I think its inevitable we'll have to adopt ML more, but it'll take a loooong time.
Dice's SEED R&D guys tried training battlefield 1 agents.. video on youtube showed how that went 🙂 but it didn't generalize
first game to use good ML could be hypest game
We need better ways of thinking about ML in game design/development
There's actually a fair bit of ML used in games btw.. just not games you think about
Most Zynga games have at least some ML being used
An MMO would work better with ML
Stuff like predicting player engagement with content
Game Director concept?
No, more about spotting trends in data
Basically spotting trends in the analytics and using those, usually for monetization
how do AI understand which genre to sell?
So for instance, imagine you have a game with paid for content.. in an item shop. Then ML would 100% be used to predict how to optimize what content and how much cost etc..
Based on previous content
we need "customer data" though, how could we provide that?
like looking at top 100 in steam stats?
for example in fortnite
This is all an area called "Big Data" for the most part, but it uses ML all over
Yeah, steam definitely do ML for their front page recommends etc.
Basically, anything where you have lots of data, is the domain of ML
Well, for instance, you might track steam sales data for the last few years and learn the probabilties for each genre
the lowest at top100 is probably 1000-2000 players i think
In fact, I showed my students exactly that.. some guy learning big data analysis had done that for Steam 🙂
interesting
He did a great write up on the internet in his blog..
The point being, most online games, have huge volumes of data, they definitely use that data for things.
Every button click
Every item purchase
Every kill, death, etc..
yea to understand players
We've used things like deaths to generate heatmaps for years.. You can use that same info to do things like level generation
single player is hard to collect data if offline
But also to predict flows, predict choke points
Naah, you can collect SP data.. just record it and upload every now and then
Almost all SP games will have some cloud based analytics capture
Why do you think they want "always online" for SP games?
For telemetry
really, wasn't aware of these. I will try to play games more. Good to know these
only mobile games i am aware they do this.
Yeah, mobile games are rife with this stuff, but so are most corporate PC games, Ubi and EA and the like..
shheesh
They use it to make money.. so its always going to happen
good old days offline games );
Indie games for the win 🙂
hey guys, has anyone recently used the touch event? i cant make it work im not sure what im doin wrong
i get the perception system and call onevent with a touch structure
the on event method fail to get the sense class from the structure for some reason
The Report Touch Event? Do you pass in the AIPawn or the AIController?
It won't work with the AIPawn, which would work on Report Hearing event, since there it's checks the AIPawn-> controller if they couldn't retrieve the needed interface from the AIPawn
void UKokoroBlueprintFunctionLibrary::ReportTouchEvent(UObject* WorldContext, AActor* TouchReceiver, AActor* OtherActor, const FVector& TouchLocation)
{
if(UAIPerceptionSystem* PerceptionSystem = UAIPerceptionSystem::GetCurrent(WorldContext))
{
const FAITouchEvent TouchEvent = FAITouchEvent(TouchReceiver, OtherActor, TouchLocation);
PerceptionSystem->OnEvent(TouchEvent);
}
}
ive copy pasted this from an ue4 project that was working
What do you pass into TouchReceiver
just an actor
The touch receiver needs to inherit from IAIPerceptionListenerInterface which the AIController does
just try passing in an AIController for TouchReceiver
Wow, I take a few hours off twitter and I miss a ton of news 🙂
what did you hear
Boris Johnson probably 😄
I have a takedown / execution system with animations both from the attacker and victim.
I check if the Path between the attacker and victim is safe to use to perform the Takedown.
For that I check their position to each other for the first frame of the Animation.
That check is not enough and I'm trying to figure out how I should approach this.
I thought about a bounding box which can be manually configured per Takedown Scenario.
In that bounding box there should be nothing that blocks the Attacker and Victim.
If there is something blocking, I use the EQS system to find a spot where the bounding box doesn't contain blocking actors and if found, reposition Attacker and Victim to that spot.
Are there other Solutions out there for checking / performing Takedowns?
I think you should determine the pivot point first before playing execution anim so you'll be able to prevent player from using it at unsuitable cases
I've done this before by generating a circle around target enemy and each circle point had designer defined animations for each target and player, and I was just teleporting player to that location if both circles are navigable, not hitting to any obstacle other than terrain and they are not hitting anything from circle point to target
Why it's not enough in your case?
Since I only consider the path between the Attacker and victim for the first frame, I have no control what happens while the animation is playing. Either the Attacker or the Victim might walk into an obstacle on frame 2 and onwards which I didn't check.
I thought about a bounding box that we can manually set, so I use that as a check instead of the path between attacker and victim on the first frame
I think this is a symptom of not checking the conditions before playing animation, not the issue itself 🤔 Why don't you just check before playing execution animation?
I'm checking the path between the attacker and victim before the animation is playing ^^
I have a data asset where we can set the distance in x and y from the attacker to the victim and I use that to check the path.
Ah, I see now what you mean
This distance is based on the first frame of the animation
Sorry generally it takes time for me to understand since English is not my native language 😂
ahh np, I appreciate your help Eren! 😃
I thought distance is scalar
sry that I wasn't that clear. We can set the offset to the victim and position the attacker to that offset.
with that I mean distance in x and y
Since collisions are involved you have to run some logic in tick because at the point where you received the info they are hitting to something it might already penetrated your bounding box, especially on sudden frame drops or -30fps frame rate
Not sure how to calculate how much they are penetrating though 🤔 That's the difficult part
I mean the bounding box that is set before the animation is playing (probably manually set in a data asset) is responsible for the takedown to play successfully in my idea. If a takedown wans't performed correctly because of collision, the bounding box wasn't set correctly.
Reposition both the Attacker and Victim while the animation is playing seems like another idea.
I thought I might use EQS to find the perfrect spot to start the takedown since I'm more familiar with EQS then Collisions / Physics.
Adjusting while the Animation is playing with Physics seems nice though.
I think what you can do is:
-> Spawn an actor when takedown started (normally this could be an anim notify state but they are const objects)
-> run sphere or capsule trace on tick, calculate all ticks and by their HitNormals find the average direction they are pointing at, then do a line trace from actor's origin to each hit location and with the average distance, multiply it with found average direction and aff offset
would this work?
Similar how characters gets pushed outside the wall on begin play when their positioned partly inside that wall.
I'd also have a hard cap for maximum distance they can be offsetted, for example something can push them suddenly and they can fly away, in that case you should be able to instantly snap them back to that actor's origin
also if a moving car would collide with them they would travel with the car 
too much possibilities to think of
yeah it's hard. I mean it doesn't need to perfect, AAA games also have flaws
Would be nice that it works for a static environment for now.
hard to tell 😅
another thing I forgot is they can get out of navmesh too, you also need to raycast towards navmesh (project location to navmesh function) while adding offset
for repositioning and playing the animation I won't use navigation. Just setting / lerping their location / rotation and playing a root motion animation.
guys does anyone have a good tutorial to tell me how to apply sight scene with damage scene ?
Radius - closestpointToWall or whatever? isn't?
Difficult part was finding closest point to wall but I thought just line tracing and getting the distance of trace would also work instead
You might need to enable cpu access on static meshes to find the closest point to wall or some other physics tricks I'm not aware of
it's all about projection of a point on a line
but the other shape should be a sphere else it's gonna be heavy lol
anyways, I am working on some PubG type game and I want the bot to search the buildings for loot. I am thinking of EQS and seems like it can help me with it. Any other idea ?
How do you define a building to your bot?
what does that mean?
you mean is it interactable or smth?
Is building an actor, or is there anything holding the list of all available loots or is bot trying to guess loot locations dynamically without any data
bot will not know anything about where the loots are but yes building is a place where it can find loots
what i have thought of is , it line trace a building, go towards it and use EQS for finding loots
I would place volumes in rooms or somehow generate a data for possible loots (like where players died most etc) and let AI discover those areas , and when reached to building just use perception to collect loots
but then there are ways to enter through windows and doors
due to so many collision objects, i don't think it can easily figure out the loots
with perception
Then when entering the area, provide a list of possible loots and try to fake the behavior
Let it select loots by their priority, with a function fill an array of loots like %5 of them are rare loots, %10 of them are good loots and rest is just usual loot
randomize it and let it move towards loots
you can also add random non-loot points
so it'll look like its actually searching
but generally you would have an utility system for that
AI needs to know which loot it requires
and search based on that
in PUBG bots dont loot level 1 armor if they already have level 3 one
ah yes, it has the loot criteria
yes
the problem is when it reaches the building, how is it supposed to handle the behavior 😂
I dont even remember any bots in PC version of Pubg lol
that's what I have played, not the mobile one
gather all loots to an array, then score them
brb need to opne the door
then the building should have the respective information about the loots
or atleast the spawn points in it
bot
yeah
its completely up to you how will you achieve that
as I said I'm a fan of volumes
was there a ghost ping in here?
hmm, didnt see
nvm then thought I was wanted lol
what exactly is it?
press this button to see if there is anything
Yeah, it depends.. its a huge topic than it looks 😄
you either do bottom up or top down approach
you got any links where I can read about it?
it can spawn, manage things, prepare things.. or just gather info about the world statee and thats it
I dont think so
its just a concept not a technique so probably not
I see
same two methods also exists in level design, programming patterns etc
but I recommend you to let loot actors/items define their scoring rule
rather than volume deciding it
yeah, i dont even know what it is lol
properly
but I can guess what you are trying to say
so basically you will have a Score(ABot*) function in the loot actor
🥲
ah you can just skip what I'm saying about them, no need to overthink about it
I was just throwing some additional infos
I have zero knowledge about sights/perception 🥲
you can either decide to let volumes spawn loots for AIs requirement or just have the data
for pubg 2nd one would be more suitable
1st one called top down approach, one manager doing everything, managing smaller things
bottom up approach is smaller things affect the bigger picture by defining their own rules and states
I see
and the world has information about all those volumes right?
if it needs to
uhm
pubg probably just have actors all around the world spawning loots
rather than volume approach
because they always spawn same amount of loot at every map
with very similar quantity
🥲 🥲 🥲