#gameplay-ai

1 messages Β· Page 166 of 1

celest python
#

Compiler error is self explanatory

#

Max Walk Speed is a CharacterMovementComponent property

#

You havent plugged anything to it

#

So it tries to find the property in the self (the class you are on) - which doesnt have any MaxWalkSpeed variable inside

lyric flint
#

even if i do it doesnt work

#

I tried both

subtle birch
#

try using a print string in you ai bps. see if it outputs somethink @lyric flint maby see if the walk speed gets changed

lyric flint
#

but the print string shows up on screen flickering on and off for a split second so its hard to tell

main heart
#

Try calibrating the last option in Print String node! πŸ™‚

main heart
#

Did it work @lyric flint ?

sullen crater
#

Guys, which way of writing AI is the most flexible and free in terms of features? AI in Blueprint, in Behavior Tree or in C++?

misty wharf
#

C++ is most flexible but also likely to be most tedious

#

It's best to use a combination of all the ones you listed as they each have their own strong points

main heart
#

yeah best of both worlds

fallow gust
#

Hey yall. I am writing a hybrid Behavior Tree/GOAP implementation for my AI. I have the first two parts down pat, but I am trying to decide on a recommendation for determining on how to have the AI compute what it's next goal should be dynamically. For instance, I am thinking of having a 3-dimensional vector weighted by 3 distinct factors, positive outcome weight, negative outcome weight, and effort to accomplish, then normalizing the vector. From there I plan on using Euclidean distance to determine the best next goal to pursue. Thoughts?

#

Then an iteration on that having a property that helps direct what to use as a more weighted selection, for example, pursue goals with higher positive outcomes, or pursue more goals with low effort to accomplish more sooner, or to avoid the most negative outcomes first.

lyric flint
#

not sure what you mean

#

it is checked on for print to screen which should work

main heart
#

Yeah even now I forgot what I meant.

tardy marten
#

Hey, would anyone have a really good tutorial on AI? I want to start building out basic AI but don't know where to start

crystal sequoia
#

Hey, I'm making a space game with 2d movement and I want to use navmeshes. Is there any way to generate them, in the air/ not on a surface?

tardy marten
#

Nvm I looked in the pinned posts like a smart person.

ocean wren
fallow gust
mystic solar
#

Ahoi! I tried pathfinding in c++ and using a lot of different EQS options, but i still struggle to find the best position to approach an actor which could have any size as close as possible. As I always have to handover a distance to the center of the actor, IΒ΄m failing to get next to the desired actor. In the picture, you can see two actors of various sizes and the desired position of the characters.

ocean wren
#

I think Kevin had some chapters in GameAIPro on the same thing which should be available online now

#

Dual Utility reasoning I think he called it

#

Dave called it Dual Axis something

fallow gust
whole fable
dry island
#

Does anyone know why this might be happening on my behavior tree? Just trying to get the AI to walk back and forth. I basically just followed the documentation to get this to work, not sure why it's not executing

fallow gust
fallow gust
#

Looking at your blackboard variables during debug the location is invalid

dry island
#

weird

fallow gust
#

Your task before moveto must not be setting the right key

dry island
#

Hmm

fallow gust
#

Also make sure your patrol radius is greater than the acceptable range for the MoveTo

dry island
#

So here are my task blueprints. The key for Patrol is the same as on the blackboard...

#

Patrol radius is much higher than the range...

#

hmmm

fallow gust
#

Your walk speed is being set to 0

dry island
#

On stop

#

That's the behavior I want if the player is in range

#

The second one is the stop behavior

fallow gust
#

Ah, okay. There is actually a function(on controller or movement component I think) to cancel your movement path instead of setting speed to zero.

#

What does that radius function for finding a patrol point look like?

dry island
#

That's the first one

fallow gust
#

Can you show what your nab debug overlay looks like in the level editor?

#

Nav*

#

As well as the variable details for setting the patrol location? I feel there may be a typo in the FName for the blackboard key.

dry island
#

Not sure how to show the nav debug overlay specificly...

#

That's on the task...

#

That's the key... doesn't look to be a typo

#

wait i got the debug overlay

fallow gust
#

What is the Value of the PatrolLocation variable?

dry island
#

On Task Default Value is none

#

It gets set as blackboard value in the function

fallow gust
#

Which function? In the definition of the behavior tree? Also, I should asked, is this UE4 latest?

dry island
#

It's 4.27

#

and it gets set on the Event Receive Execute AI Event in the Task

fallow gust
#

Okay, if you are in your level viewport and press P you should see green showing where the nav mesh has calculated as navigation for AI. I am not seeing any of that green overlay. Also, you are setting it with the value of the patrol location variable, which you said is None. What if you change the default to”PatrolLocation”?

dry island
#

Oh I can show that, it's green

#

one sec

#

I'm not able to set the value to anything other than none...

fallow gust
#

Where are you trying to set it?

dry island
#

I can't change the value in the inspector

#

sorry, I mean details panel. I'm a unity pleb

fallow gust
#

And in the behavior tree when you select the task node?

dry island
fallow gust
#

Sorry, the task to find your patrol location

dry island
#

Yeah that's this. The Key is PatrolLocation

fallow gust
#

In the behavior tree similar to wat u showed previously for the move to

dry island
#

Oops my bad

#

One sec

fallow gust
#

Okay, go to you task function, click the eye next to PatrolLocation and compile the blueprint then go back to that view

dry island
#

Ahhhhh

#

It's working

#

THANK YOU!!!

#

well it worked for a second haha

#

I think it's working now

fallow gust
#

Awesome!

dry island
#

Now I just have to figure out how to make him only move on the y and not the x

#

@fallow gust THANK YOU so much for your time

dry island
#

Ok so now I have the opposite problem. Been at this for an hour and a half!! Basically it won't switch back to the patrol node after stopping now... what could be wrong?

patent hornet
#

aborts both includes lower priority

dry island
#

I tried self too and that didn't work either?

patent hornet
#

and your SeesPlayer key hasn't changed for the duration of that clip

dry island
#

Right, that's the issue... but I'm not sure why

#

My player is exiting the range

patent hornet
#

nor did i see the red bar that appears when decorator blocks the execution

dry island
#

I think that it's not updating perception after it goes to the Can See player node

#

and I'm not sure why

#

Is there a way to manually trigger perception update?

#

oh wait

#

I think I see it

#

My lose sight raidus was at 3500!!!

#

Thanks @patent hornet lol

patent hornet
#

AIPerception is also capable of some things you're doing by hand out of the box

#

you can generally use GameplayDebugger to see more, pressing '

#

after it loses the sight, it "remembers" the last sighting for a bit of time, before it "forgets" the actor

#

with gameplay debugger active you get debug spheres for that, for each sense

dry island
#

Yeah, this was based on the documentation on Behavior Trees, I'm a n00b with AI

#

I should use that for sure. I will now

#

thanks!

proud crescent
#

What are some good techniques for navigating very large but sparsely populated worlds?
Specific use case: Flying vehicle (constrained in 2D plane) in a world mostly consisting of large open spaces with occasional clusters of towers or impassable regions ("too windy"). I can basically assume it is okay to go in a straight line in the open parts (plan to just add some kind of dynamic avoidance on top of the pathfinding).

ocean wren
#

It depends on the movement of your vehicles.. can they slow down and hover and then land? or does it have to fly in and land?

#

because if the former, I'd do it as two different elements

#

i.e. a 2D collision avoidance (basically RVO like) and then for landing you can just project down to the navmesh

#

avoidance could be done with simple steering behaviours really

#

depends on how dense the towers are if you need pathing vs avoidance

#

I've done stuff like that using a 2D physics engine before, worked out nicely

#

Box2D is what I used

proud crescent
#

Thank you for your insight @ocean wren πŸ™‚ They have a complicated landing behavior but I was thinking that I would use splines for that part once they got close enough and then simply pathfind to the start of the splines. I was thinking that using unreals nav-mesh would not work since there was no geometry in the air for the nav-mesh to "sample". Also was worried that it would take up large amounts of memory when the world is very large Or do you think this will be balanced out because it is mostly open areas? Finally Is it possible to procedurally exclude volumes of the world from the nav-mesh (the windy parts of the world). These are known in advance but it would be cumbersome to mark up all the excluded areas by hand. Sorry for all the questions!

ocean wren
#

You can use navmesh blocking volumes

#

But yeah, it'll sample all of your geometry for the navmesh unless you set it to not collide etc.

#

And yeah, UE4 at least doesn't deal with large worlds well at all, so not a good match

#

If its a new project, UE5 might be more capable in that sense

#

What I'd do personally, is use the octree built into UE and do a pathfind on that.. spline based pathing within an octree is what the Kythera guys implemented for their 3D pathing solution and it makes a lot of sense.

#

If you have the budget you can save yourself the time and just license theirs πŸ™‚

proud crescent
#

