Training Stream - Making Game Ready AI, Part 5 - Dec 1st, 2015

WHAT
In this multi-part series, and show you how to use all of the relevant systems and features (Behavior Trees, EQS, Navigation Meshes, AnimBlueprints, AnimMontages, and more) to design, create, and optimize AI for use in a game environment with all of the requirements and restrictions that go along with that.

In Part 5, and are joined by Sr AI Programmer Zielinski, so we can get another set of eyes on what we’re doing and talk about using AI Perception for our little guys to find things.

Part 4

WHEN
Tuesday, Dec 1st @ 2:00PM-3:00PM ET - Countdown

WHERE
www.twitch.tv/unrealengine

WHO

Feel free to ask any questions on the topic in the thread below, and remember, while we try to give attention to all inquiries, it’s not always possible to answer’s questions as they come up. This is especially true for off-topic requests, as it’s rather likely that we don’t have the appropriate person around to answer. Thanks for understanding!

's meshes (Apple, Tree, Log, Hut)

's reading recommendations: AI Wisdom, Game Programming Gems, Game AI Pro

Archive here:

I just re-watched the part 4 on YouTube (I missed the first half at the life-stream). Is there a reason why you are not using the behavior trees specially made for the certain stats? In part 3 we implemented this clever system in where the behavior tree called the smaller tree’s depending on which stat we needed? Is this obsolete?

I think your theory, at the beginning of part 4, that the project didn’t save was false. It was the same as mine at home and in your effort to fix it, you reverted the project back. I thought you should know.

Hey, thanks for the heads up on about the reverting.

Yeah, we’re still going to use the sub-behavior-tree method, but it’s not complex enough quite yet to use it.

I was wondering how do you execute an AnimMontage in a State Machine. Its a little confusing. Thanks, love the stream. Always learning…

Questions on the perception system!

  • In Sight and Hearing config, there’s that “Detection by affiliation” property. How do you set a given Actor (or Pawn) to be enemy/neutral/friendly to this AIController?

  • Is anything implemented yet on these senses configs: Prediction, Team Sense, and Touch? How to use them?

  • If time allows, can you give an example on how to create a custom AI sense? For example, one that senses “feelings”, and can receive either “love” or “hate” as stimuli.

Does this series cover AI teams, and how to get the AI to recognise which team it is on/who to kill? if not any ideas how to implement it?

We did talk about how AI recognize “Friend” and “Enemy” via the perception system in this one. It’s something is working to improve right now as well.

I LOVE THESE! One of the best series you have ever been released!

By the way, is there a you guys do a same kind of thing [good, complete, well explained, high leveled…] tutorial series on Game Setup, Game Mode, Game State, Building, Setting, and post-prototyping a game? It would be awesome. I’m really enjoying these!

Hey All,

As talked about on the stream there are a number of books available for learning about game AI programming. Even if you are using Blueprints for most everything, there’s definite value in knowing the patterns and math behind the systems you see in other games. As I’m not a huge fan of re-inventing the wheel, I’ll definitely be picking some of these up myself.

Game AI Pro - wrote a chapter in this one covering the previous incarnation of EQS used in Bullet Storm

Game AI Pro 2

AI Game Programming Wisdom

AI Game Programming Wisdom 2

AI Game Programming Wisdom 3

AI Game Programming Wisdom 4 - The expensive one, Out of print/RareGame Programming Gems - While not specifically focused on AI, mentioned there’s some good AI stuff in some of these. Amazon seems to have 8 volumes.

Game AI and game ai pro 2, guess better look at 2? aaa the others are the same xD… numbers xD… gueses the same, latest is the best?

All the books bridge a chunk of time, the first Game Programming Gems is from 2000 and the last published of those listed is Game AI Pro 2 in 2015. However, the math and logic behind how much of AI doesn’t really change much, so even older books in this list are useful. Honestly? Check your local libraries, probably can check them out for free! =)

As for the numbered series, Game AI Pro and Game AI Pro 2 for example, they are not revisions, more like how there was Mastering Unreal 1 and 2 (the red and blue books): Same general topic, just different specific areas.

On other countries not USA, it is hard to find specialized books on public libraries, more if they are only in English, but thanks for the sugesstion, I already have a pile of books to read xD…

And thanks on the clarifications of those numbers :)… thought they where editions only.

How much of a help are they, when put through the filter of Unreal Engine? I had a look at these books previously, but didn’t buy because of a combination of a) cost and b) I wasn’t sure if they were going to be about a level of programming that was unnecessary to a UE dev (e.g. talking about adding line traces to your engine, for example).

So I’m trying to create a custom generator like you are for my game except the work-around you use to get the AI character will only work for a single AI character. How would I go about this if I have multiple AI on the map? I know put exposing the “owner” on his todo list, and hopefully he’s able to get it implemented for 4.11 but in the mean time, there has got to be some way to know who is calling the query? Any work-around for multiple AI characters/controllers??

Thanks guys!

jtsmith - I don’t have the project in front of me, but I think the fix we did was to do a range based calculation given the location of the context given (the AI Character) and every AI Character, finding the closest one. This should work even with more than one AI Character. I’ll double check this in a bit.

Jezcentral - I’m just scratching the surface of the Game AI Pro book, and yes, it’s solid. 1st chapter covers how neurons work and how that enables you to create more believable reactions from your AI like on average humans have a 0.2 second reaction time, or 6 frames at 30 fps, which then frees you up to distribute calculations for your AI over many frames and still have it feel good.

Personally, I like to read, and I find the information they contain to be quite valuable.

I have a related question…

What’s the best practice for using AI behavior trees in coordination with Animation blueprints?

For example, let’s say I have a monster who performs a grab attack. If the grab attack collides with an actor, I want to continue with the animation. If the grab attack fails to grab a character, I want to abort the animation and the AI behavior should try to do something else (such as moving closer or trying again). Currently, I’m using an anim notify event in the animation blueprint. When its triggered, the animation blueprint calls a method within the creature blueprint, such as “bool TryGrab()” which returns either true or false. If the grab succeeds, the animation proceeds. If it fails, it has to inform the Behavior tree by setting a behavior tree value to “aborted”. Otherwise, the behavior tree task is continuously waiting for the animation blueprint to set a blackboard key to “animation complete”, so that it can report “End Execute - Success” and move on to the next task.

One of the problems I’m finding with this setup is that this is very dependent on the animation blueprint to actually fire its anim notify events. For some unknown reason, in some cases, the anim notify events don’t get triggered. This causes the behavior tree to not get the “all good!” signal and it just continuously polls a task, waiting for it to complete when it never will.

I’ve tried to look at other content examples, but none seem to have a deeply complicated animation blueprint system or AI system for me to learn from. Am I doing all of this the wrong way?

The Game AI Pro book is free if you go to www.gameaipro.com. It is worth it! :wink:

I bought the Game AI Pro 2 too, but I can’t seem to find the downloads for it at all. They are not on the website like the books says it should be.

Late and stupid question but how do you import de the FBX(s) so that it keeps/add it’s mats like in the video?

Hey, [MENTION=8] [/MENTION]
Is it possible to add subtitle like Part 4 ?
Too many discussion between and