AI NPCs: How Do They Work, and What Do They Mean for Gaming?

Nov 07, 2023

florian-olivo-Mf23RF8xArY-unsplash-1

As an Amazon Associate, Modded gets commissions for purchases made through links in this post.

Artificial intelligence (AI) keeps popping up in new areas, but it’s been in video games for a while now. If you’ve played enough, you’ve likely already heard people refer to non-player characters (NPCs) as AI, and that’s not wrong. While an AI NPC may not be the most advanced example of this technology, it’s a fairly prevalent one.

NPCs are actually some of the oldest examples of AI in gaming. Now that generative AI — think ChatGPT — has shown its potential, the AI driving these characters is about to become a whole lot more advanced.

How Do NPCs Use AI?

Traditionally, NPCs use pre-determined patterns to dictate how they act. Some people call this pattern-based decision-making a form of AI, but that’s probably not what you think when you hear the words “artificial intelligence.”

True AI NPCs use intelligent algorithms to power their decisions. It’s the same concept that helped IBM’s Deep Blue become the first computer to beat a chess champion in 1997. The AI notices how the human player acts and then calculates multiple possible options to choose the best way to respond.

Depending on the game and your difficulty level, that decision-making can look dramatically different. Harder, more advanced AI opponents can find the best possible move from thousands, if not millions, of possibilities. If you’ve played anything with AI teammates, though, you’ve likely experienced the other, not-quite-as-smart side of the spectrum.

Generative AI opens a whole new world of possibilities. AI NPCs using generative models could have custom dialogue unique to each player. Similarly, AI could create entirely new characters for each player. Just as procedurally generated worlds can give you a unique environment each time you play, generative AI could do the same with the world’s characters.

AI NPCs Then

Space invaders arcade cabinet

It’s difficult to nail down the exact instance when AI NPCs became a reality. Some people point to Space Invaders as the first example of AI in gaming, but those NPCs hardly qualify as AI by today’s standards.

The enemies in the first Halo game look more like what we’d call AI today. Instead of following a specific pattern, each Covenant alien follows a unique kind of behavior. Some run carelessly into the line of fire, others dodge and still others adapt their strategy the longer a firefight goes on. While their overall behavior is consistent, the specific actions differ in every scenario.

Other older games used AI to control their NPCs in a broader sense. Left 4 Dead — which remains one of the best co-op story games despite releasing in 2008 — used something called the “AI Director.” The Director adapted to players’ behavior to decide when to add more zombies or hold off for a bit for better pacing.

All of these examples still use pre-determined actions to an extent. However, titles like Halo and Left 4 Dead used algorithms to respond to players in real-time. So, even though the actions themselves are all scripted, when they happen and to what extent is up to the AI.

AI NPCs Now

Two people playing Fifa on PlayStation

Many newer games’ NPCs still rely on the same basic premises of these older games. As AI has advanced, though, so has its role in video games. Even though they may not seem all that different from the outside, AI NPCs have come a long way since 2008.

Sports games are an excellent example. Now that EA Sports College Football is returning after almost a year, it’s coming with more advanced AI features. In its more recent titles, EA’s been using AI to make their digital athletes play like their real-world inspiration. When you’re not controlling an athlete, they’ll exhibit the mannerisms and playstyles of the real people they represent. That level of detail is only possible with AI.

AI in modern sports games also helps NPC movements and physics seem more natural. That way, when you run into an NPC, they don’t ragdoll all over the place and break your immersion. Instead, AI calculates how a real body would respond with real-world physics to make the interaction more realistic.

Today’s AI NPC advancements go beyond sports games, too. Some of the best modern survival horror games use AI to make their enemies smarter — and, thus, more terrifying. The xenomorph in Alien: Isolation uses not one but two AI models to ensure it can hunt you with the accuracy you’d expect from nature’s perfect predator without cheating.

AI NPCs in the Future

A man with a headset playing a video game on a computer

Now that generative AI is pushing the envelope on what’s possible, AI NPCs are on the verge of a big upgrade. Video game companies are already rolling out technology to let you have real conversations with NPCs.

A company called Replica released an AI plugin for Unreal Engine that makes it easy for game developers to create generative AI-powered NPCs. When users talk to these NPCs with a microphone, the NPCs will respond in real-time. Their dialogue, tone of voice, facial expressions and even body language all adapt to the specific conversation.

As tools like this advance and become more common, every player could get an entirely unique experience with every NPC. In the simplest use cases, these AI NPCs will make in-game dialogue feel more real. Down the road, they can tailor the gaming experience to individual users, even to the point of changing story beats to fit your unique playstyle.

Of course, taking NPC AI to this level has some downsides, too. Right now, conversations with AI still feel robotic a lot of the time. Human-written dialogue will sound more natural for the time being as a result. If the AI isn’t perfect or there’s a glitch, it’d also be more noticeable than an error with a less AI-reliant NPC.

There’s also the question of job stability for game developers and artists. The gaming industry supports hundreds of thousands of jobs, many of which involve bringing life to NPCs. If AI can generate their voices, dialogue, appearances and actions, it could leave writers, voice actors, programmers and artists out of work.

For Better or Worse, AI Is Changing NPCs

The AI in NPCs has changed a lot since the arcade days. If current trends hold, then there’s even more change ahead of them.

Whether rising AI adoption will help or hurt the gaming industry is still up in the air. Many concerns remain, but AI can do a lot of good for gamers and the companies making games, too. Whatever the specifics, AI will undoubtedly revolutionize NPCs.

Stay up to date with the latest by subscribing to Modded Minute.

Author

Jack Shaw is a senior writer at Modded. Jack is an avid enthusiast for keeping up with personal health and enjoying nature. He has over five years of experience writing in the men's lifestyle niche, and has written extensively on topics of fitness, exploring the outdoors and men's interests. His writings have been featured in SportsEd TV, Love Inc., and Offroad Xtreme among many more publications.