I actually have the opposite problem πŸ˜… since I want to generate the nav-mesh where there is no geometry and avoid anywhere there is geometry

#

normally it needs a floor from what I have seen on tutorials

ocean wren
#

yeah, you wouldn't use the navmesh system for the flying part at all

#

you'd use a local avoidance system, unless you've got a really dense set of incursions into your flying space

proud crescent
#

ah I see what you are saying now

ocean wren
#

i.e. if you were flying a drone through a forest might be a bit challenging

#

but helicopters around the occasional skyscraper I'd do local avoidance

#

so depends a lot on how your space is in the flying plane

proud crescent
#

the avoidance is fine I am just struggling with how to generate the flight path on the world scale (e.g. go around the windy areas and not get stuck in dead ends)

ocean wren
#

well, if you've having things like concave objects, then you'll have to do a 2D pathfinder

#

basically, do 2D collision primitives in your flying plane for colliders, subtract those from a 2D mesh, store the mesh in chunks, use a 2D heirarchical pathfinder on the chunks

#

HPA* is something you can look at

proud crescent
#

Thanks for the pointers will give it some thought πŸ™‚

ocean wren
#

Not ideal Unreal Engine territory πŸ™‚

atomic delta
#

guys the hits arnt registering any help[2:04 PM]when i shoot it sometimes goes through the A.I.[2:05 PM]pls can i have help

misty wharf
#

You're going to have to be more specific than that

#

But if you're using line traces, check that your trace channel is correct, and the collision profile on your targets is blocking on that channel. If you have confirmed those are correctly set up, enable the debug line drawing option and confirm the trace is actually going to the correct location

atomic delta
#

hmm

#

wait

#

let me take a video

#

of the blue prints and the game:)

sudden citrus
#

What's the proven best way of making AI-usable doors? Navlinks or nav modifiers?

#

I used to think navlinks but someone pointed out to me last week that modifiers might be a better way and I can sort of see that.

misty wharf
#

As usual the best way really depends on how it needs to work and how your game works

sudden citrus
#

Probably open/close animations are harder to do with nav mods*

misty wharf
#

Nav modifier only really changes the navigation cost, it doesn't really make doors "work" in any other particular way

sudden citrus
#

The idea is that you have a nav modifier + a trigger to make the door open/close etc, and then it works the same for players and NPCs without extra work, and incurs less of a cost at search time (compared to smart links). Also probably harder to make access rules with nav mods... possible through a nav filter but you'd have to fill all the costs ahead of search instead just letting the link "interrogate" the agent

misty wharf
#

a navigation filter is something that affects how a valid path is generated based on navigation modifiers

sudden citrus
#

Yes, and say if you want to allow a character through certain doors (maybe they have a key or not) you'd modify the cost to be FLT_STUPID

misty wharf
#

in terms of doors, the uses for navigation modifiers would just be to give the door a higher cost compared to not using a door, ie. if you have two paths of the same length but one has a door, you could make the AI prefer taking the path without a door

sudden citrus
#

Of course yeah that's the basic thing. I did the whole navlink implementation for a prototype of a Hitman-like game so it needed more complexity

misty wharf
#

Right

#

Smart navlinks really offer the best flexibility in terms of how to do it both in terms of logic and modifiers/filters

sudden citrus
#

The only problem is you need to use them as a base class or rewrite NavLinkProxy into a component

#

tbh I feel like the whole nav system needs a pass, functionality is usually strewn across five classes

misty wharf
#

Why is that a problem?

sudden citrus
#

It's a problem if level designers already placed 70 doors around the level and go "oh yeah can the AI use them now" πŸ˜„

misty wharf
#

Well if you decide on a major change to how a feature works it's always going to require a bunch of work

#

but ideally in the doors case it should just be a matter of adding the smart link component into your door BP

elder perch
#

How often foes the ai call its scripts, is it every tick?

misty wharf
#

"the ai"?

elder perch
#

The ai controller

misty wharf
#

if you run logic on tick then it will tick at its tick interval which defaults to every tick

elder perch
#

Is that the same for behaviour trees?

misty wharf
#

Yeah they should process on every tick

dawn loom
#

I'm running into the max crowd aware path following agents limit (set at 50 by default) I upped it to 100 but we might need more is it safe to make it higher?

#

also I can make my AI disable it's path following when it's idle and out of the player vision but idk how to do that

ocean wren
#

You should look at what can be switched off for non visible agents, things like animation updates and the like

#

You might want to also throttle the tick rate for non visible etc

ebon lagoon
#

how to move a pawn on a navmesh?

#

I have this navmesh which sets the player -> checks that the player is set -> move to actor

#

the pawn refuses to move.... probably because it lacks the movement component that the character class has

#

what can I do to fix it? (or implement it manually)

#

I have no qualms about implementing a custom task but I have no idea how to get the next point on the navmesh myself

prime barn
ebon lagoon
#

yes and yes

#

