Book Image

Learning Game AI Programming with Lua

By : David Young
Book Image

Learning Game AI Programming with Lua

By: David Young

Overview of this book

Table of Contents (16 chapters)
Learning Game AI Programming with Lua
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with AI Sandbox
Index

Influence maps


Influence maps help alleviate the understanding of the environment from a high level. This type of spatial data can come in many different forms, but all essentially break down the environment into quantifiable regions where additional data can be stored and evaluated. In particular, we'll be using a three-dimensional grid-based representation for our influence maps. Each cell of the influence grid represents a three-dimensional cube of space. The sandbox uses an internal three-dimensional array structure that stores influence map data, and therefore, grows quickly in size based on the dimensions of each grid cell.

With influence maps, we can easily perform tasks such as spacing out agent positions or moving agents toward friendly regions and away from dangerous regions within the sandbox. Previously, we would use a utility-based approach that would become performance-intensive as more agents were introduced into the sandbox. With a central data structure shared by all agents...