Book Image

Hands-On Artificial Intelligence with Unreal Engine

By : Francesco Sapio
5 (1)
Book Image

Hands-On Artificial Intelligence with Unreal Engine

5 (1)
By: Francesco Sapio

Overview of this book

Learning how to apply artificial intelligence ( AI ) is crucial and can take the fun factor to the next level, whether you're developing a traditional, educational, or any other kind of game. If you want to use AI to extend the life of your games and make them challenging and more interesting, this book is for you. The book starts by breaking down AI into simple concepts to get a fundamental understanding of it. Using a variety of examples, you will work through actual implementations designed to highlight key concepts and features related to game AI in UE4. You will learn to work through the built-in AI framework in order to build believable characters for every game genre (including RPG, Strategic, Platform, FPS, Simulation, Arcade, and Educational). You will learn to configure the Navigation, Environmental Querying, and Perception systems for your AI agents and couple these with Behavior Trees, all accompanied with practical examples. You will also explore how the engine handles dynamic crowds. In the concluding chapters, you will learn how to profile, visualize, and debug your AI systems to correct the AI logic and increase performance. By the end of the book, your AI knowledge of the built-in AI system in Unreal will be deep and comprehensive, allowing you to build powerful AI agents within your projects.
Table of Contents (19 chapters)
Free Chapter
1
Section 1: The Unreal Framework
9
Section 2: Designing and Implementing Behavior Trees
13
Section 3: Debugging Methods
14
Debugging Methods for AI - Logging

What this book covers

Chapter 1, Moving the First Steps in The AI World, explores the prerequisites to becoming an AI game developer and how AI is used in the game development pipeline.

Chapter 2, Behavior Trees and Blackboards, introduces you to two principal structures used within the Unreal AI framework, which are used to control most AI agents in games. You will learn how to create a Behavior Tree and how these can store data within Blackboards.

Chapter 3, Navigation, teaches you how an agent can navigate or find a path through a map or the environment.

Chapter 4, Environment Query System, helps you get to grips with making an Environmental Query, which is a subsystem of the Unreal AI Framework for spatial reasoning. Mastering them is key in implementing believable behaviors within Unreal.

Chapter 5, Agent Awareness, deals with how an AI agent can sense the world and the surrounding environment. These include sight, sound, and potentially any sense you might imagine (by extending the system).

Chapter 6, Extending Behavior Trees, takes you through the task of extending behavior trees with Unreal by using Blueprint or C++. You will learn how to program new Tasks, Decorators, and Services.

Chapter 7, Crowds, explains how to handle crowds within the Unreal AI Framework that offer some functionality.

Chapter 8, Designing Behavior Trees – Part I, focuses on how to implement a Behavior Tree so that the AI agent can chase our player in the game (both in Blueprint and C++). This chapter, along with the next two, explores this example from designing to implementation.

Chapter 9, Designing Behavior Trees – Part II, is a continuation of the previous chapter. In particular, we will build the last missing piece of the puzzle (a custom Service) before we build our final Behavior Tree in the next chapter.

Chapter 10, Designing Behavior Trees – Part III, is a continuation of the previous chapter and is the final part of Designing Behavior Trees. We will finish what we started. In particular, we will build the final Behavior Tree and make it run.

Chapter 11, Debugging Methods for AI – Logging, examines a series of methods that we can use to debug our AI systems, including console logging, on-screen messages in Blueprint, and many more. By mastering the art of logging, you will be able to easily keep track of your values and which part of the code you are executing.

Chapter 12, Debugging Methods for AI – Navigation, EQS, and Profiling, explores a number of more specific tools for the AI systems that are incorporated within Unreal Engine. We will see some more tools for analyzing performance related to AI code, as well as tools to visualize Environmental Queries and the Navigation Mesh.

Chapter 13, Debugging Methods for AI – the Gameplay Debugger, gets you to explore the most powerful debugging tool and the best friend of any Unreal AI developer—Gameplay Debugger. This chapter will take you even a step further, by teaching how to extend this tool so to customize it to your needs.

Chapter 14, Going Beyond, concludes with some suggestions on how to explore the concepts presented (and others) beyond this book and some thoughts regarding AI.