my problem with the floating pawn movement component is that it moves but it is annoying to override.
by that I mean:

  • controlling animations from C++ variables
  • Making the actor turn to face my player (the default moveTo doesn't do that on floating component)
  • makes my pawn walk slightly above ground (despite having his location constrained)
#

While a character component may solve the last two issues, it just seems overkill since my intended is logic is literally:

  1. move to player
  2. call and wait for the attack method montage to end
  3. wait a bit (like 0.2s)
  4. repeat step 1-3 until player or this AI pawn dies

and I would also struggle with controlling the animations from my animator instance

#

@prime barn

prime barn
prime barn
ebon lagoon
#

So things like a tower in LoL would qualify as pawn but a minion would qualify as a character? (since a minion needs movement and rotation among other things)

#

My game is nothing like LoL, just trying to understand what you mean xD

prime barn
ebon lagoon
#

I see

#

what about something like a tank in older red alert games?

#

they still move and rotate but I wouldn't call them characters/skeletal

#

do they qualify?

prime barn
#

I'd try to use Pawns for that.

#

Simple movement and rotation towards target should not be an issue.

ebon lagoon
#

thanks! bow2

prime barn
#

I have a public project that I use as my portfolio

#

I use Pawns in it, they have Behavior Trees, tasks etc. They use Floating Pawn component. Perhaps you'll find something useful there.

ebon lagoon
#

I will take a look

#

thanks again bow3

prime barn
#

partially in C++

#

np πŸ™‚

ocean wren
#

You really need to do AI in C++ for the most part if your project is anything but trivial. At least that's how it feels to me. Just because you have so much more flexibility. You can write new tools and extend classes and just generally control your codebase a lot better.

#

I don't mean the configuration part. I mean the tasks and senses and the like. Configuration in BT/BP etc is what its good at.

celest python
#

I really need to meet the guy who made Red Alert 3's AI

ebon lagoon
#

I know RA1's AI is open source

ebon lagoon
celest python
#

I wish I could see some goodies from the source

#

But I learned the guy who made RA3 AI working at Chrome OS' development now, also worked on flight simulation softwares after leaving EA

#

So no wonder he is some psycho mad big brain programmer

main heart
#

RA1 sounds more like a bollywood movie

ebon lagoon
#

Lol

ebon lagoon
#

Is there a good resource (free/paid) that delves deep into AI?
Most resources cover basic BT stuff but they don't go into things like multi-frame tasks and whatnot

#

by multi-frame tasks I mean like the MoveTo, it executes on multiple ticks/frames. I tried figuring out how it works in code but too complicated for me

misty wharf
#

Afaik not really

#

multi-frame is easy in blueprint based tasks, you simply don't call finish execute until you're done

#

iirc the C++ version works sort of like that, you return InProgress as the result for it which prevents it from finishing the task immediately, and then there's some other bits that you need to do to finish it

#

in BP's you can do something like this for example

ebon lagoon
#

I have this code:

void ABaseCharacter::MeleeCommandReceived()
{
    if (!CanMelee||IsMidAction)
    {
        return;
    }
    CanMelee = false;
    IsMidAction = true;
    Animator->Montage_Play(MeleeStabAttackMontage, 1.0f);
}
//played at a certain point in the montage
void ABaseCharacter::MeleeAttackStart()
{
    IsMidAction = true;
    DaggerCollisionBox->SetCollisionProfileName(TEXT("Weapon"));
    DaggerCollisionBox->SetNotifyRigidBodyCollision(true);
}
//played towards the end of the montage
void ABaseCharacter::MeleeAttackEnd()
{
    DaggerCollisionBox->SetCollisionProfileName(TEXT("NoCollision"));
    DaggerCollisionBox->SetNotifyRigidBodyCollision(false);
    MeleeOverlappedActors.Empty();
    IsMidAction = false;
    GetWorldTimerManager().SetTimer(MeleeRateTimerHandle, this, &ABaseCharacter::ResetMeleeFlag, MeleeCoolDownSeconds, false);
}

The idea is it turns a collider on/off at certain points of the montage, and does damage if it overlaps.
It works as intended for the player character but I have no idea how to tweak it for the enemies. I currently have it in the base class since both types can melee.

I assume the task finish would have to be done when MeleeAttackEnd but I'm not sure how to handle it

misty wharf
#

give it a delegate that you bind to

#

in the screenshot above the attack end is a dynamic multicast delegate on the npc base class which just broadcasts whenever an attack finishes

#

the basic way my system works is very similar to what you pasted, so you'd just put the broadcast into your MeleeAttackEnd and I think it would probably do the trick

ebon lagoon
#

I'm trying to understand the screenshot you sent but I'm not sure about how the event is relating to the function

#

you are unbinding the event and returning Finish Execution

#

but isn't the delegate listener its own scope?

#
OnExecuteAI(...)
{
//get the character
//bind to the event
//melee command start
}

OnEventHappened(....)
{
// returns finish
}
misty wharf
#

the delegate gets broadcast whenever any kind of attack fires, so once we are done with the attack that was triggered by this specific BT task, we need to unbind from the delegate

#

otherwise if another attack triggers for some other reason, it would keep running the code

ebon lagoon
#

yeah but like if im thinking correctly the return is in a whole other function. I am not sure how to get it to the ExecuteAI one.
The only way I can think of is by using some sort of temp variable to interop between them

misty wharf
#

ah in C++ terms?

#

if you want to do it in C++, the easiest way is to make your task instanced

#

which allows you to use just regular properties in the task class to store state

#

otherwise you have to use the task memory feature which is probably partially why the moveto task looks so hard to follow :P

last helm
#

Hi, I wrote an ai code in cpp but the problem is that the ais are also shooting at them selves. What can I check that it won't happen?

celest python
#

Is there any way to use different Context for EQS tests without creating different assets, like how we do for option configs?

ocean wren
misty wharf
#

You could possibly modify the generator's properties in C++ before the query gets executed

#

But it's not really exposed in any kind of nice way in editor

celest python
ocean wren
#

You can just create different query contexts

celest python
#

Another reason to blame Epic for being bad at UX

ocean wren
#

Yarp

misty wharf
#

It's a bit hard to say because "shooting" can mean many different things

#

But if you're doing line traces or projectiles, you need to set your collision channels so that whatever is not supposed to be hit is ignored

terse star
#

The AI are shooting each other? Or the AI is hitting itself when it shoots?

last helm
#

each other

last helm
misty wharf
#

Right, so check what was seen before you do other actions

last helm
misty wharf
#

Yeah hard to say without seeing any of the code

#

If you cast the seen pawn to the player character and ignore everything else, it should probably work

ocean wren
#

Dammit I need a team of artists!

#

and some programmers πŸ™‚

#

But mostly artists..

#

PCG is only going to get me so far.

heady raptor
#

my Logs say

"SimpleMove failed for AIC_Unit_C_0: movement not allowed"

can i somehow get more information out of it to understand why the movement is not allowed?

#

i would wish i have more detailed logs 😦

ocean wren
#

You could stick a breakpoint in the code and see where it failed

#

The main benefit of Unreal Engine is that you have the source code

heady raptor
ocean wren
#

Being able to debug is the only way to make progress.. its a skill you have to learn really.

#

Wondering if I should use a sampling based approach to spline proximity for my steamdeck game idea.. wondering if there's even an analytical approach I can use

#

I guess its a minimization function across both splines

gritty peak
#

Hi i am trying to make a flying AI. I am using a character actor with an ai behavior tree. I got it to fly to my character but the ai is not rotating. I tried adding a sytem to change the meshes rotation based on find look at rotation between my player and the AI. However it seems to be stuck. am i missing something?

opal crest
#

I'm working on some combat AI, and I have an EQS Query that's pretty good at choosing cover, but I'm trying to have it avoid choosing paths to that cover that have it pass near threats. i.e. if there's two equally good positions to aim for, but the path to one goes by a turret, and there's a safe path to second, I'd like it to choose the second. What are some ways to achieve this?

misty wharf
#

πŸ€”

#

maybe you could try filtering out points that would require passing through the turrent's line of fire

#

ie. if you calculate a line from the querier to item, does this line intersect any turret's firing lines (ie. a line you calculate directly forward from a turret)

dim lynx
#

how can i disable falling for AI?

#

i disabled gravity but this doesn't help

#

I want AI to stay in the air

misty wharf
#

if you're using character movement component, maybe try setting movement mode to flying

#

or try setting gravity scale in CMC to 0, as I think it might be doing its own gravity calculations

main heart
#

Endow them with appropriate weight, I mean!

crystal sequoia
#

Hey, is there a way to add navmesh pathfinding to a Player Controller?

main heart
tame cedar
#

Hey guys, I have an AI question, how to make a AI Group Logic to Spread among Multiple Targets, like the game Mount and Blade, one team's soldiers will evenly spread out to fight against the other team. I did a logic that each soldier always fight the closest enemy, the result is not good, any ideas how to do it? Thanks

main heart
#

Perhaps explain WHY the results are not good.

ocean wren
#

Typically for that kind of thing, you'd probably want to look at formations, from what I understand, you don't fight in those kinds of engagements as an individual, instead you fight as a formation, so I suspect most of the logic is at the formation level, with individual agents doing just the final close-quarters logic to attack nearest enemy. The formation manager would do the actual actions to direct it (things like encirclement etc)

#

Pretty sure I saw a presentation from Chris Jurney about a similar thing at GDC once. He did it for a Warhammer game I believe, or maybe a Company of Heroes game.

misty wharf
#

you can use get perception class if you have the perception event data

crystal sequoia
ebon lagoon
#

I have this service that sets a player (Object/Actor) blackboard key

void UBTService_Player::TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
{
    Super::TickNode(OwnerComp, NodeMemory, DeltaSeconds);
    APawn* Player = UGameplayStatics::GetPlayerPawn(this, 0);
    if (!Player)
    {
        return;
    }
    OwnerComp.GetBlackboardComponent()->SetValueAsObject(GetSelectedBlackboardKey(), Player);
}

and this:

#

expected behavior:

  1. follow player
  2. when close enough -> melee
  3. wait a bit

behavior happening:

  1. go to player's initial location regardless of where the player actually is
  2. execute a melee even if on air
  3. wait a bit
  4. follow the player properlt
  5. do melee only when close
  6. wait and repeat 4-6
misty wharf
#

1 might be because of tick

#

the moveto fires before the service has ticked, perhaps.

ebon lagoon
#

the weird part is it seems to happen in simulate play but not in viewport play

misty wharf
#

Simulate is not same as PIE so it might behave differently I guess

#

Not sure how exactly simulate differs from actually playing in terms of how the logic runs

ebon lagoon
opal crest
# misty wharf ie. if you calculate a line from the querier to item, does this line intersect a...

Oh, that's interesting! Thank you. I am doing something similar for determining that the final space is safe, so I could generalize that if I could get the querier->item nav path, and determine the items that the nav path goes through.

Sounds pretty expensive though. I assume that the nav path grid generator is already paying most of this price, and I might be able to write a custom generator to expose the results in a useful way.

misty wharf
#

I don't know if it's actually that expensive

#

You could do it as a 2D line-line intersection check basically

#

or line-ray

#

so it's just a bunch of maths, it doesn't need any linetraces or anything like that

opal crest
#

Yeah, I can see how it's really cheap if the movement is in a straight line.

misty wharf
#

well even if it wasn't, the only thing that really should matter whether moving from current location to target location would cross the line of fire from a turret

#

I think it would cover most cases but maybe not all (eg. if it needs to go around some obstacle)

#

I think the going around obstacle case could be done via a separate check on a path generated between the points which would be a bit more expensive

opal crest
#

Yeah, that's where my head was going. I can definitely prototype getting the path from querier to item, and doing a series of line intersections and see how that works out.

#

But like you said, I may not need that often enough, and I can play with some simpler checks (it's likely that if a straight line passes through an attack volume, it's a bad path).

misty wharf
#

Yeah

#

I think there was an EQS test for navigation path, maybe you can look at how that works if you want to do the more specific test for it

#

Basically you can generate the path, then pull the individual points from the path and test those with the line intersection

opal crest
#

Yeah, I've written some custom EQS tests by reading engine code, so that's doable.

ocean wren
#

For BT's its important to understand what conditions partition the behaviour and what priority they are in relation to each other

#

For instance, doesn't make any sense to do a melee attack unless you're in range for melee attack, so that is a different behaviour to execute when that condition becomes true

ebon lagoon
#

but isn't that what the sequence node is supposed to do? @ocean wren

ocean wren
#

Well, clearly it isn't πŸ™‚

ebon lagoon
#

it keeps executing "moveTo" until it actually comes into my acceptance range -> then and only then it should execute the melee

ocean wren
#

Thing is, your attack can attack nothing, because you haven't tied the attack to the range anywhere

ebon lagoon
#

yes, I want that so the player is able to dodge in time

ocean wren
#

So yeah, you might fix the moveto and it MIGHT work.. but you'll likely get more times where it attacks nothing

ebon lagoon
#

but the issue was that moveTo doesn't follow the proper target if I start in simulate

#

but if I use play in editor, it works normally

#

probably the simulate doesnt spawn my actor or something => thus messing it up

ocean wren
#

But in general, try and design your BT's so that you have conditions that split the behaviour and then make sure your priority is in the right order

#

Makes it easier if you want to add ranged attacks and the like

ebon lagoon
#

Currently I have no such plans and given the scope of this project (first non-tutorial game; so keeping the scope small), I'm gonna be done with it soon.
but just for future reference, how would I go about splitting the behavior?

ocean wren
#

Basically, make conditional decorators that read data from the blackboard and do or not do something

#

and have those conditions apply to higher priority behaviours

#

so that they only happen, when the conditions allow

#

Then just think, left to right, higher priority to lower.. how to sort out what is the highest priority

#

i.e. the most specific behaviour, tends to be the most priority

#

the least specific (like idling) tends to the lowest

ebon lagoon
#

I see

#

thanks

ruby reef
#

Does anyone have any good tutorials or starting points for implementing ai daily routines? I have guard ai that have patrol paths but I would like to implement shift changes and other evens based on time. I've already created a way to track time with a timespan but I'm stumped how to tackle this beyond where I'm at.

#

Eventually I would like to have many systems within the game trigger at certain times.

alpine pecan
#

Evening all, I'm trying to learn how to AI perception properly rather than hacking around some of its most basic functionality for once...

I've got an AI controller doing its thing and listening for footsteps/watching for the player. What I want to do is use the last seen location of the player (which is definitely stored somewhere, as you can see it in the AI debug views) to drive some further behaviour of the AI once sight has been lost.

In blueprint, can I get the last known location straight out of the AI perception system itself or do I have to record it based on successful sight perceptions elsewhere?

#

Bonus question - the GetActorsPerception node spits out an array of perceptions but seemingly no way to differentiate between what sense they were (or weren't yet) generated by. Can I get that information somehow or do I have to find out to manually tag each stimuli and then ignore the untagged (not yet perceived) entries?

misty wharf
#

get sense class should work on the perception info you get out from it

#

iirc last seen location would be if you store the position of the actor when you get an event from sight perception with successfully sensed as false

#

it may even remain in there if you use get actors perception but not sure

alpine pecan
#

That's what I was thinking and it does seem to be the case so the weird bit is that the array that you get from that Info pin seems not to care about what sense it comes from

#

unless the order of that array matches the order of the senses configured perhaps...

#

I'll need to test this more tomorrow

misty wharf
#

iirc it might, but you should be able to just do get sense class on the individual sense info to get the specific sense class it was from

alpine pecan
#

Ahhh

#

Yeah okay that makes a lot of sense, I wouldn't have seen that via breakpoint and snooping around in the array itself

#

I'll check in tomorrow once I've tested it more

#

Thanks!

high tide
#

Like a random in game event

main heart
#

There is a GDC talk on dialog. Quite famous though. Lemme see if I can fish that!

celest python
#

They use some middleware (is that how its called?) thing to make lookups faster to search dialogues

#

It's very difficult to do that for UE

#

Since blackboard value access times also get multiplied exponentially you cant loop 10k conditions and select the best one like how they do

#

But I found a smarty-panty way of implementing it with a cheap way but I'm not sure it will work either

main heart
#

I am sure there must be something on market place.

#

but yeah default Engine functionality is I am ignorant about

celest python
#

Sadly something equal to what Valve does it what we are lacking around the marketplace sad

main heart
#

πŸ™‚

dawn loom
ocean wren
alpine pecan
misty wharf
#

Depending on what you're doing it might be worth just saving the bits you want into some variables so you can access them more easily

alpine pecan
#

I'm currently recording the last known location of the player's pawn into the AI's blackboard for use elsewhere

#

I guess I could just refer back to the specific entry in the array that I care about and check it directly

#

Next question though - In a behaviour tree is there a sensible way to have a sequence loop for a specific length of time but without cutting the loop short?

#

In my example, I have an AI that's suspicious of something so I want it to go to the location it sensed the suspicious thing at, pause, then do a loop of wandering to a nearby point, waiting, then repeating.

I'd like this to last maybe 10 seconds or so but not have the AI look like it had decided to wander to a new location and then decide that the 10 seconds was up and immediately change direction since that'll look a bit weird.

misty wharf
#

You could try using a loop with a decorator that checks for this, without making it abort

#

I don't remember for sure how it works but it might be possible to combine them like this

#

Ie. the loop keeps it looping for however many loops or infinitely, and the decorator can stop it whenever the loop completes

#

If it doesn't work with a combination of them like this, you could make a custom looping decorator which handles it the way you want, this can be done in C++ but not in BP's

alpine pecan
#

I may have just stumbled on a trick that may or may not work

#

Simple Parallel nodes apparently the ability to let their subtree finish after the main task has completed

misty wharf
#

Ah, that's a clever way of doing it then

#

I've never really used simple parallel much because it just seems so weird lol

alpine pecan
#

yeah i was avoiding it for the same reasons, this looks promising though

last helm
#

Does anyone know why I cant call AddDynamic for the OnMoveCompleted function?

misty wharf
#

Are you getting a compile error or?

#

Well, actually looking at it, I don't think OnMoveCompleted is a delegate

#

You can only AddDynamic on delegates, that's just a regular function

last helm
#

So is there another way to bind the function?

misty wharf
#

the function is virtual, you could override it in a custom AI controller

#

or you could try binding to ReceiveMoveCompleted

#

I think that might do the same thing but it's just exposed as a delegate

last helm
#

Thanks, I will try that

alpine pecan
misty wharf
#

Ah good to know, I think I might have one or two cases where I have a pattern like this but implemented in a more complicated way lol

ocean wren
#

So anyone got any guesses what this epic announcement is today?

ebon lagoon
#

forgot all about it, thanks for reminding me

misty wharf
#

I'm probably just gonna wait for a summary :D

ebon lagoon
#

they do summaries? o.o

ocean wren
#

I reckon they bought some other company

misty wharf
#

Well I mean just someone posting here what cool stuff was announced basically :P

ocean wren
#

Ooooh... how about this for a theory... they bought.... UNITY!

ebon lagoon
#

nah

#

actually wait, unity went public

#

ohh lord

ocean wren
#

that'd be pretty funky wouldn't it

#

bought unity, open sourced it πŸ™‚

ebon lagoon
#

yeah

misty wharf
#

they will announce the Tim Sweeney climbing trees NFT collection

ocean wren
#

To be fair, not likely, given they've got roughly equal valuations, but Epic's parent company has $$$ or had until recently

#

yeah, if its some NFT shit I'm out πŸ™‚

ebon lagoon
#

nah I don't believe they are into the NFT fad tbh

ocean wren
#

god I hope not

ebon lagoon
#

I hope im right tho

ocean wren
#

Probably, I think Tim is a bit smarter than that

ebon lagoon
#

lets go to another channel?

misty wharf
#

I would like to see them announce they're telling Artstation to stop censoring ukrainian users posts

#

:P

ocean wren
#

Its probably some lame gears of war game or something dumb..

misty wharf
#

Jazz Jackrabbit

ebon lagoon
#

wasnt that owned by EA?

ocean wren
#

Jazz would be good! πŸ™‚

#

Gears was microsoft wasn't it?

ebon lagoon
#

i stand corrected

#

according to google it is owned by epic, not ea

ocean wren
#

Yeah, makes sense.. but its published by Microsoft isn't it?

ebon lagoon
#

yeah

ocean wren
#

state of unreal in 6 mins

#

its going to be bad isn't it πŸ™‚

ocean wren
#

Hmm, ok then.. I guess its worth having look at the MassAI stuff now?

ebon lagoon
#

Main highlights:
Ue5 releases today, new photoscanning app, integration with quixel

ocean wren
#

Yeah, to be fair, wasn't bad

#

Makes things easier for me in terms of supporting my products.. at least I can just make them all for UE5 now πŸ˜‰

fallow hound
#

I hope there's a livestream w/ mieszko about the new Mass stuff

#

I enjoyed his old talks on AI

worldly crown
#

I'm trying to make an enemy AI that tries to stay in shadow and avoid light. Do I need to use EQS or is there some way to do it in behaviour tree?

ocean wren
#

MassAI was Mikko I believe

#

Mikko Mononen, who now works at Epic

#

guy behind the recast+detour libraries used for navmesh generation

#

Ex CryTek and Unity guy

#

Should be able to play with it myself at the weekend, see whats up

fallow hound
ocean wren
#

Ah, nice.. guess it was a team effort, there's a bunch of new things in there.. like smartobjects and the like

#

and the new statemachine thingy

fallow hound
#

yeah i've been keeping an eye on it! I hope its in the city sample project just launched too

ocean wren
#

Should be

fallow hound
#

excellent

ocean wren
#

The code has been in the github version for a while

fallow hound
#

have you had a chance to mess around w/ it?

ocean wren
#

No, I just read through some of the code to have a look

#

Figured I'd wait for the matrix demo content

#

This is good though, means I can update my lectures and whatnot knowing that I only have to support UE5+ now

#

Although, it does mean that they'll have unrestricted access to quixel bridge.. I fear for our disk space in the labs πŸ™‚

opal crest
#

Thanks zomg and cowboy, I got my combat AI avoiding taking dangerous paths thanks to your tips. I have some optimizing to do, but it works a treat.

#

Although I have a feeling the new announcement means I'll be poking around in some new source code today, lol.

misty wharf
#

Nice :)

#

How did you end up implementing it anyway?

opal crest
#

I'm currently doing it the 'slow but accurate' way. I created a UEnvQueryTest subclass that takes 2 Contexts, one for the mover, one for 'hostiles'. I use the navmesh to get the path to the Item, and subdivide the path every Distance Units. Then I trace a ray from each subdivision to each hostile, as soon as I get a hit on a hostile, I mark the path as unsafe.

#

I'm adding a filter for the subdivisions (could any hostile actually see this point, even if they could see through walls, is it a safe distance away) which should speed this up a fair bit.

ocean wren
#

understandable

#

but Mass module is where its at now

flint trail
#

wow, a lot of AI goodies in UE5... Looking forward new AI tutorials 😊

ocean wren
#

Just imagine the army of "influencers" making tutorials this very second

flint trail
#

I doubt that.. UE4 had few and far between AI tutorials

#

(quality AI tutorials)

#

and most of those were made by non-Epic people

real arrow
#

yeah, I'm really interested to look at all the optimizations they made with mass ai

ocean wren
#

There's a ton of AI tutorials, just not many good ones πŸ™‚

#

No doubt we'll see some new ones where people really don't understand it πŸ™‚

#

Did you see they launched a new shootergame like demo? I already hate the animations and I've only seen it twice πŸ™‚

tardy siren
#

oh come on main purpose of lyra is to give a head start for project

#

dont expect top notch art

#

πŸ˜‚πŸ˜‚

ocean wren
#

Yeah, I'm just talking about the goddam shoulders always looking wonky πŸ™‚

#

goddam mannekin defaults... ugh πŸ™‚

tardy siren
#

i dont replace mannekin until my all mechanics of game is done
will game dev community accept me? πŸ˜‚

ocean wren
#

No πŸ™‚

#

especially if you don't fix the goddam shoulders πŸ™‚

ruby reef
#

This might be a dumb question but how does everyone handle their behaviour trees when they get too big

#

Can you have behaviour trees in behaviour trees?

misty wharf
#

If they use the same blackboard, you can use the run behavior and run behavior dynamic nodes to do that yes

shell arrow
#

Has anyone ever done any Hierarchical Task Network (HTN) or Goal Orientated Action Planning (GOAP) in unreal before? Just looking for any general experience out there

celest python
#

Default HTN plugin is broken/incomplete

shell arrow
celest python
#

No, this is a marketplace product

#

Epic has a default one, made by Miezsko

#

but broken

shell arrow
#

okay right I think we briefly looked at that. Thanks @celest python ! Heard of any other third parties or middleware that work well in unreal by chance? The plugin above seems alright but. just looking for other options or anyones xp with these types of systems in general

swift bolt
#

How do you build navigation paths in UE5, because I tried going build -> Build Paths and Graphs and it still complains top left to build navigation paths

celest python
lyric flint
#

hey guys

#

does anyone know how to fix this issue my AI is running in place after I stun him with my flashlight

#

how can I enable the movement after animation is done

misty wharf
#

There is another play montage node which has a pin for when it finishes

#

Perhaps try that one

lyric flint
#

doesnt work

misty wharf
#

define "doesn't work"

lyric flint
#

as in the AI continues to run in place

#

same issue

misty wharf
#

Did you check whether the montage ends correctly?

lyric flint
#

its not that

#

the movement is disabled

#

need to find a way to enable it

#

but enable mouvement node doesnt exist for some reason

misty wharf
#

Yes, and like I said, use the other play montage node which has an execution pin that allows you to run additional logic when the montage finishes

#

DisableMovement seems to just set the Movement Mode of the CMC to None, so to re-enable it, try changing the movement mode back to Walk

#

It's definitely a bit weird they'd have a node to do that but not one to enable it :P You wouldn't know this is how it works unless you looked at the C++ code for it

opal crest
#

That does reverse "disablemovement" I've used it in my "unragdoll" blueprint utility.

misty wharf
#

I think the node is called Set Movement Mode or something like that

#

on Character Movement Component

#

use it and set it to "walk"

lyric flint
#

doesnt work

misty wharf
#

Like

#

I've said it twice already

#

Use the other play montage node

#

there's a different one which has a separate pin for when the montage finishes

lyric flint
#

this one?

#

I dont have it on my bp

#

cant find it

#

can only get it in my AI bp

misty wharf
#

πŸ€”

#

Try copy pasting it in? Not sure tbh.

lyric flint
#

didnt work

#

ffs

misty wharf
#

:D

#

Well this is quite the pickle

opal crest
#

Are you in a function? It has a timeline associated, I think, so you might need to be in Event Graph?

misty wharf
#

Maybe try setting a timer instead then

#

The return value from the montage play node should be the length of the montage, so you should be able to set a timer with that as its time value

#

then trigger the set movement mode stuff from that

misty wharf
#

Right that explains why the other node won't work since it's a latent node and you can't have those in functions

#

if you use a timer, you can use the create event node to link it to another function or event, as you can't use the regular event thing in functions

lyric flint
#

bruh

#

fuck this shit

misty wharf
#

Yeah making games is complicated sometimes :P

#

...or most of the time I guess lol

lyric flint
#

but its strangely fun

misty wharf
#

Yeah

#

anyway I think the timer should let you run the code at the end of the montage... I don't know for sure whether the set movement mode will fix it but at least with it you should be moving in the right direction

lyric flint
#

hey thanks for the help I actually cant try that right now cause my friend is gonna get on the projet soon ( via remote )

#

can I get back to you on this tommorow?

misty wharf
#

I'll probably be lurking here tomorrow if I get bored so I'll check then :D

ocean wren
#

I'd also tend to use utility over both of them to be honest

celest python
#

@ocean wren first time seeing you this late, are you diving in the UE5 source? πŸ˜›

shell arrow
#

@ocean wren thank you for the response! that aligns with my very limited understanding but I may or may not have some designers pushing it. Could you recommend anything more modern to look at? I've only done ai a few times in my career and i'm not up to date by any means

ocean wren
#

Nah, just cant sleep thinking about a paper I'm writing

ocean wren
# shell arrow <@!152527068045770752> thank you for the response! that aligns with my very limi...

Hmm, I'd look at some of the GDC presentations on utility AI: https://www.youtube.com/watch?v=IvK0ZlNoxjw

GDC

In this 2016 GDC panel, programmers Kevin Dill, Christopher Dragert & Troy Humphreys provide a comprehensive exploration of modular AI, from the theoretical underpinnings up to code examples from shipped titles.

Register for GDC: http://ubm.io/2gk5KTU

Join the GDC mailing list: http://www.gdconf.com/subscribe

Follow GDC on Twitter: https://t...

β–Ά Play video
#

And Tommy Tompson's discussion of utility: https://www.youtube.com/watch?v=p3Jbp2cZg3Q

Support AI and Games on Patreon to get your name in the credits, early-access and more:
http://www.patreon.com/ai_and_games

Sometimes the AI in a videogame has lots of perfectly valid actions it can take, but deciding which one can be quite difficult. Utility AI is one approach to help solve it, by calculating how useful that action is base...

β–Ά Play video
#

Also recommend Dave Mark's book on Behavioural Mathematics

#

called Behavioural Mathematics for Game AI, which basically goes over his version of Utility architecture

#

The reason I prefer utility, is that I find that plans tend to not last very long in gameplay, so having long costly planning steps tends to be redundant.. I guess its game specific though

celest python
#

GOAP feels more "static" to me

#

Its difficult to make a GOAP driven AI react to dynamic events if you have a complex world

shell arrow
#

everyone I've talked to said GOAP was "garbage" more or less

celest python
#

Since also you can not alter action costs that easily as in utility

ocean wren
#

There are some good parts to GOAP type approaches.. expanding potential actions via search etc.. but still doesn't quite get around the "oh shit, someone just shot at me, what now?" problem

shell arrow
#

I've done emergent ai before but it has never turned out well on the design side. they always want "X to happen here when special case Y" and end up scripting it

ocean wren
#

Naah, goap isn't garbage.. I think its fine for certain types of AI and gameplay, I mean plenty of games have used it

shell arrow
#

yeah for combat stuff you need to be way more reactive

celest python
#

Ubisoft still using GOAP

#

For AC

#

even in Valhalla and Odysey

ocean wren
#

Basically, HTN, Goap, BT, Utility are all viable

shell arrow
#

yeah AC is always the example given

#

sorry garbage was hyperbole

ocean wren
shell arrow
#

haha I know that video i think

ocean wren
#

I tend to look for what I think is more important, which is about how to present the decision making editing and debugging to designers

#

it doesn't really matter what the toolset is, as long as people can author quickly and debug quickly right?

#

Behaviour trees in general are good for that.. sadly poorly implemented in UE, so I wouldn't say UE was a good example of BT

shell arrow
#

yes absolutely. i've just found with emergent stuff designers hang themselves alot. however, I will always have an open mind

ocean wren
#

It depends on the game though really

shell arrow
#

yeah it does

#

what problem are you really solving

ocean wren
#

things like how fast paced is it.. do decisions last for a long time (i.e. strategy games) or are the fleeting (fps)

shell arrow
#

for this it does make sense. but i wanted to see if there was a good HTN tool out there maybe someone has used. we found one. might have to try and figure out if we should use it or roll our own

celest python
#

Btw if you are not just researching but also trying to solve which tool is best for you, I think if you give the design goal and purpose of the AI it's easier to get a specific answer

ocean wren
#

Let me see.. pretty sure there was a talk about HTN at GDC too

shell arrow
#

@ocean wren thank you for those videos too I will watch them for sure

celest python
#

AC's usage of GOAP also a slideshow in GDC's website

ocean wren
shell arrow
#

@celest python fair enough. actually i've been lurking around here for a while but never said anything. this is my first question and yall have been so supportive

ocean wren
#

Tommy did a review of it, but I'm sure I've seen the presentation at some point too πŸ™‚

celest python
#

There are many combinations of usage of tools (zoombapup even knows more about those things everything lol), maybe GOAP is not even your best choice

ocean wren
#

I tend to mix utility and behaviour trees a lot..

shell arrow
#

Yeah i've seen the cybertron video i think. I always feel with these types of video of course their going to sell the coolness of emergent ai. it's really sexy. but how was it to develope

#

so for our htn stuff we're doing ambient behaviors. characters walking around a city but doing really interesting things. time of day dependent. i think that's a general enough description to be safe to share

ocean wren
#

The cybertron guys definitely sounded happy with it.. I might have seen the presentation live πŸ™‚ been a while since I went to GDC though so dunno if its just something I've watched

celest python
shell arrow
#

true @celest python

celest python
#

Like at day times people fishing, but night times they do more relaxing things

shell arrow
#

yes but possibly even having a Skyrim like schedule. however i think that has to be severely limited

#

they go from their house to where they work etc

celest python
#

Is the world state changing based on the player progression? For example Helgen gets destroyed in Skyrim, so in a city like that no one would roam around etc.

ocean wren
#

I've always thought that if you're going to do the time of day thing, then really embrace it and build your AI around timelines

shell arrow
#

@eren there will definitely be some world states to respond to

ocean wren
#

where the behaviours are gated by time intervals and you use a design interface that fully gets on board with that

celest python
#

Then I think HTN is a good decision, but you gotta find a way to provide data about the world states I guess

ocean wren
#

To be fair, I mostly do tools dev with UE right now, so maybe thats the slate programmer in me talking πŸ™‚

#

Making custom editors in Unreal Engine is a guilty pleasure

shell arrow
#

the time intervals are what i was thinking in that regard too. like "checkpoints" to just load them in close enough to where they're supposed to be

#

this is really helpful. it's in line with what we've been talking about and honestly I think you're the first people to actually back up the htn stuff

celest python
shell arrow
#

usually when i mention it people have had bad experiences with it or something

ocean wren
#

I think that honestly, any system has potential to work or to have bad experienced

shell arrow
#

this is true

ocean wren
#

I mean I know BT's work well, I've used it a lot in my own codebases.. but I constantly see people here suffering using UE's BT

#

either because they don't understand it conceptually, or because the usability of the implementation is trash.. in fact usually both πŸ™‚

shell arrow
#

i feel like the people who use BTs in unreal, in my xp, speghetti them more than they do with bps

ocean wren
#

But BT's as an approach is REALLY understandable and usable, hence why it was so popular

shell arrow
#

you have to have some sort of paradigm or template to follow. it quickly becomes a mess if not thought out

ocean wren
#

yeah, I think the two parts are that 1) they don't know the mental model to apply and 2) the toolset isn't very good UX

