Simulated sensory systems have been a part of enemy AI for several years. In the classic Thief series, guards were able to investigate noises and glimpsed movements, a feature later refined in the likes of Halo and Crysis. Nowadays, sensory data seems ever more complex, with enemies following blood trails (Alone in the Dark) or even sniffing you out on the wind (Metal Gear Solid 4). Is this a vital development? Where will it lead? Today we ask a selection of developers about bringing AI characters to their senses…
Participants:
Jean-Christophe Capdevila: AI team leader, Alone in the Dark, Eden Games
Dominic Guay: Technology Director, Far Cry 2, Ubisoft
Remco Straatman: Lead AI programmer, Killzone 2
Alex Champandard: AI coder, author and blogger (http://aigamedev.com)
Remco Straatman: Our NPCs have had visual, auditory and haptic sensors from the first generation. Perception is influenced by the alertness of the NPC: idling around they will not spot enemies as fast as alerted. Sensors have their limitations: in the foveal (forward) view enemies are spotted easily, whereas enemies in the peripheral view are mainly spotted when moving. Size and distance also influence visibility of enemies. Perception of audio is limited by other sounds around at the same time: when someone is firing a heavy machinegun, they are less likely to spot footsteps behind them.
These are features that other advanced AI systems have as well. Where it becomes important is where the perception starts to influence the NPC’s behavior in interesting ways.
We try to make the AI reason about what they cannot perceive: If I cannot see the enemy, where might he have gone? Our NPCs use what we call “threat prediction” based on the last perception, knowledge about the terrain, and observation. The NPC will then use this to determine where to look for the enemy, to suppressively fire at places where the enemy may pop up, and where to search for the enemy.
Dominic Guay: With Far Cry 2, we worked at enriching and polishing our stealth mechanics. The player can hide in foliage or grass, but he needs to be careful in his approach because the AI can spot movements in the bushes. The AI will react to uncanny events in their vicinity like a fire starting or running animals, but while this will make them alert, they will not necessarily know the player position. Once AIs are alert, they may actively search for intruders.
With the ability to evaluate the player’s action with more fidelity using modern hardware, the AI can adapt to what the player is doing on the fly. The AI is also much more agile at navigating in complex environments using covers efficiently to stay out of the player’s line of sight.
Alex Champanard: On avenue of development is particularly interesting: combining the classical game AI approach of cheating with more embodied characters, so you’d get NPCs in a game that behave precisely according to their senses when the player is around (like a team mate), but when the player is not watching the AI leverages that uncertainty to provide a better experience, for instance by sending in enemies to patrol in an area around the player to build up tension. These combinations have even more potential for gameplay than either of the approaches on their own.
Jean-Christophe Capdevila: With the power of the current consoles we can push even further the way NPCs perceive the world in terms of visual, sound and smell aspects, but also in terms of the memory an NPC has, allowing it to remember an event that has happened recently in his immediate environment.
This power lets us give them, for example, a more advanced knowledge of dynamic objects, or even of fire, and grow their capacity to interact with these elements. We could also take into account events not directly linked to the player but which add more life to the NPC - for example, an object that falls and makes a sound will attract their attention.
Of course, this is not in itself completely new, but the new generation of consoles lets us develop this as a complete entity by itself, in levels with hundreds of dynamic objects, in increasingly advanced detail.
Check back tomorrow for part three of Keith’s fascinating exploration of the future of AI…

When the npc’s start realising that they are within a game and register the players actions - i’m gonna be bunkering down and hiding like a sissy girl
Comment by JohnSketch — Nov 4, 2008 @ 4:00 pm
[...] Part 2Â of Three Speech’s 5 part discussions on Intelligent Design and AI is live and this time, it discusses perception in the world of gaming, how NPC’s are able to sense the player through sight, sound, smell, etc. Included in today’s round-table are Jean-Christophe Capdevila from Alone in the Dark, Dominic Guay from Far Cry 2, Remco Straatman from Killzone 2, and Alex Champandard of http://aigamedev.com. What is needed in order order to produce an interactive NPC capable of sensing it’s surroundings? Read on to find out. [...]
Pingback by Artificial Intelligence in Gaming: Part 2 - Perception | PS3 Attitude — Nov 4, 2008 @ 4:29 pm
If AI gets too intelligent, I’m going to feel sorry about what I’m shooting, running over or setting on fire.
Comment by E-ROLE — Nov 4, 2008 @ 4:46 pm
These articles are great. I’ve always had an interest in AI and ALife so finding out about AI in modern games is really interesting.
I wonder if any of these games are close to be useful in behavioural studies. From some of the comments I’d think so, but from my in game experience I’m not so sure.
I’d love to know more about how these people got started in AI.
Comment by Colin Robertson — Nov 4, 2008 @ 5:19 pm
I got started by programming my own stuff! A little 3D graphics at first, Pascal the C++. That developed a foundation but I found AI much cooler! Did a computer science degree, a little research, then moved into industry as a programmer…
Anyway, to get started I can suggest my site at AiGameDev.com!
Enjoy.
Comment by alexjc — Nov 5, 2008 @ 10:21 am
RSS feed for comments on this post. TrackBack URI
Leave a comment