Book Image

Practical Game AI Programming

By : Micael DaGraça
Book Image

Practical Game AI Programming

By: Micael DaGraça

Overview of this book

The book starts with the basics examples of AI for different game genres and directly jumps into defining the probabilities and possibilities of the AI character to determine character movement. Next, you’ll learn how AI characters should behave within the environment created. Moving on, you’ll explore how to work with animations. You’ll also plan and create pruning strategies, and create Theta algorithms to find short and realistic looking game paths. Next, you’ll learn how the AI should behave when there is a lot of characters in the same scene. You'll explore which methods and algorithms, such as possibility maps, Forward Chaining Plan, Rete Algorithm, Pruning Strategies, Wall Distances, and Map Preprocess Implementation should be used on different occasions. You’ll discover how to overcome some limitations, and how to deliver a better experience to the player. By the end of the book, you think differently about AI.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
6
Navigation Behavior and Pathfinding
9
AI Planning and Collision Avoidance

From simple to smart and human-like AI


Programmers face many challenges while developing an AI character, but one of the greatest challenges is adapting the AI movement and behavior in relation to what the player is currently doing, or will do in future actions. The difficulty exists because the AI is programmed with predetermined states, using probability or possibility maps in order to adapt their movement and behavior according to the player. This technique can become very complex if the programmer extends the possibilities of the AI decisions, just like the chess machine that has all the possible situations that may occur in the game.

It's a huge task for the programmer because it's necessary to determine what the player can do and how the AI will react to each action of the player, and that takes a lot of CPU power. To overcome that challenge, programmers started to mix possibility maps with probabilities and perform other techniques that let the AI decide for itself on how it should react according to the player's actions. These factors are important to be considered while developing an AI that elevates the game quality as we are about to discover.

Games kept evolving and players got even more exigent, not only with the visual quality but also with the capabilities of the AI enemies and the allied characters. To deliver new games that took into consideration the player expectations, programmers started to write even more states for each character, creating new possibilities and more engaging enemies, implementing important allied characters, which meant more things for the player to do, and creating a lot more features that helped redefine different genres and created new ones. Of course, this was also possible because technology kept improving, allowing developers to explore even more artificial intelligence in video games. A great example of this that is worth mentioning is Metal Gear Solid, the game that brought a new genre to the video game industry by implementing stealth elements, instead of the popular straightforward shooting. However, those elements couldn't be fully explored as Hideo Kojima intended because of the hardware limitations at the time. Jumping forward from the third to the fifth generation of consoles, Konami and Hideo Kojima presented the same title, but this time with a lot more interactions, possibilities, and behaviors from the AI elements of the game, making it so successful and important in video game history that it's easy to see its influence in a large number of games that came after Metal Gear Solid:

Metal Gear Solid - Sony Playstation 1