How Neural Networks Are Making NPCs Smarter Than Ever

Photo: Michele Raffoni / Pexels
For decades, the enemies and allies you encountered in video games were essentially reading from a script. Guards walked the same patrol route every night, shopkeepers recited exactly three lines of dialogue, and boss fights collapsed under the same trick every single playthrough. Neural networks are quietly rewriting that script for non-player characters (NPCs) — the computer-controlled figures who populate a game world. Instead of hand-coded rules, a growing slice of the industry is training statistical models on data and letting NPCs generalize their own tactics, expressions, and reactions. This piece looks specifically at what happens inside an NPC's "brain" — not at how a whole game's difficulty scales around you, and not at reinforcement learning's conquest of competitive strategy games, but at the architecture, training methods, and shipped examples of neural-network-driven agent behavior.
Key takeaways
- Behavior trees and finite state machines still run the vast majority of shipped NPCs; neural networks are used far more in the tools behind development than in the live decision-making of most 2026 releases
- Training an NPC neural network usually means self-play, imitation learning from human demonstration data, or a blend of both — not a single monolithic "AI brain"
- Real, shipped precedents exist: Lionhead's Black & White (2001) used decision trees and neural nets for creature learning, Monolith's F.E.A.R. (2005) used planning algorithms that produced emergent squad tactics, and Nvidia's ACE platform is now live in commercial titles like inZOI
- The technical bottleneck is compute cost per frame, not training difficulty — running dozens of concurrent inference passes at 60 frames per second is the real constraint
- "Information fairness" — restricting an NPC's inputs to what it could plausibly sense — is a recurring design problem separate from the learning method itself
From scripts to statistics: what actually changed
The old way of building NPCs is called a finite state machine. An NPC gets a fixed menu of states — Idle, Patrol, Alert, Attack — and a list of conditions that trigger transitions between them. It is easy to debug, cheap to run, and completely predictable once you learn the pattern. That predictability is also its ceiling: an NPC built this way can only ever react to situations its designer explicitly anticipated.
The next major step up, and still the dominant architecture in shipped AAA games today, is the behavior tree. Popularized by lead AI programmer Damian Isla's 2004 Game Developers Conference talk on Halo 2, a behavior tree organizes decisions hierarchically: leaf nodes are atomic actions like "fire weapon" or "take cover," and parent nodes are control logic — sequences, selectors, parallel branches — that get evaluated from the root down, every single frame, until the tree finds an action to run. Think of it like a flowchart that a very fast, very literal assistant re-reads from the top every sixtieth of a second. It scales better than a raw state machine because you can reuse and nest sub-trees, and it remains the backbone of most enemy AI in games shipping in 2026.
Neural networks are a genuinely different proposition. Instead of a human writing the decision logic, a network is trained on data — either recorded human play, self-play between AI agents, or a designed reward signal — and it learns statistical patterns: when does a player tend to dodge left, how aggressively do they push when low on health, which flanking route tends to end a fight fastest. That knowledge lives in millions of weighted connections rather than in a lookup table a designer wrote by hand. The practical result is NPCs that can produce behaviors nobody explicitly programmed, because the network generalized from examples rather than referencing an if-statement.
How a neural-network NPC actually gets built
Building a neural-network-driven NPC does not start at launch. It starts in a training loop that can run for millions of simulated matches before a single line of the behavior reaches a player's console.
What is imitation learning in game AI?
Imitation learning trains a network on recorded human play, teaching it to predict what a skilled or typical player would do in a given situation. A team led by Jeff Orkin at MIT built a system called the Restaurant Game specifically to study this: it recorded hundreds of human-played sessions of a simple restaurant simulation and trained NPCs to reproduce plausible, varied behavior from that data rather than from scripted branches (MIT Media Lab: The Restaurant Game). The upside of imitation learning is that the resulting behavior already looks human, because it came from humans. The downside is that the NPC can only be as good, or as strange, as the demonstrations it was trained on — it cannot easily discover a tactic no human ever tried.
What is self-play and why does it matter for NPCs?
Self-play flips the problem around: instead of learning from humans, two or more AI agents play against each other or against a shared environment, and the network updates its weights based on which behaviors led to better outcomes over millions of rounds. OpenAI's 2019 hide-and-seek research is the clearest public demonstration of this for game-like environments. Small teams of agents, given nothing but a reward for winning at hide-and-seek and access to movable boxes and ramps, discovered six distinct escalating strategies on their own over training, including barricading themselves inside shelters built from boxes and using ramps to climb over walls their opponents had built (OpenAI: Emergent Tool Use From Multi-Agent Interaction; arXiv:1909.07528). Nobody programmed "use a ramp to breach a shelter." The behavior emerged because it worked.
The same underlying architecture scaled up became OpenAI Five, a Dota 2-playing system trained through self-play that beat the reigning world champion team OG in a best-of-three match at The International 2019 (OpenAI Five). OpenAI Five was a competitive bot rather than a shipped game NPC, but the training recipe — deep reinforcement learning combined with long short-term memory networks, which let the network retain context across many previous game states rather than reacting only to the current frame — is directly reusable for NPCs that need to remember what a player did minutes earlier.
How much training data does an NPC neural network need?
There's no fixed number, but the OpenAI hide-and-seek agents trained across roughly 481 million games of self-play before the more advanced tool-use strategies emerged (MIT Technology Review). That volume is only feasible because the training runs entirely in simulation, at speeds far faster than real time, with thousands of environment instances running in parallel on cloud compute — nothing close to what a single studio's playtesting budget could gather from humans.
Real precedents: neural networks in shipped games
The idea of a learning NPC is not a 2026 invention. Lionhead Studios' Black & White, released in 2001, gave players a giant creature companion that used a combination of decision trees and neural networks to learn from how the player rewarded or punished its actions — slap it for eating villagers and it would learn to stop, over repeated feedback (Wikipedia: Black & White). It won recognition from the British Academy of Film and Television Arts and the Academy of Interactive Arts & Sciences for the sophistication of that AI, and it remains one of the earliest commercially successful applications of true machine learning to a game character, more than two decades before the current wave of interest.
Monolith's F.E.A.R. took a different but related path in 2005, and it's worth separating from neural networks specifically because it's frequently misattributed to them. F.E.A.R.'s soldiers used Goal-Oriented Action Planning, a technique adapted from 1970s-era STRIPS planning research, where each unit is given a set of possible actions with preconditions and effects and searches, at runtime, for the cheapest sequence of actions to satisfy a goal like "kill the player" or "retreat to safety" (Game Developer: Building the AI of F.E.A.R.). It is not learning in the machine-learning sense — nothing trains on data — but it produces adaptive-looking flanking and cover behavior because the planner recomputes a fresh plan whenever the battlefield state changes. Lead AI programmer Jeff Orkin demonstrated the system at GDC 2006, and it influenced a generation of AAA shooters.
Monolith's own Nemesis system, introduced in 2014's Middle-earth: Shadow of Mordor, is a third, still-distinct approach: procedurally generated orc captains who remember specific past encounters with the player and change their appearance, dialogue, and rank based on that memory — an orc who defeats you might return later with a scar, taunting you by name (Medium: Nemesis System). Warner Bros. secured a US patent (No. 10,926,179) on the system's core mechanics in February 2021, which is a significant reason competitors have not been able to build an equivalent memory system, regardless of whether they wanted to use neural networks or simpler rule-based memory to do it.
Where neural networks are genuinely live in 2026
The clearest current deployment of neural networks in shipped or near-shipped NPCs is not combat decision-making — it's dialogue and animation. Nvidia's Avatar Cloud Engine (ACE) combines a speech pipeline, the Nemo language-model toolkit, and RTX-accelerated rendering to let characters hold freeform, remembered conversations rather than picking from a dialogue tree. At GDC 2024, Nvidia demonstrated ACE-powered characters in a tech demo built with Inworld AI called Covert Protocol, where the player interrogates NPCs through open conversation rather than menu selections (Nvidia: Digital Human Technologies at GDC 2024). Nvidia's published partner list for ACE includes Convai, Ubisoft, Tencent, NetEase Games, and Chinese developer miHoYo, among others, spanning both dialogue tooling and, increasingly, autonomous behavior.
That expanded past dialogue at GDC 2025. Nvidia announced "ACE autonomous game characters," extending the platform to non-player teammates and self-learning enemies, with the life-simulation game inZOI shipping "Smart Zoi" NPCs whose personalities are meant to drive more context-aware reactions to their environment rather than scripted routines (Nvidia Technical Blog: RTX Advances at GDC 2025; Nvidia Blog: GDC 2025 AI and Neural Rendering). That is a meaningfully different claim from ACE's 2024 debut, which was framed almost entirely around conversation rather than in-game decision-making.
Ubisoft's La Forge research division has published separate work using reinforcement learning to train combat agents that discover flanking and cover-usage tactics during training without being told to, echoing the same self-play logic as OpenAI's hide-and-seek research but applied to a shooter-style test environment rather than a shipped release. Their Commit (Crowd Motion Matching) system, meanwhile, uses machine learning to blend motion-capture clips for background crowds so that hundreds of pedestrians in an open-world city move with individual variation instead of looping the same animation — a much narrower, more achievable application of the same underlying toolkit, and one that is already live in production because it only touches animation, not decision logic.
The emotion and memory problem: why NPCs still feel hollow
Movement and combat tactics turn out to be the easier half of the believability problem. The harder half is giving an NPC something that reads as an internal state — the sense that it remembers what happened to it and that memory shapes what it does next.
One common academic approach represents an NPC's internal state as a small set of continuous variables — a rough approximation of fear, curiosity, or hostility — that update based on the NPC's experiences and feed back into its decision logic. An NPC repeatedly attacked from behind might become measurably more cautious about turning its back to open doorways; one that was rewarded for aggressive pushes might become bolder over a session. This is conceptually the same trick Lionhead's Black & White used in 2001 for its creature, just applied to combat rather than companionship.
Insomniac Games built a lighter-weight but shipped version of the same idea into Marvel's Spider-Man, where enemies verbally announce internal state changes — "He's on the roof!", "I'm getting out of here!" — and visibly adjust tactics to match. It is not a neural network under the hood, but it targets the same design goal: an NPC whose outward behavior is legible as the product of an inner state, not just a lookup table.
Why does this matter more than raw combat difficulty?
Players tend to describe NPCs as "smart" or "dumb" based on whether behavior feels connected to context, not based on objective difficulty. A guard who reacts identically whether you're a stranger or someone who saved his life ten hours earlier reads as artificial regardless of how tactically sharp his aim is. Memory and legible internal state, even simple versions of it, do more for perceived intelligence than raw combat competence.
Information fairness: the problem every technique shares
Whether an NPC runs on a behavior tree, a GOAP planner, or a trained neural network, it faces the same design trap: if it can see information a real character couldn't plausibly know — the player's exact position through a wall, their remaining ammo count, their planned route — it stops feeling intelligent and starts feeling like it's cheating. Game AI developers call this constraint information fairness, and it means restricting an NPC's inputs to a simulated field of vision, hearing range, and memory of only what it has directly perceived.
This constraint gets harder, not easier, with neural networks, because a trained model can silently learn to exploit any signal present in its training data, including signals a designer never intended it to have access to. A network trained with full map data available, even if that data is nominally meant for internal bookkeeping, can learn correlations that produce eerily prescient behavior for the wrong reasons. Enforcing information fairness with a learned model means being unusually disciplined about what data the network is allowed to see during both training and live inference — not just at the interface layer, the way it's easier to guarantee with hand-coded rules.
Why most NPCs still don't use neural networks
The honest state of the industry in 2026 is that neural-network-driven decision-making, as opposed to neural-network-assisted animation or dialogue, is still the exception rather than the rule for shipped NPCs. Three separate constraints explain why.
| Constraint | What it means in practice | Where it shows up |
|---|---|---|
| Inference cost per frame | Running a trained network's forward pass for every NPC, every frame, competes for the same GPU budget as rendering | Open-world games with 50+ simultaneous NPCs |
| Predictability for QA | Behavior trees and GOAP fail in reproducible, debuggable ways; trained networks can fail in ways that are hard to reproduce or patch | Certification and console submission processes |
| Content risk | Generative and learned dialogue can drift off-character or produce inappropriate output that is difficult to catch pre-launch | LLM-backed NPC dialogue systems like ACE and Convai |
Table: the three practical constraints slowing neural-network adoption in shipped NPC decision-making, as of 2026.
None of these three is a research problem in the traditional sense — training better networks is not the bottleneck. They are production, quality-assurance, and compute-budget problems, which is a genuinely different kind of obstacle and one that tends to close on a hardware and tooling timeline rather than a scientific-breakthrough timeline.
What people get wrong about NPC AI
The most common misconception is treating "AI" in marketing copy as a synonym for neural networks. A large share of games advertised as having "smart AI" or "adaptive enemies" are running behavior trees or GOAP-style planners that were carefully authored by human designers to produce adaptive-looking results — F.E.A.R.'s soldiers are the canonical example, and they remain, twenty years later, one of the most-cited "smart AI" examples in the industry despite containing zero trained neural network weights.
A second common error is assuming a trained NPC network gets smarter the longer any individual player plays. In almost every shipped implementation, training happens entirely before release, in a studio's development pipeline, using self-play or recorded demonstration data. The network you fight in the shipped game is frozen; it does not continue learning from your specific playthrough unless a developer has explicitly built and shipped an online learning system, which remains rare because of the QA and content-risk problems in the table above.
A third error is conflating procedural generation with learning. Shadow of Mordor's Nemesis system generates unique orc captains and gives them persistent memory of past encounters, which feels adaptive and personal, but it is closer to a sophisticated database of flags and traits than to a trained model inferring behavior from data. Both approaches can produce the feeling of an NPC that "remembers you." Only one of them is machine learning in the technical sense, and conflating the two makes it harder to reason about which technique actually solves a given design problem.
What this means
The NPCs that will feel different over the next few years are less likely to come from a single breakthrough model and more likely to come from studios mixing techniques the way F.E.A.R., Black & White, and Shadow of Mordor each picked the single tool that solved their specific problem two decades ago. Behavior trees and planners will keep running the split-second tactical decisions because they're cheap, debuggable, and certifiable. Neural networks and large language models will keep expanding their footprint in dialogue, animation, and crowd behavior, where the failure modes are more forgiving and the compute cost per NPC is lower. The real shift worth watching isn't "NPCs get a brain" — it's which studios figure out how to combine a planner's reliability with a trained model's capacity to surprise, without either one cheating the player or costing more compute than the rendering budget can spare.
FAQ
Q: What is the difference between traditional NPC AI and neural network NPC AI? Traditional NPC AI uses hand-coded rules in finite state machines or behavior trees, where a designer specifies every possible transition and action. Neural network AI trains a model on data — recorded human play, self-play, or a designed reward — so the NPC can produce behaviors that were never explicitly written into code.
Q: Do current games actually use neural networks for NPC decision-making? Mostly not yet for core combat decisions, though the exceptions are growing. Neural networks are common today in tools used during development, such as Ubisoft's crowd-animation blending, and in shipped dialogue systems like Nvidia ACE and Convai. Nvidia's 2025 "autonomous game characters" expansion, live in inZOI, is one of the first shipped examples reaching into broader NPC behavior rather than just conversation.
Q: Was F.E.A.R.'s AI a neural network? No. F.E.A.R.'s soldiers used Goal-Oriented Action Planning, a symbolic planning technique with roots in 1970s AI research, not a trained model. It produces adaptive-looking flanking and cover behavior through runtime search over a fixed set of hand-authored actions, which is a genuinely different mechanism from learning.
Q: What was the first game to use real machine learning for an NPC? Lionhead Studios' Black & White, released in 2001, is one of the earliest and most widely cited commercial examples. Its creature companion used decision trees and neural networks to learn from player feedback, and the system won recognition from the British Academy of Film and Television Arts and the Academy of Interactive Arts & Sciences for its sophistication.
Q: Can neural network NPCs cheat by accessing information they shouldn't? This is a known design concern called information fairness. A properly designed NPC, learned or scripted, should only receive inputs a realistic character would have, such as a simulated field of vision and hearing range. Trained networks make this harder to guarantee because they can learn to exploit any signal present in their training data, including signals that were never meant to leak into gameplay decisions.
Q: Does a neural network NPC keep learning while I play? In almost every shipped game, no. Training happens before release, during development, using self-play or recorded demonstration data, and the model is frozen at launch. Continuous online learning from individual players remains rare because of quality-assurance risk and unpredictable failure modes.
Q: Is the Nemesis system in Shadow of Mordor an example of a neural network? No. It is procedural generation combined with persistent memory flags attached to individual orc captains, not a trained model inferring behavior from data. It produces a similar feeling of personalization to a learned system, which is why the two are frequently confused.
Q: What was OpenAI's hide-and-seek experiment and why does it matter for games? It was a 2019 research project in which small teams of AI agents, trained purely through self-play with a reward for winning at hide-and-seek, discovered six escalating strategies on their own, including building shelters from movable boxes and using ramps to breach them. It matters for games because it demonstrated that simple reward structures, given enough training time, can produce tactical behavior nobody explicitly programmed — the same underlying principle studios are now exploring for combat NPCs.
Q: Why don't more open-world games use neural networks for every NPC? The main blocker is compute cost, not research difficulty. Running a trained model's inference pass for dozens of simultaneous NPCs every frame competes directly with rendering for the same GPU budget, which is why current uses tend to focus on dialogue or animation for a smaller number of characters rather than mass-scale combat decision-making.
Q: What is imitation learning in the context of game NPCs? Imitation learning trains a network to reproduce patterns found in recorded human demonstrations rather than learning purely through trial and error. MIT's Restaurant Game project used this approach, recording hundreds of human-played sessions and training NPCs to generate plausible, varied behavior from that data instead of from scripted dialogue branches.
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

Why Sandbox Games Like Minecraft Make Us More Creative
Minecraft has no story, no combat requirement, and no ending, yet it outsold every game ever made. The psychology of unstructured play explains why open-ended tools beat scripted content.

History of Video Games: From Pong to Today
From a blinking dot bouncing across a black screen to a $180 billion global industry — the story of video games is a business history of crashes, quality-control rescues, console wars, and platform shifts that reshaped how the world plays.

Neural Networks and Physics Simulation: How AI Is Rewriting the Rules of Game Engines
Neural networks are replacing traditional physics equations in game engines, enabling more realistic simulation of fluids, cloth, destruction, and character motion at real-time speed.

AI-Powered Game Testing: How Machine Learning Is Transforming Quality Assurance
AI testing agents can play through games thousands of times overnight, finding bugs and balance issues that human QA testers would take months to discover.

AI-Generated Game Assets: How Machine Learning Is Transforming Game Art Production
AI art generation tools are reshaping game development pipelines, enabling smaller teams to produce AAA-quality assets faster than ever before.

Machine Learning and Procedural Level Generation: Infinite Worlds by Design
Machine learning is transforming procedural generation from random noise into intelligent design, creating game worlds that feel handcrafted yet never repeat.