Dishonored 2’s AI form crews as Lonely Hearts for guards

Dishonored 2

One of the talks I went to at GDC was about AI in Dishonored 2 [official site]. I’m not sure what I was expecting because my encounters with the AI are mostly terrifying. As someone who doesn’t play much stealth gaming and isn’t great at combat from a first person perspective the AI is primed to deal with strategies I’m nowhere near perfecting and thus it tends to rule the roost. I think I was hoping that attending a talk might open up the AI in a way that meant I understood how to bludgeon it into submission, or at least do something other than kill a guard, drag them back to my safe spot and repeat until I’d cleared a path to an objective. That didn’t happen, but I did learn that the AI has a crew system that sounded like a kind of maths-based Lonely Hearts column.

The crew stuff was because Arkane wanted the AI to exhibit group behaviour as well as individual behaviour. If it’s not clear what that means, imagine a bar fight with three people each angry with you about a different thing. They’re operating as individuals, not co-operating and not taking advantage of each other’s skillsets while they try to bash you in the face. Then imagine you’re in a bar fight with a pack of lions. Some are chasing you, others are lying in ambush, one has a sniper rifle and might pick you off from a distant hillock… They’re working as a group and taking account of each other’s roles within the fight.

The second version not only feels more sensible given how you’d expect guards in the real world to behave (otherwise why bother going to the trouble of training them or having captains or different weapon sets at all?) but it also helps add structure and bite to the world. Without group behaviour, larger fights can be a real mess with far more friendly fire sustained.

The broad strokes of what the system does is it collects information, then assigns roles, then gives directions. So when more than one NPC is trying to achieve the same outcome they start to work together. The individual behaviour still exists because it’s what the unit uses to achieve those shared aims, it just prioritises and structures that differently to take account of the group knowledge and what role it has at a given point.

Dishonored 2

The idea is that you get a fluid system where a single unit can merge with a group while its aims align and then wander off when the group activity conditions are satisfied or no longer necessary. It also lets level designers intervene and create or script crew requests if necessary for a particular mission so it’s flexibility is a strength.

The devs (AI programmer, Xavier Sadoulet and gameplay programmer, Laurent Couvidou) mentioned earlier GDC talks, such as one from 2013 about Hitman Absolution AI so I’m not saying this was of approaching AI is entirely the domain of Dishonored 2 but this is the talk where I encountered the ideas being explained in a form that was useful to me. I think the Hitman talk is this one if you have GDC Vault access.

For corpses you’d have something along the lines of:

The guards gather up, then they split up to search for the perpetrator, then they gather again for a debrief if they don’t find anyone.

That reads far better to the player as a set of actions a group of trained guards might take if they found a body on the streets of Karnaca and I can see how I’d be more inclined to read it as human, as well as being a more interesting challenge for a player.

You can get it to do other things, too, so if you had a group of guards who spot the player and the player then warps to a different bit of the map, the AI will figure out that more than one NPC is seeking the player and send some of the assembled group to see whether there’s a viable pathway to the target while those with ranged weapons fire from the original location or shout at you rather than everyone charging off.

This is where the Lonely Hearts comparison came in for me, because it sounds like all these NPCs are sending out little requests via the group AI systems. I thus spent the remainder of the talk drafting these in my notebook:

“Guard, 28, WLTM similar for corpse investigation. Must have own pistol.”

“Guard, 45, heard a noise down a dark corridor – fancy investigating with me?”

“Guards, 30 and 29, willing to share investigation of abandoned building and maybe more…”

“Guard, 36, in hot pursuit. Fancy making it hotter?”

“Guard, 33, NSOH, looking for NSA investigation hook up. No time-wasters.”


  1. Seyda Neen says:

    This is a better write-up than PC Gamer’s on the same topic.

  2. Merry says:

    Guard 33 isn’t coming to my birthday party.

  3. Premium User Badge

    keithzg says:

    Guard seeking suspicious person to stab, disgraced royalty preferred. Open to group effort!

  4. Jenuall says:

    This is one of the areas where I felt pretty let down by Dishonored 2, and recent stealth games in general.

    To me it never felt like it did anything tangibly different or better than Thief did nearly 20 years ago in terms of guard reaction and interaction with the player and the world.

    Spotting when one of their fellow guards was no longer around was about the only thing I can think of that impressed me.

    • fish99 says:

      If anything Thief felt more dynamic because it had some guards on very long patrol routes, so you could still bump into guards in areas you thought were cleared. It stopped the areas you’d done from feeling quite so dead.

  5. Epicedion says:

    Where did the lions get a sniper rifle?

  6. MrUnimport says:

    I like tactics being handled at the squad level, but I’m not sure it really makes a difference to the player. PC Gamer for instance mentioned a scenario where a guard runs up the stairs and triggers a trap. Assuming the way is now clear, his buddy rushes in to engage the player. But if the second guard also gets eviscerated by a trap, the remaining enemies will be stairs-shy and instead hang around taking potshots instead.

    On the face of it this seems reasonable, but given that guards have no countermeasure whatsoever to springrazor traps besides simply avoiding the area, it just makes the enemies look impotent and inflexible, not to mention that the second guard up the stairs should probably be given pause by watching his comrade get cut to ribbons.

    Anyway, where I was going with this is that different guard tactics should make a real difference in how the player chooses to handle them. Say the algorithm splits one guard off to cover the rear entrance of the building I’m hiding in — what difference does that make if I just merrily headshot him on my way past? It seems like the best strategy in many situations would be to rush the player with as many bodies as possible.

    • Koozer says:

      I think the problem is that they can’t make them too clever or it may ruin the fun.

      If one guard gets minced by a trap, where’s the fun in the rest of the guards being super cautious and disarming the rest of the player’s meticulously placed traps?

      If bum rushing the player is their best strategy, every encounter will boil down to weathering a single brief onslaught before moving on, probably with liberal application of explosions and cheese followed by a long period of quiet, instead of a potentially protracted thing with the chance to employ a whole bag of sneaky tricks throughout an area.

  7. fish99 says:

    I know it’s not what this story is about, but I found the atmosphere badly lacking versus the first Dishonored. Dunwall was such a more interesting place to me, with it’s plague, rats, weapers, slaughter houses, flooded areas, sewers, imposing military infrastructure etc. The characters were more memorable too.

  8. Rack says:

    Meanwhile the most striking thing about the AI while playing nonlethal is how badly they work together. When choking a guard the AI response is invariably to shoot him dead which feels like the definition of a pyrrhic victory.

    “Hah, I foiled your plans to complete your objectives with no lives lost!”

    • Daymare says:

      This was the singular, most grating annoyance about a game I almost universally enjoyed otherwise. Why would guards just shoot men — their comrades, or even friends, following some overheard conversations — right in the face without even a second’s hesitation?
      Why not make them at least try and strafe the player, or … anything, really.

      • fish99 says:

        Odd I never saw this happen. Generally you’re supposed to choke out guards where other guards can’t see you :p