December 30, 2005

Hidden Markov Models

Given the recent discussion of how to deal with uncertainty and expectation in AI, I thought it might be interesting to present my upcoming AI Wisdom 3 article. Edit: thanks for great comments! The final version will appear later this year in Game AI Programming Wisdom 3.

Stochastic processes are commonly used to estimate and track activity based on limited or noisy information. A number of interesting types of activity can be modeled using stochastic processes, including movement through physical space, the production of gestures or spoken language, and even participation in social interaction.

This article introduces hidden Markov models, an inexpensive and intuitive method for modeling stochastic processes. The following sections present motivation behind the technique, examples of how it can be used to track a player’s movement and behavior based on scattered and uncertain observations, as well as details of a computationally efficient implementation.
Posted by rob at 11:02 PM | Comments (2)

December 17, 2005

Presentation Details

Starting on a full time AI job "in the industry" has been an interesting experience. My new secret project is very cool, and the AI is a lot of fun, but I had been very surprised by the sheer amount of engineering details that go into a game. All the stuff that you can just ignore when doing research - well, it all comes back, with a vengeance. :)

Perhaps the greatest difficulty lies in having to tie all of AI into "presentation details" - animation, voice-overs, UI, all the other incidentals. Except that in the game world, they are not incidentals at all. They are primary means of delivering the experience of intelligent, interesting behavior to the player.

A quick aside on how the academic side of things works: research mainly concerns itself only with the engine side of things, and often assumes the presentation layer is an "implementational detail" to be worked out by application developer. This is not surprising, since research seeks new insights and algorithms for intelligent processes - while the means of communicating them to the user are less reducible, and more contingent on the details of the overall design. But in entertainment, it’s the overall design that is the primary concern.

The most difficult aspect of tying AI to presentation is the representational mismatch - the AI may want to produce continuous and complex output, but it has to do so through a set of very discrete, particular elements. In conversation, the set of voice-overs is enumerated ahead of time, and finalized early in the schedule; for animations, the set of animation data is relatively small, considering the depth of human behavior, and is made up of a small number of separate, recognizable chunks, and so on. So decision making, no matter how complex, has to collapse its outputs into one of the n predictable actions. How to express subtlety and wide range of behavior with such a limited palette?

Perhaps this is one of the reasons why finite-state machines remain so popular. No matter how sophisticated the inner model is, if it’s only expressed by n different actions, then it might just as well be implemented using only a few discrete modes of behavior.

Worse yet, can we expect procedural solutions for presentation, which would relieve the constraints? I’m tempted to say 'no'. Solutions to the problem - procedural animation, text-to-speech synthesis, and so on - only work in limited contexts. They can’t replicate the depth of detail and emotion that a good animator or voice artist can bring out. And replicating those details procedurally seems like an AI-complete problem all by itself.

So in game development, in order for complex AI to be useful at all, it has to treat presentation layer as a fundamental representational constraint on reasoning itself - not as a mere implementational detail. This approach makes perfect sense, and leads one towards an interesting space of solutions - but at the same time, it's a direction very different from that of academic research. Which is something I wish I had understood when I started grad school. :)

Posted by rob at 10:36 AM | Comments (10)

December 11, 2005

The Year in [Game AI] Review

The end of the year upon us, it’s natural for us to look back on the past 12 months and search our souls for an answer to the questions “What was the best game AI of the year?” “What does the trajectory set by 2005 tell us about 2006?” “What titles most influenced the way you think about AI?”

Certainly, it was an interesting year for characters. I can think of two games that had, in one way or another, a novel character technology at the heart of their gameplay experience: God of War (in which character-on-character interaction was made the central mechanic, and which reminded us all how fun vidding a single button can really be) and Shadow of the Colossus. I’m always excited when games explore new character interaction design space, because the AI-space is always correspondingly extended. When we first implemented boarding for Halo2, the next and most logical step was “Now the AI should be able to board you BACK!” And very little (ironically) makes AI look smarter than a canned animation played back at a particularly appropriate time.

Anybody else have any thoughts on this? What AI or character work struck you in 2005?

Posted by naimad at 01:59 PM | Comments (4)