As technology becomes more and more accessible and the barrier of entry to make games diminishes, making high-realization, realistic games, is something any small team or solo dev can aim for. Realistic and immersive games, though coming with their own added complexity aren’t something reserved for AAA teams anymore, and successes like Valheim are proof of that.
But making such games on a budget is quite a feat: assets production, scope, optimization, 3C, lighting, debugging… The number of challenges grows exponentially. And one of them concerns AI and, more specifically, enemies.
In turn-based games like Into the Breach or Slay the Spire, or very gameplay-centric ones like Hades or Hyper Light Drifter, designing enemies’ AI will be done with an overarching goal in mind: to provide the best possible challenge for players. Enemies could completely ignore the player and work through their own combat pattern, or be comprised of 2 looping actions, it doesn’t matter: they are, simply, ingredients in the gameplay and advertised as such.
But what if you wanted to push this further? For enemies, not only to be challenging, fresh, and fun to play but also to be smart (or look smart?). How do you give enemies a brain? How do you make them believable?
This, is an extremely complex challenge for any AI designer, especially working on the kind of games discussed above: games like Skyrim or The Witcher pride themselves on having believable worlds and contain dense bestiary of creatures that almost always are human-like or presented as smart creatures with complex cognitive abilities. Having smart and believable enemies is thus key for them in selling their world.
Giving a brain to our creatures

Before even starting, let’s frame our topic. AI systems can be among the most insane systems to create, requiring hundreds of developers for years to be perfected. The Assassin’s Creed series, for example, is famous for its shockingly complicated meta-system of AI, not only managing NPC behaviors and overriding their personal AI on a global scale but also tracking hundreds of thousands of entities and their relationships: resources allocation, spawn/despawn, navigation routes, etc.

Watch Dogs: Legion also implemented an insanely deep level of AI, where every NPC in the game is generated with its own unicity (one that adapts to the current state of the player), but also its schedule, unique life, behavioral traits, connections, etc. This leads to a deep believable world, which is critical for WD:L as this aspect is at the center of their USP.

And talking about overkill systems, it would be impossible not to mention Machine Learning which is all the craze these days. The promise sure is tempting: an ever-adapting AI, learning from and with the player, perfecting its behavior and patterns to provide a uniquely tailored experience for each player. But, ignoring the danger it poses to the player’s learning, control of the experience, and sense of mastery, implementing such approaches is complexifying systems and debugging in an exponential way.
So the question we should legitimately ask ourselves is the following: do we really need that level of R&D and development to make an AI appear intelligent and believable? No, we don’t, and if you found yourself in this article today you would probably lack the resources to go that far anyway.
So what are we going to talk about then, you ask? Well, we are going to talk about how to make our enemies appear as believable and intelligent as possible using what we have at our disposal: Signs and Feedback, 3D models, combat strategy and decisions, etc. In short: a collection of tips and tricks to create AAA enemies without breaking the bank (or our scope). But first, let me repeat myself…
Games are player-centric
We discussed this topic here multiple times already (like in the article Keys to Rational Enemy Design): the games we create exist only because, and for, the player. An enemy or an NPC doesn’t have a reality outside of the one used to accomplish its roles regarding the player.
This fact is actually extremely important regarding our topic at hand and for multiple reasons.
Enemies simply need to “appear” smart
This sentence will be at the heart of this article: an enemy exists in relation to the players and will be perceived as such by them. This means that enemies will be judged in their reaction (or lack of) to the players’ actions. Let’s take examples of enemies’ behaviors commonly perceived as “smart”:
- The player is under-cover, completely protected, for a long time: enemies may want to flank the player or throw a grenade to nullify the cover possibility.
- The player is using an extensive amount of firepower: enemies may want to break their formation, spread, and get behind the nearest cover (self-preservation).
- The player is attacking a group of enemies in melee range: enemies should position properly around the player to maximize their threat and push their attack advantage.
You probably noticed that all of these actions are triggered in response to players’ actions. Enemies’ intelligence is less about how they will devise strategies on their own and more about how they will adapt and react to players’ actions which will change the initial situation and battlefield.
Key #1: Enemies will feel smart if they react properly to player’s actions, or lack of.
Players won’t enjoy truly smart enemies
There is this story of a designer, working on an FPS, that actually managed to create a very smart AI with his team: their enemies would be extremely good at hiding their movements and applying squad tactics in the chaos of a firefight. An example he is giving is about enemies flanking the player while others focus the player’s attention: the player was completely focused on the immediate threat, which would then give an opportunity for other enemies to sneak behind the player undetected. Sounds like a pretty legit squad tactic to me!

