Article
files/sketches/situation

Thinking of Behavioral Responses as a Table Lookup

Alex J. Champandard on 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.

Discussion 0 Comments

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!