shell arrow
#

yeah i agree

celest python
#

We need pure nodes, getters and inline graphs in BTs cryingisaac also property binding like how FSM plugin in the marketplace does

ocean wren
#

I've been designing BT's for like 20 years though, so I can relate to their pain.

shell arrow
#

i've been wanting to look at the state tree interface

ocean wren
#

Yeah, I suspect that the state tree will quickly overtake the BT as popular tool of choice for novices

shell arrow
#

tie the state trees to child behavior trees? it's been on my mind

#

hybrid FSM behavior tree the unreal way maybe

ocean wren
#

A good BT system should have far better parallel node handling to be honest.. we don't really have that in UE's implementation and it hurts

celest python
#

It was a bit painful to do though

shell arrow
#

yeah i tried to do something similar (not with the state tree) and it was painful

celest python
#

FSM to BT works more smooth But its rarely desired compared to BT to FSM

ocean wren
#

State tree is HFSM, which you know, is another usable option. Valve used it for a while.

#

The problem with all of these approaches, is that boolean conditions are hard to design for

#

i.e. trying to think about all the different edge cases.. "I can do X, but only when Y and Z are in state V" is just fundamentally hard work πŸ™‚

shell arrow
#

yeah it's always the edge cases

ocean wren
#

Perhaps the biggest challenge for game AI

