Contents

Making Them Think

Predefined Behavior

Goal-Directed Behavior

The Middle Ground

A Simple Tutorial: Maze Solving

Discussion

Notes and References

Discussion

Complex actions provide a convenient tool for giving a character "advice" in the form of heuristic rules that will help it solve problems faster. In general, the search space will still be exponential, but reducing the search space can make the difference between a character that can plan 5 steps ahead, say, and one that can plan 15 steps ahead. That is, we can get characters that appear a lot more intelligent.

The possibility also exists for incremental refinement of a specification, perhaps, from a high-level specification to the point where it more closely resembles a controller written using a conventional imperative programming language. That is, we can quickly create a working prototype by relying heavily on goal-directed specification. If this prototype is too slow, we can use complex actions to remove more and more of the nondeterminism. If required, we can even do this to the point where the behavior is completely predefined.

To sum up, if we can think of, or look up, a simple predefined way to produce the behavior we are interested in, then it makes a lot of sense to use it. This is especially so if we don't think the behavior will need to be modified very often, or at least if the anticipated modifications are minor ones. It is not surprising, therefore, that a lot of simple reactive behavior is implemented using simple reactive behavior rules. For simple reactive behavior, like collision avoidance, it is not hard to think of a small set of reactive behavior rules that will do the job. Moreover, once we have this set of rules working, it is unlikely that we will need to modify it.

We have tried to make it clear that one type of behavior can be implemented using a variety of techniques. We have, therefore, chosen not to classify behavior according to what the character is trying to achieve, but rather on the basis of the technique used to implement it. The reader should note however that some others do try to insist that behavior in the real world is of a certain type, and its virtual world counterpart must therefore be implemented in a particular way. Unfortunately, this leads to lots of confusion and disagreement among different research camps. In particular, there are those who advocate using predefined behavior rules for implementing every kind of behavior, no matter how complex. In the sense that, given enough time and energy it can be done, they are correct. However, they are somewhat like the traditional animator who scoffs at the use of physical simulators to generate realistic-looking motion. That is, to the traditional animator a physical simulator is an anathema. She has an implicit physical model in her head and can use this to make realistic motion that looks just as good (if not better), and may only require the computer to do some simple "inbetweening". Compared to the motion that needs a physical simulator to execute, the key-framed approach is lightning fast. If we could all have the skill of a professional animator there would not be so much call for physical simulators. Unfortunately, most of us do not have the skill to draw physically-correct looking motion and are happy to receive all the help we can get from the latest technology. Even artists who can create the motion themselves might prefer to expend their energies elsewhere in the creative process.

In the same vein, many of us don't have any idea of how to come up with a simple set of stimulus-response rules that implement some complex behavior. Perhaps, we could eventually come up with something, but if we have something else we'd rather do with our time it makes sense to get the characters themselves to do some of the work for us. If we can tell them what we want them to achieve, and how their world changes, then perhaps they can figure it out for themselves.

We should also point out that there are those who advocate a cognitive modeling approach for every kind of behavior, even simple reactive ones. This view also seems too extreme as, to coin a phrase, there is no point "using a sledgehammer to crack a nut". If we have a simple reactive behavior to implement, then it makes sense to look for a simple set of predefined rules. Also, if lightning-fast performance is an absolute must, then we might be forced to use a predefined approach, no matter how tough it is to find the right set of rules.

Of course, there is a big gray area in which there is no clear answer as to whether we should just stick with predefined behavior rules or not. In such cases, the choice of how to proceed can depend on personal preference and the available tools and expertise. Obviously, this article is primarily aimed for those who decide to go the cognitive modeling route.

________________________________________________________

Notes and References