Designing the Enemy AI of The Division 2

Feb. 28, 2020
protect
<iframe title="Designing the Enemy AI of Tom Clancy's The Division 2 | AI and Games" src="//www.youtube.com/embed/6Xv0WguFTFE?enablejsapi=1&amp;origin=https%3A%2F%2Fwww.gamedeveloper.com" height="360px" width="100%" data-testid="iframe" loading="lazy" scrolling="auto" class="optanon-category-C0004 ot-vscat-C0004 " data-gtm-yt-inspected-91172384_163="true" id="222429920" data-gtm-yt-inspected-91172384_165="true" data-gtm-yt-inspected-113="true"></iframe>

AI and Games is a crowdfunded YouTube series that explores research and applications of artificial intelligence in video games.  You can support this work by visiting my Patreon page.

In collaboration with Ubisoft and Massive Entertainment, I present three blogs exploring the AI behind Tom Clancy's The Division 2, including excerpts from my interview with the Lead AI Programmer of the franchise, Philip Dunstan.

Part 2 of this series, which explores open-world and systemic design, can be found here.

Philip Dunstan: "One of our mantras was creating a combat puzzle for the player.  And so a lot of resources and time is required from the NPC team but also from the level and game design teams to create this scalable combat puzzle, that is fun from level 1 through to 30 and continues to be fun as the players are trying to optimise their gear."

2019's Tom Clancy's The Division 2 brings the war to Washington D.C. as the United States is still caught in the grip of the Green Poison outbreak six months after the fight to reclaim New York City.  Massive Entertainment returned with a larger and more ambitious title, with a variety of new gameplay features that reshaped how player interact with both friendly and enemy AI characters within the game.  

In this first of a three-part series in which I interview Division 2's Lead AI Programmer Philip Dunstan, I take a look at the lessons learned from shipping and maintaining the first Division.  What the teams goals were as they moved into production on the sequel and the changes laced throughout the games AI systems to build a fun and nuanced combat puzzle: keeping the player engaged from the very first encounter all the way to endgame.

The Lessons Learned

Tom Clancy's The Division - like many a live service game - was an exercise in growth as the project not only made it to store shelves in March of 2016, but also was maintained and updated for a period just shy of two years post-launch with the West Side Pier update 1.8 released in December 2017.  

The core AI behaviour of The Division is built through a proprietary behaviour tree system - a topic I've previously covered in blogs on Gamasutra  - with significant effort put into tools to help the design and programming teams build behaviours and address inconsistencies and bugs within them.

Philip Dunstan: "When we started to look at what we were going to do for the Division 2, we took quite a while to look back at what had worked and what hadn't worked on Division 1.  What we liked and what we thought needed changing.  From an AI specific point of view, that meant our core AI architecture, some of the core systems like how we control which NPCs are shooting at a time, how NPC works, NPC animation and sort of the basic locomotion system.  A lot of those systems were working actually really well or with some small incremental improvements would be just perfect for the Division 2.  Also the other thing we really liked from the Division 1 was that we had created a set of tools which we thought worked really well.  Division 1 of course shipped with Snowdrop Engine and we own and build a lot our tools ourselves.  Division was the driving game behind the Snowdrop engine.  So we had created a set of tools in the engine for the way we edit and debug behaviour trees, the way we show debug drawing on the screen and historical debugging.  Those systems we really liked, it gave a lot of power to our content creators - our game and level designers.  And it meant as programmers we didn't have to be involved in a lot of the work that they wanted to create."

But while there's always a need for change, there's also a chance for growth and improvement.  A new title - even a sequel in a franchise - is an opportunity for systems to be refreshed and iterated upon.  Addressing bugs in the toolchain and re-engineering existing tools and systems to be more stable and reliable, with the navigation tools in particular an area that the team focussed upon.  But the biggest changes that players would notice was in the design and structure of the enemy archetypes and factions that players would face in DC.  This was a focus not just for the main campaign but more critically during endgame, where the majority of players would spend the bulk of their time.

Philip Dunstan: "We knew we wanted to solve this problem of replayability in endgame.  And the endgame was one of our big design pillars for the Division 2. To make a game that is more satisfying to play at endgame.  Making sure all of our NPC factions were viable at endgame, that they are all fun to play against.  It didn't matter whether you were playing against the Black Tusk or the Hyenas, they would all be fun to play against.  As part of that, we had to increase the faction diversity to have more differentation between the factions.  So that throughout the game you felt the difference when playing one faction instead of another.  So when playing endgame and you play a mission that had been invaded by the Black Tusk, then that was a very different experience than if you were playing a Hyena mission for example.  And finally we wanted to make some targeted changes to some areas of the game to increase the immersion.  One of the things about the Division is that we are a 'grounded in the modern world' type thing, we're not a sci-fi shooter, and I think that's what attracts players to our game.  They feel like they're playing in New York or they feel like they're playing in Washington.  We wanted to double-down on that by creating a gameplay experience where they felt immersed in the world and that meant having NPCs that look they're immersed in the world."

To address the challenge in diversifying the enemy factions, the team focussed on three key areas:

  • Improving Core Behaviour and Design: reducing their time-to-kill, but also their reaction to player behaviour and reinforcing the core combat puzzle each enemy should present.

  • Amplifying Differences Between Factions, such that they appear more distinct.

  • Distinguishing Archetypes in Each Faction, providing novelty and fresh gameplay.

This would help satisfy the teams goals of not just diversity, but ensuring challenging gameplay during endgame.  So let's walk through each of these in-turn and explore the big changes happening under the hood...

Improving Core Behaviour

One of the biggest tasks the AI team set themselves was to amplify the players impact on AI behaviour.  Naturally in a given like the Division you interact with enemy AI primarily by shooting them.  But players need to feel rewarded when their persistence and skill enable them to clear a room of enemies.  Communicating an AI's decisions is incredibly important for maintaining immersion for the player and its equally important in the heat of battle as it is during more quieter moment.

In the first Division, the enemies response to being shot was not as rewarding for the player as it could be.  Division 2 embellishes the stagger animations for when a character is under fire, which help give your attacks meaning, but more critically increase the rate of falter animations interrupt the AI's behaviour, given you an opportunity to re-evaluate the situation.  But having the AI character reacting to being shot is one thing, it's giving them a more natural reaction that enriches the experience.  Hence they focus more on dodging and ducking enemy fire, forcing players to keep track of their movements, not just shooting fish in a barrel, but constantly re-evaluating target prioritisation and maintaining and edge of uncertainty to the fight.

The last major change to the core systems, was the Time-to-Kill (TTK), the period of concentrated gunfire players need to maintain to take an enemy down.  Given the pseudo-realistic setting of The Division, there is a need to balance this alongside the design of each character.  The TTK of the Division 2 is - on average - much lower than the original, but the team still wanted to provide big meaty enemies that would require greater resilience and a bit of co-ordination to overcome.

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Read More>>