Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity Artificial Intelligence Programming

You're reading from   Unity Artificial Intelligence Programming Add powerful, believable, and fun AI entities in your game with the power of Unity

Arrow left icon
Product type Paperback
Published in Mar 2022
Publisher Packt
ISBN-13 9781803238531
Length 308 pages
Edition 5th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dr. Davide Aversa Dr. Davide Aversa
Author Profile Icon Dr. Davide Aversa
Dr. Davide Aversa
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part 1:Basic AI
2. Chapter 1: Introduction to AI FREE CHAPTER 3. Chapter 2: Finite State Machines 4. Chapter 3: Randomness and Probability 5. Chapter 4: Implementing Sensors 6. Part 2:Movement and Navigation
7. Chapter 5: Flocking 8. Chapter 6: Path Following and Steering Behaviors 9. Chapter 7: A* Pathfinding 10. Chapter 8: Navigation Mesh 11. Part 3:Advanced AI
12. Chapter 9: Behavior Trees 13. Chapter 10: Procedural Content Generation 14. Chapter 11: Machine Learning in Unity 15. Chapter 12: Putting It All Together 16. Other Books You May Enjoy

Understanding AI

Intelligence is a natural and necessary aspect of life for all living organisms, such as animals and humans. Without intelligence – mentioned in the broadest way possible here – animals would not be able to look for food, bees would not be able to find flowers, and we humans would have never been able to craft objects or light fires, let alone develop games in Unity! On the contrary, computers are just electronic devices that can accept data, perform logical and mathematical operations at high speeds, and output the results. They lack any kind of intelligence. Computers would stay still and lifeless forever like rocks without someone telling them what to do and how to do it.

From this point of view, AI is essentially the field that studies how to give machines the spark of natural intelligence. It's a discipline that teaches computers how to think and decide like living organisms to achieve any goal without human intervention.

As you can imagine, this is a vast subject. There's no way that such a small book will be able to cover everything related to AI. Fortunately, for the goal of game AI, we do not need a comprehensive knowledge of AI. We only need to grasp the basic concepts and master the basic techniques. And this is what we will do in this book.

But before we move on to game-specific techniques, let's look at some of the main research areas for AI:

  • Computer vision: This is the ability to take visual input from visual sources – such as videos and photos – and analyze them to identify objects (object recognition), faces (face recognition), text in handwritten documents (optical character recognition), or even to reconstruct 3D models from stereoscopic images.
  • Natural Language Processing (NLP): This allows a machine to read and understand human languages – that is, how we write and speak. The problem is that human languages are difficult for machines to understand. Language ambiguity is the main problem: there are many ways to say the same thing, and the same sentence can have different meanings based on the context. NLP is a significant cognitive step for machines since they need to understand the languages and expressions we use before processing them and responding accordingly. Fortunately, many datasets are available on the web to help researchers train machines for this complex task.
  • Machine learning: This branch of AI studies how machines can learn how to perform a task using only raw data and experience, with or without human intervention. Such tasks span from identifying if a picture contains the image of a cat, to playing board games (such as the AlphaGo software, which, in 2017, was able to beat the number one ranked player of the world in the game of Go), to perfectly interpolating the faces of famous actors in our homemade videos (so-called deepfakes). Machine learning is a vast field that spans all other AI fields. We will talk more about it in Chapter 11, Machine Learning in Unity.
  • Common sense reasoning: There is a type of knowledge that is almost innate in human beings. For instance, we trivially know that things fall on the ground if they're not supported or that we cannot put a big thing into a smaller one. However, this kind of knowledge and reasoning (also called common sense knowledge) is entirely undecipherable for computers. At the time of writing, nobody knows how to teach machines such trivial – for us – things. Nevertheless, it is a very active (and frustrating) research direction.

Fortunately for us, game AI has a much narrower scope. Instead, as we will see in the next section, game AI has a single but essential goal: to make the game fun to play.

You have been reading a chapter from
Unity Artificial Intelligence Programming - Fifth Edition
Published in: Mar 2022
Publisher: Packt
ISBN-13: 9781803238531
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime