19 November, 2009

AI is About More Than Just Combat

Here's a scene for you: you step inside the tavern and make your way to a table along one wall, passing farmers and merchants drinking, laughing and leering at the gap toothed wenches serving drinks.

Then, the door swings open, and framed in the portal is a hooded figure, who makes his way through to the bar. It's not just his dress that is a radical departure from the stained tunics and breeches of the locals, but it's the fact he's followed in to the bar by another... thing.

This individual's green skin shimmers in the half-light seeping through the grimy windows. He's wearing nothing but a belt and loincloth, but your attention is immediately drawn to the large pair of bat-like wings protruding from his back. That, and the wicked-looking barbed blade hanging by his belt mark him out as more than just a stranger from another town - he's a stranger from another dimension.

Yet, no-one (yourself excepted) even raises an eyebrow at the sight of our demonic bar fiend, let alone looks around to stare a little longer than would be socially acceptable. Apparently the presence of such creatures is normal in these parts - although there's no indication it would be from previous behaviour you've noticed from these common... commoners.

I don't know about you, but I'd expect the presence of a demon in my local would at least elicit some surprised glances, if not a mass exodus. Yet I've been in a game - Age of Conan - where this exact scene unfolded as told. And when it did, I immediately broke out of my 'game' mind and found myself in my 'meta' mind - reflecting on the ludicrous nature of the scene before, and reminding me that I'm playing a game with but the barest hollow edifice of reality (even fictional reality) surrounding it; in R.E. Howard's world, the presence of a demon in a tavern would have been unthinkable.

Scenes like this remind us that artificial intelligence in games is more than about whether or not mobs flee when they're at 15% health. AI is about the 'intelligent' reactions the NPCs make to their environment - in and out of combat. And the reactions of the NPCs in this scene is anything but 'intelligent', even if it is supremely 'artificial'.

We spend a lot of our time as humans 'normalising' the world around us. As children every experience is new, novel and surprising. But then we become accustomed to it - we start to become blind to the normal. We let it fade in to the background. Then, when something truly novel for us occurs, it stands out.

We initially elicit surprise - which is not just an expression of novelty - it's a defence mechanism that readies us for fight or flight. It brings the novel stimulus front and centre in our attention, and we immediately assess whether it's a threat. And in our ancestral playground, where we evolved these psychological mechanisms, a novel stimulus often was a threat.

Which brings me to AI. NPCs never express surprise. To NPCs everything is normal. Even a demon walking in to a bar. Or seeing one of their mates drop with an arrow through their neck. How do they respond in the latter situation? Without surprise. Just a business-like grunt, and off they go, swinging in your direction.

That's not right. I mean, sure, AI hasn't been much of a priority in games over the past several years. I thought it would be, but it's not. But should developers wish to make their games more immersive, more in tune with what we find normal, then surprise needs to be part of the way they code NPCs.

In fact, it's more than that. It's not just that they should think about surprise as an element to add to their AI routines - they need to think about how they approach AI in such a way to make surprise a natural part of AI. Surprise - and the normalisation process that goes along with it - underlie much of our intelligence.

For if developers don't take surprise seriously, we risk us normalising absurd behaviour - like a demon walking in to a bar (bump).

blog comments powered by Disqus

Post a Comment

Please read our Moderation Policy before commenting.