The Locust Horde are a formidable force: a near endless army of subterranean monsters
set on annihilating all human life on the planet of Sera. They're vicious, ruthless and seemingly
unstoppable. In Gears Tactics, players take charge of the remnants of Alpha Squad,
as Gabriel, Sid and Mykala fight for their lives and rescue as many civilians
as they can from the unrelenting might of the mad scientist Ukkon.
By crafting a turn-based tactics game that embraces the design pillars of the Gears of
War franchise, developers Splash Damage and The Coalition seek to reproduce many
of the mechanics and dynamics players know, love and dread from the series.
And this presents an interesting design problem for developers to overcome in how
the locust horde plan their attacks against the players small but determined group of soldiers.
I'm Tommy Thompson, this is AI and Games and in this episode we explore
how the Locust Horde coordinate their attacks
in Gears Tactics. A process designed not just to put the pressure on you with every move,
but to deliberately make it *easier* for the player to survive their next assault.
Released for PC and Xbox Series X in 2020, Gears Tactics continues the
modern-day revival of the turn-based tactics genre brought about by X-COM:
Enemy Unknown. And on first passing you'd be forgiven for thinking that the game is a mere
reskin of Firaxis reboot. Players deploy their units across the map with each turn of the game:
utilising a limited amount of action points to move into position, attack targets, setup
defensive perimeters or utilise special abilities. But this rigorous adoption of the genres tropes
belies an intensity and challenge that evokes the core games of the Gears franchise. Enemies
come at you thick and fast, each with their own attack patterns, weapon types and special
abilities that will be familiar to anyone who has accompanied Marcus Fenix on his many adventures.
To build this intensity, the Locust need to be appear intelligent, make decisions quickly and
coordinate their attacks when its their turn to strike - and that's the focus of this episode of
AI and Games. As we'll see in a moment, the actual decision making process for each enemy archetype
is relatively straightforward and for longtime viewers will be nothing you haven't seen before.
But the interesting part about Gears Tactics AI systems is that while monsters in the Locust army
make decisions on their own, there's an entirely separate AI system in the game that has to figure
out how to synchronise them - not just so it looks cool and maintains the ferocity that Gears fans
expect, but to prevent Locust from contradicting one another, interrupting each others actions
and - in an effort to ensure the players enjoyment of the game - minimise how much the camera has
to move around the screen to communicate what's happening during the enemy turn.
In Gears Tactics, there are oftens dozens of enemy units on the field at once,
and whether you're dealing with drones, wretches, boomers, tickers, snipers or any of the other
handsome chaps of the locust horde, they all move at different speeds, behave in different ways and
quite often appear at different times, given some of the missions are semi-procedurally generated.
Despite all of this, players should be able to follow along with what is happening
in very mission. The solution to this is what is known as 'Tactical Clarity'
In an Unreal Fest talk from 2020, lead AI programmer Matthias Siemonsmeier
explains that Tactical Clarity is a critical design pillar of Gears Tactics,
that aims to ensure players are always able to understand what is happening during an enemy turn.
It should be clear to the player where they're being attacked from,
how locust units are moving around the map and what the most immediate threat is to their units.
And one easy way to make this happen, is minimise how frequently the camera pans around the map.
If the camera has to follow each individual unit moving and no consideration is given
to where they are in the map relative to one another, then the camera will suffer whiplash
as it bounces from one unit, to another, to another in a very short period of time.
So let's get into it: how does the Locust make decisions to ensure tactical clarity?
So let's start by exploring how the locust make decisions. Each individual unit uses a behaviour
tree to decide how to spend the limited amount of action points it has available for that turn.
If you're not familiar, a behaviour tree is a type of data structure that allows for branches
to handle specific types of logic and decisions based on what's happening in the world. If you
want to know more about how they work, be sure to check out the episode dedicated to them over in
the AI 101 series. Each locust unit type has its own bespoke behaviour tree that customises their
actions based on the type that they are as well as specific characteristics that unit may have.
Each unit will focus on the goals the locust must satisfy on that turn - a point I'll come back to
in a minute - but also what they each individually want to achieve, such as pushing into a specific
point of cover, or taking fire on an enemy. They don't pay attention to any other units on the map
and are largely unaware that they even exist. However, while a unit may select a specific
action, they don't always take up their full allocation of action points, hence they'll try to
use those up in relevant ways. A standard grub may apply overwatch over a region in front of them,
or a sniper will deploy their pinned status on an individual unit, forcing you to dig in. Once
that collection of actions is decided upon, it submits them to a separate AI system, the tactical
planner, whose job it is to figure out the order in which these actions should all take place.
Gears Tactics uses a planning system in order to decide what are the high level goals the
locust want to achieve, as well as figuring out the execution order of the enemy turn.
Each level and skirmish contains level mark-up that a separate goal planner uses to decide what
the active goals of the locust should be, such as capturing a point, pushing an enemy out of cover,
identifying characters that need a heal or buff, that sort of thing.
As we mentioned already the locust make decisions by themselves, but those decisions are going to be
influenced by the goal planner. So some units will be given a role or job for that turn,
such as a grenadier being told to flank the player or a Kantus being told which ally needs a buff.
After that, it's up to those characters to decide by themselves
how to achieve those goals - and anything else they want to do - during that turn.
Now we've seen planning systems several times here on AI and Games, most notably
First Encounter Assualt Recon and its use of the Goal Oriented Action Planning technique,
as well as Hierarchical Task Network planning in Transformers:
Fall of Cybertron and Horizon Zero Dawn. But here we're doing something a little
bit different that requires us to use the planner in a slightly different way.
Gears Tactics is conducting what is known as partial-order planning, meaning it's taking
a set of actions but it doesn't commit to the order in which they're executed straight away.
When the planner receives the decisions of each unit, they're receiving chunks of actions that
are in total-order: meaning that they have to be executed in the order they're given. So if a unit
moves from one piece of cover to another, takes a shot at the player and then deploys overwatch,
we need to execute those actions in that exact order, otherwise it might look stupid
or is impossible to execute - given a unit can't act again after deploying overwatch. However,
if there are three locust on the map at once, each with their own set of total-order actions,
if we executed those chunks of actions in sequence, one after the other,
it would violate the tactical clarity principle as the camera bounces around trying to follow them.
Hence the planner is responsible for figuring out how execution of these individual sets of
actions can interweave, given while we can't interrupt the order of one units set of actions,
we can execute the actions of other units in between. But this presents a new problem
that in partial-order planning is known as a threat. A threat in Gears Tactics
is when an action by one character will violate the actions of another.
For example: if two locust interact with the same piece of cover: one is pushing up into it
and deploying overwatch, while another also runs to the same cover and then moves along the wall,
then those actions needs to be ordered such that they don't conflict with one another.
In each case, a drone moving into cover has a precondition that says it will only move into that
cover if it is free to use. But if the first drone moves into cover, then deploys overwatch, it won't
move anymore and that piece of cover is now being used. This presents a threat to the execution of
the second drone, because the precondition of its action to move into cover is violated by the
effects of the actions of the first drone. Hence the planner realises it makes sense for drone 2
to push into cover first, then as it moves along the wall, drone 1 can move forward.
But in amongst all of this, there's an opportunity to make the locust appear to be smarter than they
really are. As mentioned earlier, each unit makes decisions on its own. But the tactical planner
makes an effort to get locust to work together. This is achieved in two different ways: first
of all, the goal planner comes up with specific goals that require multiple units to execute,
hence individual units can satisfy those goals and by doing so, it looks coordinated. A good
example of this is a flanking maneuver, where the goal planner needs someone to pin the player down
while another character makes a move. But there's also another step that takes place during the
action ordering process. This is achieved courtesy of a subsystem known as the Combo Move Analyser.
It takes the current plan and then re-orders actions and merges them into what are known
as combo moves. Combo moves provide a means to highlight units whose actions could be
executed in parallel without violating one another and would improve tactical clarity.
Combo moves might mean a group of wretches can run across the map together, a squad
of drones can push forward into cover, or two enemies concentrate fire on the same character.
In each case, tactical clarity is maintained, given we can watch five
units push up together instead of watching them all do it separately, or all the actions
being taken against one of our characters are framed in such a way we can follow the action.
In fact, one of the coolest examples of this, is the Commander unit:
a commander is a unit in a given fight that looks like its acting as the leader of the pack.
During a given turn, a commander will gesture to other units to make a move and it helps
make that coordinated deployment look all the more realistic. But it's a complete fabrication
brought on by the Combo Move Analyser. When the system finds combos of units acting together,
it tries to find a nearby unit that could be considered the commander. It then injects an
action into the plan to animate the commander so that it looks like they're following orders.
Except none of it is real, all of the locust made their decisions entirely on their own, and
its the tactical planner adding that little bit of spice that makes it look all the more convincing.
The last thing to mention, is how does the planner prioritise all of this
so it runs smoothly and what happens when the execution is somehow interrupted.
It's important for the pace of the game that the AI does not take too long
to make decisions. Hence the tactical planner interweaves its planning process alongside the
execution of the plan itself. So when you see a squad of locust moving forward, the planner is
still figuring out the ordering of the rest of the plan and using that downtime as means to figure
out what to execute next. This means that an enemy turn doesn't have long wait times at the start,
and when combined with the combo move system, what could take over a minute to process and execute,
is pulled off in under 30 seconds, and players are none the wiser.
But what happens when the plan is interrupted? Players can deploy overwatch to open fire on
enemies that come within their line of sight, or proximity mines can be deployed to catch
enemies unawares and this could even interrupt movement patterns as cover is destroyed or areas
are no longer safe to traverse. So if a plan is interrupted, but the units still have spare
action points, the tactical planner stops what its doing and replans the interrupted
units. Hence a character that was originally pushing up to take a shot at the player,
might dive into nearby cover after being caught in overwatch. On one hand this might
seem counterintuitive, given you could try to anticipate all the things that players could do
to interrupt the execution, but when you factor in the process of scheduling all the actions and the
combo move process, anticipating every possible outcome that could impact the plan becomes *very*
difficult. Hence, it's ultimately easier - and faster - to just restart planning from that point.
Tactical Clarity is a design philosophy laced through Gears Tactics all in an effort to keep
the player engaged: understanding the threats the enemy AI present and how best to address it.
The AI planning system running under the hood of Gears Tactics not only helps deliver an
experience befitting the Gears of War franchise, but reminds us of the value in ensuring players
can see what AI characters are doing given how big an impact that has on our own behaviour.
Thanks for watching this episode of AI and Games on Gears Tactics. This game sits alongside the
Halo Wars series as an exciting reimagining of one of Xbox's most enduring franchises in a completely
different genre. If you've enjoyed this video, be sure to check out my episode on 343 and Creative
Assembly's Halo Wars 2 which is addressing its own completely unique set of design challenges
by ensuring each AI commander has their own unique style of strategic warfare.
AI and Games is a crowdfunded series over on Patreon and its thanks to my supporters that I
can continue to release new videos. To find out how you can support future episodes, check out
the links on screen and in the description. Take care of yourselves, and I'll be back.