shell arrow
#

for sure

#

and i think that's a bigger problem for emergent from what little i did

ocean wren
#

is how to deal with what are not clear boolean conditions

shell arrow
#

at least in something discreate it's easier to hack it in at the end

ocean wren
#

yeah, I tended to use utility for some of the fuzziness in decisions, but I'd probably used RL/ML these days

#

But then, the challenge there is the explainability/debugging issue

shell arrow
#

ml is way beyond my scope. but i know there's a good hum about it in the industry for ai

ocean wren
#

Yeah, its over hyped.. but has its uses

#

especially for tools

shell arrow
#

i mean, what isn't over hyped? not being cynical, more that it might not be where they make it out to be now, but it'll get there

ocean wren
#

Honestly, I think these days, having hybrid systems is probably wise.. different architectures for different types of decisions..

shell arrow
#

i agree

ocean wren
#

Well, ML has the problem of over promising and under delivering a lot.. plus its wicked hard to explain πŸ™‚

shell arrow
#

better than crypto

ocean wren
#

basically "numbers go up and down" πŸ™‚

shell arrow
#

thank you all so much again. i'm going to pay more attention and hopefully actually contribute back πŸ™‚

ocean wren
#

I'm currently writing a paper on a UE recommender system for automated cinematography for FGD2022

