Tough is not the same as smart
11 min read
By Eduardo Orellana ·
Bungie, on the first Halo, kept the AI identical and raised the damage. Players calling the aliens very intelligent jumped from 8 percent to 43.
The health bar was wearing a mask
The games cited for great AI are often the games whose enemies hit hard and refuse to die. FEAR, Halo, the first Half-Life: the behavior really is clever, and it shares a duller trait. The enemies last long enough for you to see the cleverness. Bungie checked this on the first Halo. Two builds, identical AI. In one, the aliens died fast and hit softly. In the other, they lasted and hurt. The share of players calling them very intelligent went from 8 percent to 43. The mask was the numbers.
That does not mean intelligence is fake. It means intelligence the player cannot perceive is a private hobby. Good AI is readable, consistent, and often a little generous. It shows you what it knows. It wants something besides your death, or it holds still so you are the one who must advance, the way Doom 2016 had to learn. An ally who is stupid in a way you cannot predict is worse than an enemy who is. Tune what the player can read. The hidden genius can wait.
Smart enemies are not the whole story
Toughness gets mistaken for intelligence, so the games people cite as having great AI are often just the games with enemies that hit hard and refuse to die. The usual three are the replica soldiers of the original FEAR, the aliens of the Halo series, and the marines of the first Half Life. Their behavior really is clever, and Halo 2 and FEAR introduced techniques still in use today. But all three also share something duller: enemies that come after you and carry enough health to keep the fight going.
Bungie proved how much of the effect comes from that pressure alone. During work on the first Halo, the studio ran a playtest with two builds that used identical enemy AI. In one, the aliens did less damage and went down fast. In the other, they did more damage and soaked up more hits. The share of players calling the enemies "very intelligent" went from 8 percent to 43 percent, on the strength of the numbers alone.
That trick does not transfer to every game. id Software learned as much on Doom 2016. The early version had enemies that ran the player down, and the result was a player who retreated. "We'd end up in these situations where you would instantly start backing up," said director Marty Stratton. So the team told enemies to hold position more often and handed the forward momentum back to the player. AI is like every other part of design: it has to serve the experience you are actually building.
Relentless aggression suits the Xenomorph in Alien: Isolation. Drop the same behavior into Batman: Arkham Asylum and it falls apart, because nobody gets the jump on Batman. Lethality alone, then, is not what makes AI good. The rest of this comes down to whether the AI is readable, fair, surprising, and genuinely useful to the game around it.
Good AI quietly tilts the odds your way
Good AI cheats on the player's behalf, and does it so quietly that nobody notices. The obvious kind of cheating runs the other way: dropping a bucket on a shopkeeper's head in Skyrim and emptying the shelves. The useful kind is invisible. Step out of cover in an Uncharted game and enemies start with a zero percent chance of hitting Drake, which buys you a moment to line up shots.
Far Cry gets to the same place by limiting how many enemies may fire at you at any one moment, which quietly raises your odds of walking out of a firefight. The Arkham games instruct enemies not to turn around during predator sections, so Batman can close the distance behind them.
None of this is meant to be visible. It would, however, be conspicuous by its absence. These biases are what make a fight feel fair while the rules underneath lean firmly in the player's favor.
Good AI shows the player what it knows
An AI that thinks in private might as well not be thinking at all, so good AI publishes its state. The workhorse is the bark, a one-line vocal clip where a guard on patrol mutters "Sounds like someone's over there..." or "Must be nothing". Animation, body language, vision cones, light and sound meters, and ghost markers showing where an enemy last spotted you all do the same job. How much you reveal is a per-game call, but the player needs a channel of some kind.
Personality is another route. The colored ghosts in Pac-Man and the leaders in Civilization's single-player modes each behave with their own quirks, and developers have found that this reads to players as intelligence. It also rescues work that would otherwise go unseen. A guard might have rich perception and decision making, enough to register that a door on their route is now open, and the player would never know it unless the guard says, "Did I leave that door open?"
Treat those signals as mechanics rather than decoration. They are the feedback a player uses to work out what the AI has noticed, what it is likely to do next, and how to get ahead of it.
Good AI behaves consistently
Consistency, not surprise, is what makes AI worth planning around. Halo tech lead Chris Butcher said as much in 2004: "The goal is not to create something that is unpredictable. What you want is an artificial intelligence that is consistent so that the player can do things and expect the AI will react in a certain way". Consistency is what unlocks intentionality, which Far Cry 2 designer Clint Hocking defined as "the ability for the player to devise his own meaningful goals through his understanding of the game dynamics".
A red barrel teaches this in one shot. You fire at it, it detonates, and you leave with a rule you can carry: red barrel, explosion, and an explosion is something you can aim.
Enemy behavior has to be that dependable. When guards reliably carry dropped weapons back to a crate, or cutting a generator reliably sends someone to investigate, the player has raw material for plans, decoys, and ambushes. Strip the reliability out and the satisfying plan becomes impossible to make.
Butcher used a Grunt to illustrate it. Sneak up behind one and it flees. "It would be bad if they only ran away half of the time, because then the player can build a plan that will only work half of the time". Bungie's answer was predictable actions leading to unpredictable outcomes. "The Grunt will always run away," Butcher said, "but you don't necessarily know where he'll run away to".
Consistent is not the same as easy. Spelunky's enemies follow scripts that are close to fully deterministic, which ought to make them trivial to dodge or kill. Then they show up in numbers, across different terrain, bumping into each other and into everything else, and you have Spelunky.
Good AI plays with the same systems you do
The AI gets more interesting the moment it can touch the systems the player touches. A Breath of the Wild enemy will not simply march at Link and swing. It might sprint for a dropped weapon, hold a wooden club in a fire, boot a bomb back at you, or pick up another monster and throw it.
What sells the intelligence here is awareness of the surroundings. A Bioshock enemy that breaks off mid-fight to reach a health dispenser looks like it values its own survival and has the player's toolkit available to it. It also hands the player a counter: rig the dispenser and wait.
Systems access turns into indirect tactics. You can talk an enemy into fighting on your side in Prey, or maneuver one into striking a Cucco. If that maneuver needs a name, "chicken-boning an enemy" will do.
Good AI responds to how you play
Good AI notices the player and adjusts. The cheap version is guards growing visibly rattled as you thin their numbers in the Batman games. The elaborate version is Shadow of Mordor, where Orc captains are generated at random with names, abilities and relationships, then hold on to the memory of every encounter with the hero. Flee a fight and the Orc may raise it when you next meet: "Not letting you run this time! I's gonna finish it!" Personal stories come out of that.
Watching the player can also drive behavior directly. It does not have to reach the sophistication of the Shadow Fighters in the newer Killer Instinct, or Forza's Drivatar system. There, Microsoft models how you drive and spins up an AI double to race or fight in your place.
Metal Gear Solid V does it plainly. Enemies count how often you take headshots, how often you clear a base unseen, how often you come in after dark. Then they answer: helmets appear, traps get laid, night-vision goggles come out.
This is not learning in any real sense. The responses are authored in advance and swap in once the player crosses a threshold. The point is to stop one comfortable strategy from carrying you through every base in Afghanistan.
Alien: Isolation runs the same play, granting the Alien new abilities as the hours accumulate. The Xenomorph reads as though it is studying you, and the game keeps its edge deep into a long runtime.
Adaptation can also be aimed at mood rather than tactics. The AI director in Left 4 Dead is the famous case. It watches each player's condition through health and encounters with special infected, and when the team looks comfortable it thickens the horde. Then it backs off and lets everyone breathe.
The idea has a long history. Pac-Man used a version of it. "I felt it would be too stressful for Pac Man to be continually surrounded and hunted down. So I created the monsters' invasions to come in waves," said designer Toru Iwatani. The ghosts alternate between hunting the player and drifting off toward the maze's four corners.
Good AI wants something besides killing you
A world feels alive when its inhabitants have business of their own. Rain World's animals hunt for food and squabble with rivals over territory, and there are moments when the smartest thing you can do is leave them to it.
STALKER: Shadow of Chernobyl works on that principle, or is meant to. Bandits form plans and then move through the wasteland alone or in packs to see them through. Walk the wrong way and you can wander into a pitched battle that started because two rival factions happened to meet.
In practice the AI is buggy, and keeping characters active outside the player's immediate area takes mods. But the ambition behind STALKER's A-Life system still stands out, and more games should be attempting something with that much intent behind it.
Waking Mars points at another version of the same idea. It is an absorbing science fiction indie about growing biodiversity beneath the surface of the red planet. Once you learn how its plants and creatures respond to one another, you can leave behind self-sustaining ecosystems that go on living and breeding while you explore somewhere else entirely.
Allies need good AI too
Enemies get all the attention, and meanwhile the friendly characters are frequently hopeless. A game can have superb combat encounters and still saddle you with allies who are dumb as dirt. One common fix is to cheat and make the companion invulnerable, as with Elizabeth in Bioshock Infinite, who simply cannot be hurt in a fight. Set against the history of escort missions, that is a defensible call.
Allies can do more than walk behind the hero. The Last Guardian gives you Trico, a huge beast who will deal with enemies for you and who is also frightened of stained glass windows, which you can break. Cooperation becomes the mechanic. It can be maddening, partly because Trico is designed to ignore roughly half your instructions, though that is also what sells him as an animal rather than a tool.
Event[0] took a different angle. Developer Ocelot Society drew on internet chatbots to build a game where you hold a conversation with an artificial intelligence and solve the puzzles of a derelict spacecraft together.
Then there is Final Fantasy XV, where Prompto, one of your road trip companions, shoots Instagram-style photographs along the way. Certain moments trigger a shot, and sometimes he just feels like taking one, and later you sit down with an album of them. The gameplay value is close to zero. It is still a lovely record of your particular run through the game, and it does a great deal for who Prompto is.
AI is a design problem as much as an engineering one
Better AI technology is still worth chasing. Visibly stupid decisions break the fiction, and there is little satisfaction in outplaying an opponent who is obviously not thinking. Developers should keep advancing the technology and keep authoring more nuanced enemy behavior.
The trap is treating AI as engineering alone. It is a design problem too, and the right answer differs from one game to the next. Which is also why it is hard to settle on paper: you build the behavior, run the game, and watch how it actually plays before you decide whether it is any good.
More games about fighting tactical squads of aggressive enemies would be welcome, and something has gone wrong when plenty of modern shooters still trail a campy 13-year-old game. That is a gap worth closing, but it is not the main prize.
Naughty Dog spent time on complex AI behaviors during Uncharted 4 before landing somewhere simpler. Enemies, in designer Matthew Gallant's words, "spread out in a layout, looking human and smart, and moving in ways that are mildly predictable so the player has some ability to sneak up behind them". Because the goal of the AI "isn't to find the player. It's to present interesting gameplay".
Build it in Flockbay
In the Flockbay app, build one enemy who shows you what it knows, a glance or a warning, before it acts. Play it, then play a version with the same brain and no tell. If the second feels cheaper rather than smarter, you have your answer. Keep the tell.
An AI stealth game maker makes the tell essential. A tactical shooter template is the fight. One enemy.
Keep reading
- A puzzle is two rules in conflict
- A guard must show what he knows
- The camera serves two masters
- Put legible, forgiving enemies in a shooter of your own with the AI shooter game maker
Puzzle design leans on the same readability: rules the player can learn, assumptions they bring, and the revelation that pays both off. Worth a look before you tune your own enemies.
Keep going with another design note