AI overview step by step

Hello you all !

I created this topic because as a beginner with game engines, I have troubles to get a clear Overview of the logic, process and ways to create AI depending of the needs.
Internet is full of really well made tutorials but it can be really challenging to correlate them like “Should I use Pawn sensing or Ai perception”.
I am not so much looking for extremely specific and technical answers. I’d rather understand the overall logic to know what I should look for, to use the best of the plethora of tutorials already online !

Enough introducing, more concrete !

So I am trying to create a fairly simple AI :
In a pretty large environment, I have different kinds of animals (for instance, birds and rodents).
I want theme to live their life roaming around, and interact with the human player.

To start simple :

Let’s talk about the rodent :
-He from random position to random position within his territory.
-As soon as the player enters his field of view, he runs to the opposite direction to a safe place (let say x meters away) then goes back to his roaming.

rat.jpg

Here is an “on purpose” naive Behavior Tree to illustrate my wishes :

(This is a first basic iteration of what I have in mind, but will increment)

I am making my own assets using Maya.

For this step, I have :
-A Third Person controllable Character made out of a Character Blue Print filled with a,
-skeletal Mesh and an,
-Animation Blue Print (Anim Instance) running a,
-“Locomotion” State Machine filled with an,
-Idle/Walk/Run Blend Space
-The Rodent Skeletal Mesh and two animations, Idle and Walking.

I’ve been trying multiple tutorials but lets pretend I haven’t and start with only the febrile knowledge I acquired of Unreal’s logic, Functions, Get/Set etc…

My first question would be :
Pawn Sensing or Ai Perception ? what are the pros and cons ?

Thanks :slight_smile:

GhostInTheCommu I really identify myself with what you’ve written. It seems that almost every tutorial on the internet have the wrong pace for beginners or not programmers. And this makes the learning process so painful and complicated when it really shouldn’t be.

It is not an easy task to master all of the aspects of a game engine starting from the ground ! The worst part for me is spending so much time learning and searching that proportionally, I don’t spend much time producing actual things for my project … Even though I spend Hours working on it, It doesn’t feel like it’s progressing much.
But we all have to start somewhere, I guess all we can do is to keep climbing the mountains of information !

To reply to my own question,
If I’m not mistaken, AI Perception is the new standard replacing Pawn Sensing.
It is a component you create inside your AIController, that is gonna interact with a Stimuly source created as a component inside an actor.
You can load the stimuly source with multiple predefined sources for the senses, such as Sight, Hearing, Touch and so on.

Tell me if I’m mistaken !