#

using graph neural networks

#

Which I find pretty interesting as an approach

#

will be applying the same method to behaviour tree recommender system in due course

#

So my bet is on ML/RL basically sidestepping the issue of being able to design things like BT's in the medium term.. having a ML model do it for us

shell arrow
#

oh wow! interesting

ocean wren
#

recommender systems being used out in the wild already.. for loads of websites, based on GNN's

#

I'm keen on getting some RL going with Unreal Engine too.. but thats a longer term project, probably for a masters student

#

Frightening how AI is just.. ignored in games though

#

considering the rest of the tech sector is all over it like a rash

celest python
#

Maybe because lack of professionals existence of ignorant people in the industry

ocean wren
#

I was in a meeting with the CEO of a large UK game dev about.. a year back? and I asked him about his thoughts on ML and he basically said that he wasn't interested in it and didn't think it would be useful πŸ™‚

#

I mean FFS, the thing that's literally disrupting dozens of creative sector industries and this guy doesn't even think it has ANY value?

#

totally goddam clueless

celest python
#

My 2nd guess would be people dont know the value of it

ocean wren
#

Well, I guess in his defence, there aren't enough strong examples of it being valuable

#

i.e. there aren't clear "heres why you should care" moments

#

its the old Lotus 1-2-3 problem.. people don't know they need it, until everyone needs it πŸ™‚

#

BUT

#

I would point to companies like Embark Studios... they really do "get it"

celest python
#

A valid way to convince them is proving how ML could save from budget

#

Otherwise from their perspective is its just a cool tech

ocean wren
#

Yeah, I'm working on PCG tools for UE that show the value of ML adoption for production tasks.. things like cinematography, behaviour generation, scene generation etc

celest python
#

I think demonstrations also important btw

ocean wren
#

I've got loads of ideas for works in this area.. but not enough hours in the day πŸ™‚

