Chapter 7. Artificial Intelligence

This chapter takes a highly practical and specialized focus. Here, we'll cover the development of a single Unity project from start to finish in creating a maze scene that features enemy characters with Artificial Intelligence (AI); these characters have the ability to search for and chase us, attack us, and also flee from us while looking for health-restore potions. The following screenshot shows the maze scene in Unity:

Artificial Intelligence

The maze scene


The AI project for this book can be found in the book's companion files (code bundle) in the ai folder of this chapter.

In creating this project, we'll apply nearly all the concepts ...

Get Mastering Unity Scripting now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.