How Dishonored 2’s guards came to be driven by a Left 4 Dead-like mastermind AI

During a talk at GDC, Dishonored 2 gameplay programmer Laurent Couvidou explained how the enemy guards are corralled by an artificial intelligence “mastermind” that influences their group behavior. Think of it like the director AI in Left 4 Dead, but one that puts together rough and tough gangs on the fly and orders them around rather than one that throws hordes of flesh pinatas at you because nothing’s happened for three minutes. 

It’s not the kind of AI implementation any old player will notice right away, if ever. I mean, the point is for players not to notice the AI—for the guards to react as we’d expect guards to. 

But the AI crew mastermind is the backbone driving Dishonored 2’s AI systems, deciding who will hang back and take potshots while melee fighters flank and corner, or whether certain paths of pursuit are safe or not based on how many dead friends are around. 

The design came about after the original Dishonored released, and the AI team left to work on Prey. The new programming team had to start from scratch, but starting over was apparently good for Arkane Studios Lyon, forcing them to revisit AI basics that eventually led to the current system. Rather than build complex AI from the bottom up, with individuals who inherently know how to work together, they designed an invisible AI god that whispered, ‘stand here’ and ‘you’re the captain now’ instead. 

Black Mirror pitch: an NPC discovers they're controlled by an AI ruler, who then discovers they were created by a guy named Ted in North Carolina.

In the most basic example, three guards, two with swords and one with a pistol, engage in combat with the player. The ensuing scene is a mess. The guard with the pistol takes fires wildly, hitting his own men in the process. Meanwhile, the two swordsmen act like they don’t know what they’re swinging and slash through one another on their beeline path to the player. The duke would be pissed if he saw the state of his civic officers.

With the crew AI turned on, the pistol-wielding guard is assigned as commander, and barks orders, taking careful shots while the two swordsmen spread out to corner the player, coordinating swings so as not to hit one another.

Without a literal AI god influencing their actions, those guards would be toast.

In another example that tests the crew AI’s attention to danger, the player set one trap on the stairs leading up to a balcony, then grabbed the four guards’ attention and returned to their perch. In the first instance, two guards went up to approach the player directly while two stayed down to guard the lower escape route. One of the encroaching guards stepped on the trap, which turned him into limbs and blood, but it wasn’t enough to deter the other guard from continuing his approach. Seeing that the way was safe and the player was engaged with the other guard, the two guards watching from below used it as an opportunity to head upstairs and engage the player directly too.

In the second take on the same scenario, the player set two traps, dissolving the two guards who tried the stairs the first time. Seeing this, the two guards below, with the guidance of the mastermind crew AI, figured those stairs were a bad place to be and instead barked at the player from below. I’d call them smart, but without a literal AI god influencing their actions, those guards would be toast.

But that doesn’t mean the guards are empty sock puppets incapable of their own reasoning. According to Couvidou and AI Programmer Xavier Sadoulet, each NPC is driven by their own AI systems as well, comprised of such an abundance of rules and reactions that for every frame the game is rendered the AI are making around 100,000 checks against the rules. With about 6,000 rules to run through for each AI, that’s pretty bonkers. It takes me at least two seconds to remember what 7x8 is.

56? 56.

James Davenport

James is stuck in an endless loop, playing the Dark Souls games on repeat until Elden Ring and Silksong set him free. He's a truffle pig for indie horror and weird FPS games too, seeking out games that actively hurt to play. Otherwise he's wandering Austin, identifying mushrooms and doodling grackles.