But players hated it: they accused the game of cheating, spawning enemies behind the player to fake an advantage. This led players to withdraw in tight spaces to try and push the AI in its most underperforming situations: corridors, complex level geometry, navigation, height differences… Ultimately, by exploiting the AI, players got a sub-par experience and considered the AI brainless.
Why did this scenario even happen in the first place? Simply because players do not like to be outsmarted. Because players didn’t see the enemies flanking them, thus allowing them to plan against this strategy. Because a game needs to be fair and open.
Players will always have a biased approach to enemies: they will always be asking for smarter enemies without realizing that this would go directly against their fun. Players will always want to have the strategic upper hand, and to be able to adapt to a difficult, but known, situation.
Key #2: Enemies will feel smart if players can perceive them being smart.
But what does “smart” really mean? Is self-preservation smart? Group tactics? Pushing players to make mistakes? This isn’t a straightforward answer. And before even talking about how we can make our enemies smarter, we should have a good look at our enemies and decide what “smart” means for them.
Own your enemies fantasy
In the first part of this article, we kept repeating that enemies need to “appear” smart, and that players need to “feel” this intelligence. This is because at the root of this topic lies our players’ expectations.
Our players have spent decades building precise mental models and archetypes shaping their perception and expectations of an enemy, fueled by countless books, movies, and games. The moment they see an enemy for the first time, they already expect it to behave in a certain way, and its perceived intelligence will be judged based on how well it fits their preconceived framework (and potentially expands on it).

Let’s take pretty straight-forward examples:
- Zombies: these enemies are seen as basic and predictable ones. They have no sense of self-preservation and are entirely shaped by their rage and hunger, which will translate into straightforward, frontal attack patterns. They shouldn’t display any sense of strategy.
- Robots: the closest link between developers and players. They will follow their programmed behavior perfectly. They have neither a sense of self-preservation nor emotions. They may display complex strategies, but always at the limit of their program. They may be exploited.
- Enchanted: focused on one simple goal: the one given by their master (protect a zone, destroy, build…) They will display basic strategies to find ways to resume their task as fast as possible. No self-preservation either.
- Animals: Usually seen as limited in intelligence (particularly for pests like rats that often completely ignore their real-life, smart counterpart). A clear sense of self-preservation and displaying basic emotional states (rage, fear, intimidation…).
- Etc.
This categorization is of course very subjective, but its existence is so anchored in the subconscious of our players that ignoring it would be a mistake. There is a reason why so many new designers and developers create zombie games: they are arguably among the easiest believable enemies to design!
Key #3: use players’ mental-models and expectations of your enemies to frame their level of intelligence and complexity.
But what if our game contains human enemies (or anything human-like, such as orcs, dwarves, or elves) or evolved entities (dragons, beholders, mind-flayers, gods)? We won’t be able to settle for a sub-par, basic AI, and we will really need to make them shine. But how can we do that without investing years of R&D, or creating impossible-to-debug decision trees?

Well, we will fake it! But fake it smartly, using all the shortcomings of our players’ judgment and ability to project what they experience.
And this will pass by a very important first step:
Key#4: the best way to make an enemy look smart is to ensure it doesn’t look stupid!
This sounds like the worst advice I’ve ever given, but there is an important reality in it: players will always fill the holes in what they experience and try to explain the world around them. I can’t count the times I heard a player in a playtest falsely explain to me how my enemies are super smart because they did X while the player was doing Y: “They hid to ambush me!”, “They used their weak one as bait!”, you name it. And this is exactly what we want to create! A believable world, full of believable enemies. In the end, it doesn’t matter if this reality is true or not as long as players embrace it. Their perception becomes the game’s reality.
But this illusion can be so easily broken: the moment an enemy or NPC, that should be smart, behave in a stupid way (Dogmeat I’m looking at you here…), everything falls apart: they become predictable pieces of software and not the intelligent beings we promised our players.

