Mimicking Intelligence in Video Game NPCs

Feng Wu
3 min readApr 23, 2020

--

When designing AI systems, one of the main points of focus is the interaction between the AI and the human. In brainstorming AI-human interactions, one of the fantasies has always been creating an AI that is indistinguishable from a human. Form is one component to this fantasy; the other is behavior. Intelligent, human-like behavior can lead greater perception of realism and trust. To further explore this space, I chose to investigate nonplayer characters (NPC) behavior in video games to learn about how different degrees of fidelity influences the overall AI-human experience.

NPCs make up a huge portion of the gameplay experience. These characters can be quest givers, merchants, enemies or friends. They serve a role for the actual player to interact with the game world. In my opinion, the best games not only design NPCs to serve a particular gameplay role, but also tries to make them feel real through intelligent behavior. What I mean by real and intelligent is that well designed NPCs have their own identities and seem posses their own freedom of will. They transcend being merely just tools or obstacles in a game for the protagonist. I will illustrate this with the following examples.

Infighting in Doom

An early example of “smart” NPCs is in the original 1993 Doom. Monsters can recognize the source of the damage dealt to them and consequently retaliates against that damage source. Self-defense is one of the most basic forms of intelligence. This simple design also reveals a game world beyond just you vs monsters. In fact this design suggests that Doom is a brutal chaotic world that thrives on combat and killing, and you the player is just one participant in this world. Without the infighting mechanic, the game would feel only like an arcade game where you shoot enemies while dodging. Emergent storytelling occurs when NPCs exhibit human-like traits of self-defense.

Behavioral Trees in Halo

Another game mechanic that helps make NPCs feel real are behaviors trees. This mechanic is made famous by the Halo series. The tl;dr is that different enemy types have their own unique AI that adapts to the in-game situation. In Halo, some enemies like to be aggressive and charge, while others find cover and snipe. The concept is simple: different enemies behave differently in different environments, but the effect is huge. Not only is the gameplay more engaging with more variety of challenges, but also the NPCs interactions feel more organic rather than scripted. NPCs have a style of fighting that adds to their identity. NPCs with personal flair and uniqueness helps us players personify the characters with interact with.

Radiant AI in Skyrim

NPC design in Skyrim also aims to achieve immersion through unique intelligence, but at an even more granular level. Bethesda’s Elder Scrolls series uses a system called “Radiant AI” to give their NPCs life. Radiant AI is a system that assigns each NPC a life script: where they go, what they do, and when. The effect is that the NPCs in Skyrim feel like they have their own personal life in the world. The consequence of having a “life” (scripted or not) is that it gives the characters a sense of having a motive. Humans have a tendency to assign reasons to behaviors. We feel that a group that gathers secretly in a basement at night must have be plotting something, rather than the reality that their actions are scripted. NPCs having a motive and having a life helps make the Skyrim world feel active and bustling, which consequently adds realism to the universe.

“Smart” Reactions in Red Dead Redemption 2

My last example shows just how far NPC AI design has come. In RDR 2, the NPCs are able to assess the behavior of the player character and react accordingly. Dressing poorly will lead to nasty comments about you from townsfolks. Even pointing the game camera at a character (which is interpreted at staring) will trigger aggression from that NPC. This level of detail matters because the smart behavior of NPCs makes the game world feel alive. Players are accustom to feedback back from explicit player actions, but not implicit. This new form of NPC intelligence actually encourages the play to “behave” and truly roleplay their character. Constraints of proper behavior adds another layer of immersion to the gaming experience. This design really flips the script; the human player is no longer a god-like character in the game, but rather has to consciously abide by rules of the game world.

--

--