Book Image

Unity 4.x Game AI Programming

By : Aung Sithu Kyaw, Clifford Peters, Thet Naing Swe
Book Image

Unity 4.x Game AI Programming

By: Aung Sithu Kyaw, Clifford Peters, Thet Naing Swe

Overview of this book

<p>This book fills the gap between artificial intelligence (AI) books designed to learn underlying AI algorithms and general Unity3D books written to cover basic scene setup and scripting in Unity3D. Game AI Scripting in Unity3D covers implementing AI techniques such as flocking, pathfinding, path following, and behavior trees in Unity3D with example projects.<br /><br />Game AI Scripting in Unity3D will show you how to apply AI techniques to your Unity3D projects using C# as the scripting language. Unlike other AI books and Unity3D books, this book tries to focus more on the application of AI techniques in the Unity3D engine, with sample projects that demonstrate finite state machines (FSMs), pathfinding, steering, navigation graphs, and behavior trees techniques. <br /><br />This book shows how to implement various AI techniques in Unity3D by implementing the algorithm from scratch using C#, applying Unity3D built-in features, or using available scripts and plugins from the Unity Asset Store. For example, we’ll be implementing our own A* algorithm to do pathfinding but will also explore the Unity3D navigation graphs feature. Then we’ll use the Behave plugin to construct behavior trees for intelligent AI character behaviors.<br /><br />Game AI Scripting in Unity3d&nbsp; covers other AI techniques such as flocking behavior, building a sensory system for taking inputs from the environment and other AI agents, and so on. In the final chapter this book will show you how to build a racing game AI project using Unity3D and applying the techniques described in earlier chapters.</p>
Table of Contents (17 chapters)
Unity 4.x Game AI Programming
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Artificial Intelligence (AI)


Living organisms such as animals and humans have some sort of intelligence that helps us in making a particular decision to perform something. On the other hand, computers are just electronic devices that can accept data, perform logical and mathematical operations at high speeds, and output the results. So, Artificial Intelligence (AI) is essentially the subject of making computers able to think and decide like living organisms to perform specific operations.

So, apparently this is a huge subject. And there's no way that such a small book will be able to cover everything related to AI. But it is really important to understand the basics of AI being used in different domains. AI is just a general term; its implementations and applications are different for different purposes, solving different sets of problems.

Before we move on to game-specific techniques, we'll take a look at the following research areas in AI applications:

  • Computer vision: It is the ability to take visual input from sources such as videos and cameras, and analyze them to do particular operations such as facial recognition, object recognition, and optical-character recognition.

  • Natural language processing (NLP): It is the ability that allows a machine to read and understand the languages, as we normally write and speak. The problem is that the languages we use today are difficult for machines to understand. There are many different ways to say the same thing, and the same sentence can have different meanings according to the context. NLP is an important step for machines, since they need to understand the languages and expressions we use, before they can process them and respond accordingly. Fortunately, there's an enormous amount of data sets available on the Web that can help researchers to do automatic analysis of a language.

  • Common sense reasoning: This is a technique that our brains can easily use to draw answers even from the domains we don't fully understand. Common sense knowledge is a usual and common way for us to attempt certain questions, since our brains can mix and interplay between the context, background knowledge, and language proficiency. But making machines to apply such knowledge is very complex, and still a major challenge for researchers.