So… How do we save our enemies from being embarrassingly stupid?
An enemy is never passive
Your brain is never asleep: staying alive is a pretty demanding task in itself, and in the middle of a fight it would be running at maximum power. Well, so do your enemies! They are always in motion, always in action.
But here is the issue: our enemies need to wait, a whole lot! There are just so many possible scenarios where our enemies, for gameplay purposes or limitations, will reach the state “do nothing” in their AI tree (or whatever AI approach you are using). And waiting isn’t being smart…
We will thus need to replace all those waiting moments with something else: something that will serve the same purpose (doing nothing for some time) while looking like a living being. And the best way to do it is simply to look at our enemies’ fantasy once again.
Key#5: an enemy or NPC is never passive. Dive in its fantasy and replace idle moments with an action that will serve the same purpose.
Here are some typical scenarios for an enemy in “pause”, as well as a suitable replacement:
- A soldier doesn’t have any available melee attack spot available around the player > he is now strafing left and right, repositioning, seemingly gauging the situation, and looking for an attack angle.
- A sorceress has all her spells in cooldown > she is now channeling her magic, preparing a new round of devastating spells.
- A boss has a long attack cooldown to let his minions pace the fight > it is now throwing taunts at the player, screaming orders, or empowering its minions.
- A brute just landed a brutal attack and we want a long window of opportunity for the player > let’s make him pant, catch himself up, or even spend time freeing his weapon for the ground after the last attack.
- Multiple enemies take turns attacking the player to prevent stun-locks > let’s make them cautious, stepping in and out, raising their shield, and seemingly trying to find a weakness in the players’ defense.
- Etc.

Properly fitting your enemy fantasy will not only prevent it from looking stupid (just standing there in the middle of the battlefield) but will also reinforce the narrative of this enemy and invite players to project on it: realization matters!
And talking about realization…
Signs & Feedback are key
We are actually going to look at 2 specific categories from our usual S&F list: Animations, and Sound Effects.
When talking about believability, the most obvious approach to use is through animations. Animations will give life, character, and emotions to an enemy or an NPC. It will convey clear intentions too (the attack anticipation we discussed in Anatomy of an Attack for example). This topic is well-known and extensively discussed (not only in video games but plenty of other mediums), so let’s focus instead on an often forgotten tool: sound effects.
And more particularly: Barks!
You may not be familiar with the term, but you have been constantly exposed to them playing games: they are the little snippets of dialog spoken by enemies.
“I think I heard something…”, “Charlie, do you copy?”, “I smell blood!”, “Rawwwrr!”…
A lot of players, and designers, wrongly consider them throwaway dialogs, mainly existing for an atmospheric purpose, and usually don’t give them much thought. And what a mistake! Remember one of the clear benefits of SFX: they can be noticed by the player whatever the direction of the camera (thus independent of the player’s focus), and in the case of barks, will directly refer to the immediate surroundings of the player (emitter radius). Let’s use this to our advantage!
Key#6: realization is at the heart of the believability of an enemy. Focus on animations and barks.
A very common usage of barks is to convey gameplay intentions: “Freeze!” means an enemy has seen you. “I go investigate!” means that an enemy is coming your way and you need to act, etc. This form of barks in itself conveys a pretty logical, and smart, way of thinking for an enemy. But we also have another opportunity here: to have these barks fake intelligence. “Be on your guards, something is off tonight…”, “Don’t break ranks”, “This patrol path is driving me crazy. Same place, same boredom.”. Remember that players will always fill the holes if you give them the first narrative impulsion. Be careful though not to misguide the player if a bark could be perceived as a gameplay intention.

