Creating compelling AI NPCs for an open world

Open-world games are designed to allow players to explore and interact in it at will; creating compelling AI characters and enemy types for these games can be difficult when everything is built to scale and adapt to what the player does.

Jeet Shroff, senior programmer at Avalanche Studios, addressed this topic in their GDC 2014 talk, "Free-Range AI: Creating Compelling Characters for Open World Games." He discussed how open-world titles present the challenge of needing dynamic non-playable characters to help players immerse themselves in the game. Design decisions had to be made that allowed NPC behavior to accommodate player choices as well as emergent and open-ended gameplay segments.

Open-world games are sandboxes — they want players to have the power to craft their own experiences. Developers want this ideal to extend to all areas of gameplay, but by handing all control over to players, developers relinquish their own control over the game.

Enter AI — developers' way of having some control over the sandbox. According to Shroff, any AI introduced into an open-world game needs to be adaptable, reactive, scalable, interesting and fully-realized, otherwise its presence won't work in the game. It's also challenging to develop sandbox AI that doesn't creatively stifle the player or discourage them from setting out to discover and try new solutions on their own.

"The idea is to represent or script the intended player up front as an exercise, like you would do for any non-player character in the game," he said. "As AI programmers, we have to model perception and behavior."

AI developers on open-world games must be player-centric in their thinking, and need to determine what enemy types will cause players to search for their own solutions. Developers must trust players to create behavior variants on their own with each enemy they introduce.

The same goes for player motion. In Just Cause 2, players can move very quickly in any direction on the map — something complicated and difficult for developers to make. It's hard to deliver a consistent player experience that is positive when there are so many variants to script — staging, positioning and game pacing among them. Systemic solutions are key to creating AI that work in open world games, Shroff said.

The size of the world and complexity of decisions will also affect how complex AI can be. AI behaviors need to be easy to understand and less complex — behavior trees, a setup of branching paths of AI reactions, is developer and designer friendly, Shroff said. Behavior trees can also help developer determine what actions will be most obvious to the player. If AI take actions that players anticipate, this will make it easier for players to respond to them or defeat them, if they are opponents.

The biggest challenge in open-world AI is dealing with a limited amount of memory and making characters that are adaptable to a wide range of situations, Shroff said.

"Build systems and not moments — systems that work well with and for the player, so you're not just making moments," Shroff said.

More from Polygon

The horror of Five Nights at Freddy's

  • Dark Souls 2: Crown of the Old Iron King Overview

  • Spacecom: a fast 4X built for multiplayer

  • Pillars of Eternity builds on role-playing classics

  • Tour the 1 KB hard drive built inside Minecraft

Latest Discussions

Log In Sign Up

Log In Sign Up

Please choose a new Polygon username and password

As part of the new Polygon launch, prior users will need to choose a permanent username, along with a new password.

Your username will be used to login to Polygon going forward.

I already have a Vox Media account!

Verify Vox Media account

Please login to your Vox Media account. This account will be linked to your previously existing Eater account.

Please choose a new Polygon username and password

As part of the new Polygon launch, prior MT authors will need to choose a new username and password.

Your username will be used to login to Polygon going forward.

Forgot password?

We'll email you a reset link.

If you signed up using a 3rd party account like Facebook or Twitter, please login with it instead.

Forgot password?

Try another email?

Almost done,

By becoming a registered user, you are also agreeing to our Terms and confirming that you have read our Privacy Policy.



Choose an available username to complete sign up.

In order to provide our users with a better overall experience, we ask for more information from Facebook when using it to login so that we can learn more about our audience and provide you with the best possible experience. We do not store specific user data and the sharing of it is not required to login with Facebook.