Thursday, January 27, 2005

Ruminations on AI


As a wannabe game designer
and a failed programmer, I spend a lot of time complaining about AI in games and speculating on what the future might hold.

When reviewers were praising Far Cry's enemies, I was wondering how I could snipe someone from half a mile away and have a helicopter take off seconds later and immediately hone in on my position. Or how I could steal a boat and bombard a camp with grenades for a full twenty minutes and find that I had missed everyone in camp, and was forced to slowly lure them to my kill zone.

After fiddling a bit with the Crytek Editor I realized the limitations. Far Cry's AI system was path and zone based. Since I was in the helicopter's zone, it didn't matter if I was hidden from view or far away - my position was not concealed from the AI. The enemies in the camp would not venture outside their given range, not without some frustrating carrot-on-a-stick maneuvering.

Still, though this is referred to as artificial intelligence, it is really just intelligence albeit extremely limited. A system that receives input and creates dynamic plans based upon that input can be said to possess intelligence. Note I said dynamic plans. Programs are not necessarily intelligent, though as we design more complex programs that grow in tune with human thought processes and develop self-correcting procedures we will see things like word processors and accounting programs gaining intelligent aspects.

But most computer intelligence we encounter in videogames and it is still rudimentary. The difficulties in getting bots to navigate a 3d enironment and react to other players is in itself a challenge. Imagine trying to program a bot to factor in layered reactions to a fluctuating needs and wants system along with personality factors and moods all while navigating a world and performing appropriate reactions.

If the new Elder Scrolls game, Oblivion, lives up to even half of what it promises, then it will represent a leap forward in NPC intelligence design. According to their press, Radiant AI will decide for itself what it needs to do based upon the world around them and their personal characteristics. I would like to see how this breaks down design-wise. What I'm most interested in is seeing how they can keep the world open-ended yet still advance the storyline. Will a character with an important task for me actively seek me out, or wait in one spot for a certain amount of time each day until I receive their task, or will they wander around until I happen to run into them?

Most games that offer unlimited freedom in a gameworld are forced to make certain allowances in order to add structure and plot. GTA, Simpsons Hit and Run, True Crime, Jak and Daxter -- all of these games use a large world as a 'hub' that lets players choose certain missions, leading to a feeling of greater choice. But ultimately there's only the choice between structure and freeform and never the twain shall meet. Morrowind left a giant world to explore, but the NPCs only did a few things - they guarded, or attacked, or followed, or stood there and waited for you to initiate something. They had a wide range of things they could do, but always in reaction to something the player did. The Sims react in surprising ways to all sorts of things, but at a loss of control for you, the player. They are almost like physics simulators - you control certain variables, set conditions and initiate certain behaviors, then watch the reactions.

So what remains to be seen is how game developers are going to merge freeform and structure. How can we model a reactive gameworld without creating a picture of anarchy? Will Radiant AI model social structures as well as individuals? My fear is that NPCs will each have their own goals and schedules, but how, for example, will wizards of the same guild act? Will they perceive loyalty to the guild, will they scheme for power, will they seek to enrich the guild?

I'm interested in the confluence of order and chaos. This is an important issue for game designers, as they are dealing with incredibly complex systems in which even minor changes can introduce major amounts of instability. Anyone who has taken a peek at the AI behind games like Neverwinter Nights or Morrowind knows that, while incredibly flexible, they also have a tendency to produce scores of unforeseen behaviors. RPGs tend to have a more difficult job since they seek to model not just combat but conversational skills and reactions to different characteristics.

Shooters have an advantage over RPGs in that combat is well-documented. Tactics of movement, seeking cover, providing suppressive fire, flanking, retreating are all broken down Barney-style (so that even grunts can understand) and provide excellent manuals to use while programming. Personality and conversations, however, don't have clear-cut manuals. It is up to current game designers to draw from neuro-linguistic programming and Maslow's hierarchy of needs and the Big Five personality dimensions.

Complex intelligences will come about when game designers begin exploring other disciplines. Right now the limitations are in some ways about hardware and other ways about software. The game industry is not focused on creating a new plateau of intelligence, but in refining the old one. So many games still only explore combat-based interactions that there is no need driving the industry to innovate new behaviors. Hardware has long been limiting the growth of intelligence in games. Typically designers will allot only about 10% of the CPU cycles to the AI. The upcoming Cell chips promise such a quantum leap in processing power that developers are free to create the type of intelligences they've long dreamed about.

It would be nice someday to interact with an NPC that isn't just a prop. And hopefully Crytek will leave the omniscient helicopters to Terminator games.

1 comment:

andrew stern said...

how game developers are going to merge freeform and structureYes, I strongly believe this is one of the primary frontiers that interactive entertainment developers face. The perennial interactive story problem is one manifestation of this.

I and my collaborator have just written up a paper on this topic for AIIDE (aiide.org), that I'd love to contribute to this discussion, which we'll do once the paper gets accepted (assuming it does :-). Until then, for what it's worth, we briefly address this topic in page 4 of an older paper, in the "approach and motivation" section (pdf).

Anyhow, looking forward to reading more of your new blog.