A simple ticketing system does wonders
This chapter is a tough one to tackle as it sits at the core of an AI system. The good news? We will take the easy route!
There is a reality: an intelligent enemy should not only be smart facing the player but also inside, and as part of a group. This is among the most visible sides of a shaky AI: enemies, completely oblivious to their surroundings, pushing each other, crowding the player, with no sense of group tactics of prioritization… This looks messy.
To solve this issue, you probably have heard of advanced ways to deal with group AI. “Meta-Ai”, “Commander Brain”… Many different names exist to describe a similar concept: a secondary AI, overarching the battlefield, directly sending orders to each unit that will instantly act on the order and override their own decision process. Each enemy is an isolated agent and the commander’s brain takes care of the strategy.
This has been successfully implemented in numerous titles and is indeed a legit way to tackle this topic, like Final Fantasy XV pushing it even further. If you are interested I invite you to research the work of Youichiro Miyake, lead AI researcher at Square Enyx that did wonders in the realm of consciousness of AI agents (and AI as a whole).

And yet, as fascinating as these AI are, I would almost never encourage anyone to implement such complex solutions: this is years of work, makes debugging a nightmare, and worst of all? In most games, no player will ever notice it, as they will have a very limited perspective of the battlefield.
Let’s try and identify situations that players would flag as “smart”: an enemy giving intense covering fire while another starts flanking the player, a soldier facing the player in melee while a second position behind them, or a marine stepping back to reload while another one takes his original position.
All these situations do not need a meta-AI to exist. Instead, a simple ticketing system would do beautifully. The concept is simple: create tickets for your key actions or positions: 1 ticket for flanking the player on the left, 1 ticket for the right side, 1 ticket to throw a grenade, 3 tickets to engage the player frontally, 1 ticket to engage the player from behind, etc. When enemies decide to perform one of these actions, they check if a ticket is available. If yes, they redeem the ticket and perform the action. If not, it means that all spots for this action are already filled by allies and they will resume their decision process, assessing the next action.
Key#7: in most games, a well-made ticketing system will be worth any meta-AI.
A ticketing system is easy to implement, super versatile, and flexible. Well thought through, it will make your enemies fight like the finest trained squad, without even knowing the existence of each other!
We now have enemies that are always active, have proper signs & feedback, and that feel collaborative and smart in a group context. Can we push it more?
Environment and context
Enemies acting in isolation, oblivious to their allies, is a recurring issue in games, but so is missing situational awareness. Now, as always, there are some pretty complex ways to deal with it (complex pathfinding systems, dense list of alternative states, etc.), but also some smart implementations that will make an enemy look instantly smarter.
The first step is to identify breaking scenarios: the stupid moments. What can go wrong with your enemies while they fight in your various environments? Can the line of sight of your range enemies be occluded by the world geometry (trees, rocks…)? If so, having them shoot repeatedly in it without noticing the problem sure will look bad. One solution would be to simply check for occlusion, and try to reposition if no direct line of sight exists. Can the player be in an unreachable position (simply on top of a rock for a melee enemy)? If this is a possibility, the enemy needs a fail-safe. We could implement a new, complex navigation to reach the player but it would often be more simple to give our enemies an emergency range attack (throw a rock!), just realize their weak situation and retreat to safety, or keep navigating to seemingly “find an angle”.
Key#8: list all the breaking scenarios of your enemies in relation to their environment and implement fail-safes that would make sense in their fantasy.
Not only will it create more believable enemies, it will also prevent some game-breaking scenarios, like AI allies becoming stuck in Star Wars Battlefront:

The second layer of this category is pushing a little further by having enemies not only adapt to the changing environment but also actively using it! In Immortals: Fenyx Rising we have multiple enemies, like the Cyclop, that will sometimes step aside to tear off a tree from the ground and use it to swing at the player. These opportunistic moments are great as they reinforce the idea that this enemy is an adaptable living being, and not only following patterns.
And this could be done in a multitude of ways: enemies retreating to a high-spot for a tactical advantage, switching targets to an explosive barrel if the player is being too close to one, take cover behind the closest rock…
Key#9: identify which ingredients or situation in your game could be actively used by your enemies as a tactical opportunity.

