Whats the right programming pattern for this job? - Simple Animal AI

Suppose you have animal AI that is following rules like this:

  • Based on a timer, move from one location to another.

  • At all times, there will be perception checks for player pawn, and at random intervals the perception may increase/decrease (i.e. animal stops, raises head, then perception radius is increased).

We might also have several states, which may be transitioned to from player detection, and/or timers:

  • Flee
  • Alerted
  • Normal

For simple AI like this, is it worth the trouble to dive into the blackboard system? It seems like I can do it all just with some enumerators. Then again, that may not be as easy to visualize compared to if I used a tool like Logic Driver Pro.

Then again, I don’t know if a system like this warrants a 200+ dollar purchase either.

Just curious what your thoughts might be on something like this - how might you approach it to make a system that is easy to interact with, debug, but doesn’t require a month to setup either.

Some additional info may be pertinent:

  • Multiple animal types? Yes, but only parameters change - no distinct behaviors per type.

Hi there, I would use a blackboard/behavior tree. Actually, there is a tutorial from Epic Games with a sample project for download that seems to be exactly the way you outlined. You can find it in UE’s YouTube channel. I’ll see if I can find the link and share it here. If I am not wrong, the title is ‘state of mind: AI’ or something similar.

2 Likes

AI: State of Mind | Live from HQ | Inside Unreal - YouTube

this it?

looks like it. Only thing is cant find the project. That is okay though, probably can get all the ideas i need from video

1 Like

That’s it.
Here is the link for the complete project.
https://epicgames.ent.box.com/v/AIProjectComplete

2 Likes

awesome, thanks so much!

Where did you find the project at? Just curious because I also found teh video from Unreal Learn , but still cant find the actual project.

1 Like

Usually, you can find project links inside the a announcement posts. Wes is my favorite instructor.
Good luck in your projects.

2 Likes

ah, i found it. Great to know. Thanks again

1 Like