#

Yeah, I'm just going to make plugins and sell them πŸ˜‰

#

ML (and cloud usually) powered plugins

celest python
ocean wren
#

hahaha.. sadly this is kind of on the edge of students capability

#

a really good masters by research student could do it

#

and a good phd student too

main heart
#

lul

ocean wren
#

But those don't tend to get funding in the UK at least

main heart
#

What an explicit description

ocean wren
#

in fact, games and creative ML stuff tends to not get funding

main heart
#

yeah there is a branch where Miezko is working on ML

ocean wren
#

because its that weird mix of technology and creativity, so neither the technology research funders not the arts research funders like it πŸ™‚

main heart
#

it is decaying like hell

#

ML is supposed to learn from large numbers

ocean wren
#

I'm hopeful that will maybe change now that Mieszko has Mikko helping out

main heart
#

Humans dont have that kind of patience

ocean wren
#

oh right, yeah, I get you.. yeah that ML thing isn't good πŸ™‚

#

My stuff tends to learn from other media.. so films mostly

main heart
#

Lel I liked my own post

celest python
#

I would appreciate a ML that can do lighting for me, and maybe even can determine locations for fog sheets

main heart
#

That be the dream

celest python
#

Who needs lighting artists anyway

ocean wren
#

Lighting can definitely be done via ML

celest python
#

They try to learn tons of technical stuff to just make a night scene

#

That's why ML should exist

main heart
#

Well Susy should exist too

celest python
#

To replace technical stuff and leave the art and aesthetics to humans

main heart
#

but I digress

ocean wren
#

I've got a design in progress for an ML plugin that can co-create arbitrary scenes.. you basically give it a picture and it generates the scene from the image automatically

main heart
#

yeah

ocean wren
#

Because a visual scene can be learnt in the form of a graph.. and we can learn on graphs and generate them

main heart
#

what kind of graph

celest python
main heart
#

you mean some relevant data in structured form

ocean wren
#

But the fun part, is that graphs can be transformed in lots of funky ways.. things like "generate me this indoor scene, but make the setting a victorian manor"

main heart
#

I knew it

celest python
main heart
#

no wonder that twist

#

I just thought it be evolutionary crap

ocean wren
#

Eren: yeah, we can derive all sorts of features.. you can predict from a single image stuff like depth and object location/rotation

main heart
#

and now I am invisible

ocean wren
#

evolutionary?

main heart
#

yeah the "funky transformations"

#

what is that

ocean wren
#

Well, for instance, you might have attibutes of a wall as having a certain type of texture.. so if you wanted variations you could search for similar scenes with different wall texture properties

main heart
#

aha

#

and what structure the information gets stored in?

ocean wren
#

the node properties of a wall might have all sorts of node features.. we can learn a huge amount of different features and generate them etc

celest python
#

@ocean wren you are making me hyped for the future πŸ˜‚

ocean wren
#

a big graph

main heart
#

gg

ocean wren
#

basically, its all stored as a graph of nodes and edges

#

let me find you a nice website.. one sec

celest python
#

So thats why you are teaching your students Houdini and PCG Evil_Patrick

main heart
#

is that a hierarchical graph or non hierarchal graph

ocean wren
main heart
#

me like

ocean wren
#

So basically.. you encode whatever the hell you like as graphs.. I encode movie scenes as spatio-temporal graphs for instance, extracting them into an abstract domain specific language called PROSE

main heart
#

"Learning" is goood

#

Question: can a graph A LEARN from graph B?

ocean wren
#

and then we predict graph similarity say.. so my current paper is about a recommender system where you place objects in a scene and it predicts the cinematography as a graph completion step

main heart
#

Wooooow

#

Artists be having orgasms

ocean wren
#

i.e. I place character A and add edge attribute "angry at" and the ML model completes a set of graph proposals as recommendations.. one of those might be to add another character for the A character to be angry at, another might be a teacup being spilled

#

the idea of it being like.. I'm using the analogy of predictive text but for cinematography πŸ™‚

main heart
#

wow you have basis to serialize the emotions?!

ocean wren
#

The thing of it is, that this stuff already is being used out there.. you go on google maps and try looking at a route.. it does this

#

Well, the emotion stuff is just an edge attribute.. edges are relationships in graph terms

#

so characters A and B might be nodes, with edge "hates" between A and B for instance

main heart
#

yeah I understand

#

I guess that be directional?

ocean wren
#

Yeah, edges can be directed or undirected, depending on how you want them

main heart
#

If I can revert the direction "hates" -> "love"

ocean wren
#

you can have bi-directional by just adding two directed edges

main heart
#

hehe

ocean wren
#

The point is, you just need a huge old set of graphs as example right? then learn those embeddings..

#

so I extract those graphs from movies

main heart
#

gg

ocean wren
#

and I learn on those

#

and then.. cinematography πŸ™‚

#

course its never quite that simple πŸ™‚

#

But this concept of recommender systems for videogame PCG is my current paper πŸ™‚

ocean wren
#

hahaha..

main heart
#

all the best with the paper

ocean wren
#

Thanks, I'll post it here if it gets accepted, we are required to now

#

i.e. making it public in our university repo

main heart
#

yeah

#

Looking for that

ocean wren
#

otherwise I'll submit a follow on to AIIDE and share that if it gets accepted

main heart
#

Sure if you can connect to "first principles", it should

ocean wren
#

Depends on who reviews it usually

main heart
#

yeah unfortunately it is out of my expertize

#

My sister on the other hand is AI scientist

ocean wren
#

I review for a bunch of different confs and journals and the quality of responses is kind of mixed.. I try and be positive and give constructive feedback.. but a lot of egotists in academia unfortunately

main heart
#

hehe, the flip side of academia

ocean wren
#

So you have a panel of reviewers, get a good panel and you're golden.. get an egotist and your screwed πŸ™‚

main heart
#

yeah I see that bruh

#

Feynman's diagrams were first rejected as "bs"

ocean wren
#

Some researchers did a study by submitting a bunch of papers to CVPR I think it was.. they submitted to two sets of reviewers the same papers.. the accepted papers only overlapped between the two review groups in like 30%, so they both accepted and rejected different things πŸ™‚

celest python
ocean wren
#

Not really, I think there might be places you can do that.. but its rare in the UK

#

major/minor thing like the US?

celest python
#

I guess so, yeah

ocean wren
#

We tend to only study one thing

celest python
#

I was not aiming for England but if it would be possible, I'd try to study both aerospace and whatever if your area is in the future as minor

main heart
#

hmm, try focusing on the principles of AI

#

everything else is secondary

ocean wren
#

any particular part of aerospace?

main heart
#

I'd rather pull back the models

celest python
main heart
#

and try to ponder over the faliure of AI advancement

ocean wren
#

I tend to teach across games and computer science myself.. but my passion is games

main heart
#

My friend said, computer science has done no major advancement since Turing

ocean wren
#

hahaha.. yeah, that doesn't really work though does it

main heart
#

and I conform to that

ocean wren
#

transistors?

main heart
#

well there are some inconsistencies in the algorithms

#

Curch-Turing thesis

ocean wren
#

like you couldn't make modern CPU's without computer science

#

or.. things like weather simulations

#

or neural networks

main heart
#

what be another revolutionary paper since then

ocean wren
#

I mean, you couldn't have had the large hadron collider without computer science

main heart
#

yeah you could argue, but still I personally have theorem based mindset

#

LHC computations be like Chemistry

#

in front of Physics πŸ™‚

celest python
#

I think its equal to what I'm looking for

ocean wren
#

Yeah, thats the type of thing you want

#

major/minor kind of deal

main heart
#

so many exceptions

#

and no unified rule

#

no wonder they get pissed whilst learning chemistry

ocean wren
#

Well, there's still plenty of things we don't know..

#

particle wave duality is my favourite πŸ™‚

main heart
#

Well we know Godels incompleteness theorems

#

can't you build something from there

ocean wren
#

the slit experiment etc

main heart
#

well Church-Turing tried to address that

ocean wren
#

I'd rather just build machines that go "ping" πŸ™‚

main heart
#

algorithms dear Watson, algorithms

ocean wren
#

I'm more an empiricist than a theoretician

main heart
#

Let me demonstrate

ocean wren
#

although a unifying theory of aesthetics is interesting to me

main heart
#

there is an algorithm which boosts quadartic speedup in unstructured database searching

#

using the power of quantum mechanics

celest python
main heart
#

and it is redundant apparently

ocean wren
#

Yeah, which is weird given we're surrounded by airfields and the UK airforce πŸ™‚

ocean wren
main heart
#

I'd rather focus on tenet of AI

#

yeah, qbits are restricted in practise

#

8qbit

#

lul

ocean wren
#

I occasionally hear about quantum computing.. but I've never seen anything practical come from it

main heart
#

good

ocean wren
#

Hopefully at some point it goes from theoretical to practical.. then I'll pay attention

#