But we keep talking about combat, and this isn’t the only place an enemy needs to be believable.
Out-of-combat and secondary states
Another common mistake is planning enemies in a single state: the fighting one. Since it is their primary function, it should make sense, but it is forgetting about all other states that make an enemy whole. Take the enemy out-of-combat state, visible in an encounter approach moment: players will naturally study their environment and plan for a fight. Many games treat this entire state as a looping idle animation (or worse: an idle pose!) for their enemies, which will very quickly feel repetitive and artificial.
In Zelda: BotW, Bokoblins are often seen gathered in a makeshift camp. Not only did the setup of the camp help project a form of intelligence on them (materials used, setup, food cooking…) but their actions, while being undisturbed, really helped make this enemy believable: they would chill by the fire, walk around the camp, check their weapon… And I took this example on purpose as this is relatively cheap to achieve (and nowhere close to monstrous AI like the ones found in Hitman).

These details will be key in selling your enemies and I really invite you to think about these moments. I would usually approach an AI with a state machine containing my key states (idle, out-of-combat, combat, investigation, etc.) and then flesh out different decision trees for each of these states. In the case of an enemy, the most complex and dense tree will of course be the combat one, but I will always give the proper attention to the others.
Key#10: invest some energy into the secondary, non-combat states of your enemies: they are privileged moments to sell their believability.
Add on top of that a proper transition between states, showcasing the right emotion, fitting the enemy fantasy (surprise, rage, excitement…) and you will have a wonder of an enemy at a little cost!
Randomness
Now, let’s talk briefly about a recurrent topic: the existence of randomness in enemy design. When included in the fight flow, this topic would deserve an entire article in itself: on one side, randomness brings freshness to the gameplay, an organic feeling, and requires players to adapt and react in the moment. It prevents memorization and mindless strategies. It is also very dangerous as it breaks patterns, potentially preventing players from learning and improving.
Without expanding too much on it, I personally go for a high-level random when it comes to my enemies: attacks and attack patterns can be selected randomly (for variety and an organic feeling) but once an attack, or chain of attacks, has been started, it will unfold identically every time (learning, mastery).
Hollow Knight is, as often, an interesting reference to study on this subject:

Now, outside of combat, things are very different: randomness can be pushed as much as desired: changing direction, picking different flavor animations… If the core fight system isn’t impacted, randomness will bring “humanity” and life to the NPC.
Key#11: randomness is part of life. Consider adding it sparingly inside the gameplay loop, and as much as you want/can outside of it.
Fake emotions
Finally, I’d like to leave you on an open subject: faking emotions in our enemies. Games have been touching this topic for over a decade already at least: killing a high-ranking enemy in Halo will send grunts in panic mode, which is also a behavior visible in games like Assassin’s Creed or the Batman series.

And this is, to me, a very powerful, yet pretty unexploited topic. Imagine enemies raging, or becoming hopeless if too many of their friends get slaughtered, or others becoming mentally shaken after taking a powerful hit. Many games (particularly RPGs) treat this emotional status in a systemic way, consistent and detailed. But what I am talking about here is to try and blend these emotions more organically in our enemies: they could have a random hidden trait giving them an inclination to end up in such states.
As an example, let’s imagine an enemy picking up the “Rookie” trait: they would get a 5% fleeing chance when a higher-up dies, 10% “shaken” when taking more than 25% health damage in a single hit, and have 0% chance getting enraged.
This is, of course, extra work. Work that you may deem too costly, especially when considering hiding it. But these emotional modifiers could really bring a unicity to every instance of an enemy archetype. It would help break their mold. Enemies aren’t perfect, they make mistakes, they hesitate, they try to survive, their mental state evolves over time, etc.
The discussions around AI these days have been more and more driven by technologies and their possibilities, and we are forgetting that what makes an enemy great is hiding in its most simple details. You can have the most complex group AI in the world, if your enemies do not show any sense of self-preservation while a combat helicopter is blowing up the building they are in, then the magic is gone!

AI design will always look daunting, but hopefully, this article showed you that you don’t need millions of dollars or years of development to create smart, believable, and engaging enemies. Just a ton of small details and a whole bunch of players-convincing to do!
Did you enjoy this article? If so, please consider supporting GDKeys on Patreon. It helps keep this place free of ads and paywalls, ensures we can keep delivering high-quality content, and gives you access to our private Discord where designers worldwide gather to discuss design and help each other on their projects.

1 Pingback