AiGameDev.com

“Join leading experts and industry veterans in Paris on June 23-24 for the largest independent conference about artifical intelligence in video games.” — Alex

membership

The Premium Membership area at AiGameDev.com is the best place to stay on the cutting edge of artificial intelligence in video games.
Find out more!

sponsors

categories


subscribe

Search


related articles

Sponsors

SpirOps

PathEngine


Thinking of Behavioral Responses as a Table Lookup

Alex J. Champandard
September 16, 2007

Finding a visual representation of any problem always helps the design process. This new “Sketches” series starts with the basics: how to represent behaviors in an intuitive way.

Think about all the possible factors that your actors have to deal with (i.e. their internal state and external factors), and consider each combination as a unique situation.

A Situation

Using code, you can easily detect these situations as they occur for an actor, and provide an appropriate behavior.

Its Response

If you want to be thorough, each situation must its own response — even if it’s just to continue doing what was being done before.

All Behaviors

A better way to think about all these situations and responses is to think about them in a lookup table. This is a multi-dimensional table, but you can flatten it out into a large 2D table to make things more intuitive.

The Table

The factors that compose each situation can be sorted into two categories (e.g. internal and external). When you have specific problems to solve, writing out such a table makes it easier to work out appropriate responses.

In next week’s Sketches, you’ll learn how these tables change as more factors are taken into account, and you’ll understand why you can’t use tables to implement AI behaviors in practice.


Bookmark and Share




Comments