Certainly gets funding though

#

which pisses me off

main heart
#

yeah just like particles travelling back in time!

#

you dont see them

ocean wren
#

The only thing we get funding for is goddam fruit picking robots πŸ™‚

main heart
#

yeah, I remember in my undergrad I made hovercraft

#

but some jerks made usual line follower

#

and they won

#

the cant tolerate innovations

ocean wren
#

A few colleagues are making a play to get into some drone related cloud stuff

#

which is hot right now funding wise

ocean wren
#

Drones kind of live in the same area as robots in terms of funding.. so its probably not a bad play if you want $$

main heart
#

well then you are ignoring the better half

#

again!

ocean wren
#

Our spin is AI enabled drones via cloud πŸ™‚

main heart
#

hmm

ocean wren
#

because edge based AI is also getting funding πŸ™‚

main heart
#

go on

ocean wren
#

so basically, AI, drone, cloud all get funding πŸ™‚ so smush them together into a proposal

main heart
#

well we have Hulk

ocean wren
#

I envision our drones being more like flying robots though

#

i.e. having a bit more AI than the usual flying thing

main heart
#

yeah air manoeuvre needs more care!

ocean wren
#

Well, these drones are for stuff like forestry and agriculture.. spotting disease and the like you know?

main heart
#

yeah

#

the pathology

ocean wren
#

anyway.. got to get back to bed.. need some sleep πŸ™‚

main heart
#

nn

ocean wren
#

talk to you all later

night panther
#

Anybody in here know perception system

#

and how you set an actor as Hostile Actor

#

no real config in the Team Sense

#

Need similar actors to check if they are on the same team and exploring methods

night panther
#

nvm I found it ❀️

real arrow
#

aye, I also work in embedded ai

real arrow
#

I hope somebody eventually makes some tutorial for the mass AI system that's in CitySample, that would be really nice

main heart
#

hey prof

#

I think crowd AI is in UE's todo list?!

#

Not completely sure though

#

yeah search for the term in this channel an you may get glimpses

real arrow
#

oh, I thought they already implemented it

#

I saw a bunch of classes in the ue5 editor, but I'm not sure how much of that is functional as I have not tried anything yet

wary ivy
#

so has anyone tried to get a crowd system going with the new mass stuff?

wary ivy
#

also what happens to the navmesh actor now? πŸ€”

#

it looks like mass stuff uses zonegraph instead

#

does the editor come with tools to automatically generate a zonegraph for any kind of terrain?

misty wharf
#

welcome to #gameplay-ai where nobody has any answers for your ue5 questions alex

main heart
#

Yeah looking forward to more Insights!

#

I mean inside Unreal videos. With the good 'ol gang

wary ivy
misty wharf
#

I think zoombapup is the only one I've seen talk about any of the new features here :P

main heart
#

:meizko:

wary ivy
last helm
#

How can I bind ReceiveMoveCompleted to a function in cpp?

misty wharf
#

using AddDynamic?

#

or AddUObject if it's not a dynamic delegate

main heart
#

I believe Tom Looman has Udemy lecture on binding delegates

#

Lecture 78

#

Handle Damage

ocean wren
#

I'll probably take a look at the MassAI system in a livestream over the weekend

#

Once I've submitted this paper I should have time to take a look

desert dagger
#

Is it somehow possible to convert navmesh bounds volume into Navigation data reference?

lone stump
#

Nav bounds don't have nav data, they're just used to generate it. I don't think there's blueprint function to get it, but there are multiple ways in c++, look in NavigationSystem and search for GetNavData.

crystal sequoia
#

Hey, I'm using a floating pawn movement component but my pawn won't rotate to face the direction it's going - any suggestions?

shell arrow
shell arrow
crystal sequoia
shell arrow
#

so many settings it blends in really well

#

should note the comments on it though

#

that's not the only way to do such a thing

crystal sequoia
#

Thanks! It looks like this is for character movement? I'm using floating pawn movement at the moment

acoustic apex
shell arrow
#

@crystal sequoia oh my bad

#

I think you might just have to roll your own solution. Add some rotation towards the current velocity to make it smooth

wary ivy
shell arrow
#

you probably want to use zone graph for crowd like actors or travelling over large distances to keep em cheap. I'll bet mass entities are tied into it but I would imagine ideally you could still generate and follow nav mesh paths. i could be wrong

#

i also think zone graph is good for defining streets and sidewalks which is a bit trickier with nav mesh. i haven't dug into it much but this is what i've gathered so far

wary ivy
#

yea but what if I have a environment like... a forest?

#

zone graph doesn't seem useful for that

peak escarp
#

hey how do I open the ai debbuger ? when i press the " ' " key it works but I can't see the ai perception debug

misty wharf
#

press one of the numeric keys it lists

#

it should say 1 AI or whatever so you press 1 to turn that part on

celest python
harsh storm
#

Been tinkering with StateTree. Kind of neat. Still tryin' to figure out how some pieces work though. Overall, my impression is that it is quite similar to a BT.

#

Looks like it just high jacks the BT AI debugger too

#

Doesn't seem like it actually works though. Womp womp

misty wharf
#

πŸ€”

harsh storm
#

The debugger

misty wharf
#

So it's another brain component then

harsh storm
#

Yeah

misty wharf
#

Only had the BT Brain in 4 so I was wondering if there was something else for it lol

harsh storm
#

And if you don't select this schema - it won't show up in the dropdown for the component.

night panther
#

Anybody know how to set Team attitudes

#

for the team detection I have set generic team Ids

#

I dont even need to set it I just need to know what is considered hostile to eachother by default

#

I know 255 is neutral

misty wharf
#

It doesn't have anything by default

#

You have to override it yourself

night panther
#

Okay I found these nodes

#

Which arent mentioned in any tutorials

misty wharf
#

I don't think it's possible in BP's

night panther
#

thats what ive heard but these are available there must be away

misty wharf
#

Just because they're available doesn't really make it so sadly :)

#

you would need to implement IGenericTeamAgentInterface because that's what the perception system uses

night panther
#

yeah did that already

misty wharf
#

and/or set an FAttitudeSolverFunction into the team id system

#

iirc if you implement that interface and override GetTeamAttitudeTowards you can just use that to detect who's hostile

#

but setting the FAttitudeSolverFunction may make it simpler depending on how you're setting it up

night panther
#

im just not sure where I set the attitude solver. In the player controller cpp?

#

I dont see that override after I add the interface

misty wharf
#

It might work if you set the solver in your module's startup, if not setting it in a world subsystem definitely works

#

the override is not going to show up in BP's, the interface is C++ only so you'll need to override it there

night panther
#

I think ill just dicth the team interface from the perception and use tags

#

can just check for tags on sight perception

#

no?

misty wharf
#

Sure

#

The only downside of not using it is you can't filter out who you want to perceive

night panther
#

right which would help with performance

misty wharf
#

Yeah

#

since everything will attempt to perceive everything, instead of say just the player

#

which means quite a few more linetraces

night panther
#

well is no player

#

it will be AI vs AI

#

player is just a view

harsh storm
#

So, the StateTree definitely crashes my engine quite often 🀣. Main thing I haven't really been able to figure out is to pass data around in tasks. Figured it out with Evaluators.

misty wharf
#

I guess they're not using it in Fortnite alex

night panther
#

like state machines are crashing you?

#

or whatever I always call them wrong lol

harsh storm
#

Overall though - I still think using the BT will be quicker for newbies. There can be quite a lot of setup involved with StateTrees imo.

night panther
#

o its some new thing

harsh storm
#

And explaining the processing sequence for BT's is easier than ST's imo.

misty wharf
#

Yeah StateTree is a new UE5 thing

night panther
#

interesting

#

You know how to set up the team attitudes ?

#

zomg

misty wharf
#

Yeah

night panther
#

how much you charge me to walk me through it

misty wharf
#

uhh

#

I mean I don't remember it all off the top of my head tbh lol

night panther
#

ok fair

misty wharf
#

let me see what I have it for in my project...

#

it's not complicated

#
void UBillysTeamSystem::Initialize(FSubsystemCollectionBase& Collection)
{
    Super::Initialize(Collection);
    
    FGenericTeamId::SetAttitudeSolver(&UBillysTeamSystem::GetAttitude);
}

ETeamAttitude::Type UBillysTeamSystem::GetAttitude(FGenericTeamId Of, FGenericTeamId To)
{
    if(Of.GetId() == static_cast<uint8>(EBillysTeamId::IrvingForce) || To.GetId() == static_cast<uint8>(EBillysTeamId::IrvingForce))
    {
        return ETeamAttitude::Hostile;
    }

    return ETeamAttitude::Neutral;
}
#

I have a GameInstanceSubsystem like this

#

this is the attitude solver function part

#
FGenericTeamId ABillysCharacterBase::GetGenericTeamId() const
{
    return static_cast<uint8>(EBillysTeamId::IrvingForce);
}