10 Best Enemy AI In Video Games
Pac-Man has some of the most impressive video game AI known to man.
Competent — advanced, some might even say — AI may have only become a hot topic in technology, but it's not a new concept by any stretch of the imagination. Something has to govern the behaviour of every non-player character in our favourite video games and it's all too easy to overlook just how much skill is required to create something convincingly human.
Only if artificial intelligence fails to perform its job properly is its existence noteworthy, else it's completely invisible; hand-waved away as complimentary to immersion.
That being the case, it's only fair to give some of the best examples of intelligent antagonists their due, many of which aren't even tangible aggressors, but a concept made manifest with code. Left 4 Dead is a prime example of the latter.
There's nothing particularly noteworthy about how the hordes of special and ordinary undead behave in Valve's team shooter, but they're not the real enemy, anyway. That's The Director, an AI that acts behind the scenes and curates a custom gameplay experience based wholly on how players engage with the digital world around them.
10. The Director - Left 4 Dead Series
Faceless enemies are the scariest of all, which is why, even compared to its creature collection of Tanks, Boomers, Witches and Hunters, Left 4 Dead's benevolent Director is a far more frightening foe. Intangible to players, Valve's aptly named AI acts as a guiding hand for the undead horde, endlessly crunching numbers and calculating possible scenarios behind the scenes, all in the name of variety.
Despite every entry in the trilogy having but a handful of static stages, no two attempts ever play out identically. Think you or a member of your quartet has a lock on where restoratives, ammo, or a nasty special Infected is lying in wait? No, you don't. The Director has already learned from your last tour on the merry-go-round what not to do.
Every choice it makes depends on your actions, down to health status, team skill, and location. These variables are never the same, nor is the path destined to unfold before you.
It's also a little-known fact that the Director has a sibling. Unlike its counterpart, which you should consider Left 4 Dead's game master, the other is responsible for dictating audible cues and soundtrack changes, making tweaks on the fly to deliver a bonafide, personally tailored experience.
9. Jack Baker - Resident Evil 7
Despite not being Resident Evil 7's primary antagonist, the Baker family's patriarch is unquestionably its most memorable. Capcom mercilessly threw the aging formula for its flagship survival horror in the bin with RE's seventh installment, preferring to wipe the slate clean and start anew with fresh ideas. Jack was the first in the studio's obsession with marrying its storied IP with AI, the pairing resulting in a murderous, relentless Mold Man who'd stop at nothing to give Ethan Winters a Glasgow smile and a lot more besides.
His ability to stalk RE7's unwitting hero is notably more limited than, say, a certain Tyrant we'll say hello to later, but Jack's compact stomping ground arguably works in his favour. To say nothing of the liberating endorphin rush felt when finally escaping the Baker family home, its claustrophobic hallways and adjoining rooms deny any sense of security. This is Jack's realm; the everyman-turned-lunatic's presence is always looming and your only option when his face slips through a tentatively-opened door is to haul arse in the other direction.
Admittedly, that scare factor is diminished on repeated playthroughs due to the heavily scripted nature of certain sequences, but our boy has more than earned lip service as the progenitor of nightmares Capcom would later create.
8. Cannibals - The Forest
The Forest asks one simple question of the player. What if you found yourself in a scenario akin to The Hills Have Eyes but weren't immediately clear of your cannibalistic neighbors' intentions? Eric LeBlanc (and by extension, you) has to navigate that exact conundrum while searching for his son on a remote peninsula and repeatedly questions his morals at every turn.
To deliver on that ambiguous narrative, Endnight endowed The Forest's collective antagonists with varying intentions beyond cold-blooded murder. Hesitation, indirect communication, and other non-violent actions such as surveillance are all observable behaviours — these aren't people driven by primal, violent instincts. They're just different. Well, mostly, at least.
Eric will find himself in escalated circumstances on occasion, but even then, the tribe can be seen displaying care for their own by tending to the wounded or even surrendering if outnumbered or outgunned. Everything coalesces to form an experience that, unlike its contemporaries, makes The Forest feel like a more authentic representation of what would happen should one find themselves in the arse end of nowhere confronted with the unknown.
7. The Xenomorph - Alien: Isolation
Besides being the best piece of spin-off media to ever come out of the franchise, Alien: Isolation's other most notable achievement is pulling off one hell of an illusion.
It might feel like the Xenomorph stalking Amanda Ripley's every step aboard the Sevastopol space station is learning from her behaviour in real-time, but it's all smoke and mirrors. Creative Assembly gameplay designer Gary Napper discussed how he and the team managed to pull off such a feat in various interviews shortly before Isolation's release; the revelation is fascinating.
The Xenomorph's movement 'decisions' are governed by AI to a degree, but it doesn't learn directly from external stimuli, i.e. player behaviour. Checking common hiding places, building resistance to weaknesses, and choosing efficient ambush opportunities.
These are all complex actions governed by an invisible skill tree that unlocks throughout the campaign's runtime so that when it comes time to escape, Sevastapol's apex predator seems as though it has perfectly adapted to its surroundings.
To exacerbate the overwhelming sense of unease, these faux-learned abilities don't always trigger at the same time on repeat playthroughs. No AI is unscripted, but Creative Assembly's efforts come oh-so-close to making science-fiction reality.
6. Nemesis System - Middle-earth: Shadow of Mordor/War
Every action has a consequence in Monolith's Middle-earth games. Well, almost.
Sauron's not going to get an inexplicable power boost if you pick a random flower in the barren fields of Mordor, but how the player interacts with his minions as Talion will have a knock-on effect, either immediately or hours after the fact. That's thanks to Monolith's unique Nemesis System, which procedurally reacts to seemingly inconsequential events.
The biggest, meanest, and ugliest of Sauron's forces, the Uruk, aren't just footsoldiers to be slaughtered en masse. There are plenty of nameless orcs meandering around the open world, but many have names, abilities, and a reputation to uphold and form the backbone of their dark master's armies.
Win or lose to any of them, and they'll not only remember prior events but waste no time reminding Talion of what transpired last they met in a spittle-filled rant.
Some will want revenge for previous transgressions while others will boast about their promotions to captain for having kicked your arse. What comes around goes around.
Not before or since has any contemporary managed to ape Monolith's efforts, and considering publisher Warner Bros. went so far as to patent the entire thing to deter copycats, we're unlikely to enjoy a personalized adventure quite like it again.
5. Mr. X - Resident Evil 2
Look at that bald, wrinkly-skinned bastard. Isn't he just a snack? No? How about if the trenchcoat was stripped off and replaced with a mankini?
Mr. X may have gained an exposure boost thanks to such fan edits flooding modding forums following Resident Evil 2's release, but the man (zombie, monster, abomination? Take your pick) is wholly deserving of his status as a self-made celebrity.
Capcom has never provided a detailed breakdown of how Mr. X's actions are governed, but suffice it to say that he's a clever bloke despite being (un)dead. What we do know, is that the well-dressed Tyrant's patrol routes are initially largely randomized if he's not actively chasing Leon or Claire.
Shooting, opening/closing doors, running, and generally making a ruckus are all actions that can tip Mr. X off to your precise location. Humorously, you won't consciously decide to keep sound to a minimum once Umbrella lets loose its new toy. So unnerving are the sounds of his thudding footsteps, that you'll naturally resort to behaving as one would in real life if they were being doggedly pursued by an impervious wall of muscle.
He's also 100% a big cheater. Numerous YouTube videos documenting Mr. X's uncanny ability to teleport from one side of the station to another are out there. The illusion is shattered a little as a result but look, his noggin houses a non-operational brain, so cut him a little slack, yeah?
4. Ghosts - Pac-Man
Look, hear me out.
Pac-Man looks, plays, and sounds like an antique, but it has a remarkably complex set of rules that covertly govern its AI. What, you thought the enemies of everyone's favourite split tennis ball just recklessly hunted their prey with wild abandon? Well yes, but also no. Inky, Blinky, Pinky and Clyde (don't ask which one is which) all have distinct laws that govern their behaviour.
If Pac-Man nibbles on a Power Pellet and triggers Scatter mode, the quartet of ghosties will all scarper to the same locations every time. Those are the basics; some board states — like Pac-Man guzzling a specific number of pellets — will piss Blinky off something fierce and send them into 'Angry' mode. Clyde, something of an introvert, will gravitate toward his quarters in the lower left if not actively on the hunt.
Don't believe me? Literal essays dissecting the intricacies of Ghost movement down to a specific pixel are out there. Namco's '80s gaming icon is the definition of easy to learn; difficult to master.
3. Foot Soldiers - Metal Gear Solid V: The Phantom Pain
Hideo Kojima falling out with Konami during development of The Phantom Pain would ultimately result in a noticeably unfinished product that fell short in some regards, but not where AI was concerned.
Snake's tour of Afghanistan to sniff out XOF's leader would come to an abrupt end but the journey to get there represents some of the best stealth gameplay money can buy thanks to unconventionally smart enemies and an open-ended approach to progression.
Even stumbling upon a non-critical base to secure resources is a battle of attrition if you fall into the trap of adopting the same strategy ad nauseam. Breeze through a handful of compounds with little resistance and subsequent strongholds will increase their numbers to compensate.
Prioritize headshots, and you'll suddenly find that even rank-and-file peons have donned helmets to better protect their craniums.
The sense of escalation can be felt with every mission. If nothing else, the system proves how complementary to immersion semi-competent cannon fodder can be. No-name, expendable bodies don't have to be a glorified shooting gallery.
2. Everything - Rain World
Rain World isn't a fair game. Its difficulty can be maddening, in fact, but that's kind of the point.
You're supposed to feel helpless in this inhospitable hellscape that eats cutesy Slugcats (that's you) for breakfast. It's not hyperbole to say that everything in Rain World is out to kill you. From plants and birds to lizards and marine wildlife, Slugcats are a favourite on the dinner plate of anything with a digestive system.
Contrary to usual platformer fare, the difficulty in Videocult's cult-favourite indie hit comes not from precision per se, but from learning, usually through trial and error, how each of its ecosystem's megafauna behaves. Dynamic AI governs it all.
Imagine, if you will, Dr. Grant and his fellow paleontologists as they came face to face with living dinosaurs in Jurassic Park. Like them, you're going to be learning by watching, the quirks of every living organism that crosses your path.
From scavengers who attack only out of fear to multiple colour variants of Gojira-level lizards who hunt through sound, sight and God knows what else, you will die in Rain World. Again and again.
1. Replicas - F.E.A.R.
We're just shy of F.E.A.R. being two decades old and still, no other shmup has come close to surpassing or even meeting the quality of its intricate AI. The first entry in Monolith's series is legendary for that very reason.
Thematically apt, considering F.E.A.R.'s primary antagonist; Replicas, innumerable clones all under the control of shady telepath Paxton Fettel, share more than the same face. To flush out the player character, these dogs of war can converse with each other and form strategies in direct response to their quarry's current status and location.
Hunker down under cover, and Fettel's army will flank your position. Try to blitz your through every threat and you'll be met with heavy suppressive fire. These strategies aren't employed as an arbitrary response, mind you.
Either of those situations can play out in wildly different ways. If you expect a flanking maneuver, NPCs could instead decide the best course of action is to retreat and set up an ambush by constructing a blockade from environmental objects. You'll even hear Replicas barking orders at each other on occasion that may or may not be acted upon, just to keep the player guessing as much as possible.
It's funny. Alma may be the poster child for F.E.A.R., but she's far from its most dangerous threat. Here's hoping Monolith revisits the series one day. Imagine what it could do with today's hardware.