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
About the Author
About the Reviewer
Customer Feedback
Navigation Behavior and Pathfinding
AI Planning and Collision Avoidance

Probability maps

A probability map is a more complex and detailed version of a possibility map because it relies on probabilities in order to change the behavior of the character, rather than a simple on or off trigger. Its similarity with the possibility map is that it's also required for planning ahead the possible states for our character. This time, however, we add to it a percentage, using which the AI will calculate what behavior he will be using. Imagine the next example using the situation that we previously created for the possibility map our enemy AI could be more aggressive in the daytime than at night. For that, we create a statement that explains to our enemy that if it's night time, there is a lesser chance of seeing the player character, and for that reason it will choose a more defensive approach instead of an aggressive one. Or, simply, we could define that our enemy calculates the probability of killing the player simply based on the distance between the two characters...