GOG.com
Donate to Codex
Putting the 'role' back in role-playing games since 2002.
Odds are, something you like very much sucks. Why? Because this is the RPG Codex
News Content Gallery People Games Companies  
Forums About Donate RSS Contact Us!  

Expeditions: Rome Dev Diary #14 - Combat AI

Visit our sponsors! (or click here and disable ads)

Expeditions: Rome Dev Diary #14 - Combat AI

Development Info - posted by Infinitron on Tue 4 January 2022, 23:56:42

Tags: Expeditions: Rome; Logic Artists; THQ Nordic

THQ Nordic continued to promote Expeditions: Rome over the holidays with a new location trailer showcasing Gaul & Africa and a dev diary video about the making of the game's soundtrack. These however had little to do with the topic of Rome's fourteenth dev diary, which is all about the game's combat AI. Logic Artists are making a concerted effort to address the weaknesses of Expedition: Viking's enemy AI, particularly with regards to pathfinding decisions and tactical coordination. Apparently the AI is so effective now that they've had to introduce some optional "artificial stupidity" measures to prevent every encounter from becoming a drawn-out battle of attrition.

Today’s dev diary follows up on our diary from just before Christmas, which laid out how we go about designing a good combat encounter. This week we’re going to talk about how the AI has been designed.

Every game is a unique challenge when it comes to AI, and turn-based tactics offer a particularly exciting type of challenge. On the plus side, enemies don’t have to make split-second decisions because of the nature of a turn-based combat system, which means the AI can make more involved or complex calculations. On the other hand, the player has unlimited time to consider their actions and attempt to predict what the AI will do on its turn, so the AI must be quite clever and somewhat predictable without being fully deterministic.

The most important rule when designing AI for games is that the enemies shouldn’t play optimally all the time, but rather they should behave in a way that creates fun gameplay. It’s very easy for us to make the AI never make any mistakes – never step on your caltrops, never walk into your fire, never shoot your shield with their archers, never provoke attack of opportunity, never let themselves be flanked, etc. That won’t make for a fun game though: if you surround an archer with melee enemies, the smart play for the enemy might be to simply skip that archer’s turn, but that will just seem like a glitch. Having that enemy archer try to shoot you, only to get spectacularly skewered from three different sides is much more satisfying.

To this end we have a “mistake probability” value baked into our AI, which is tied to our “AI Difficulty” slider in the options. On higher difficulties, AI will be much less likely to make mistakes, which can feel unsatisfying as certain tactics or skills become more about denying options to the AI rather than provoking and exploiting its mistakes, but does make the game significantly more challenging.

The AI Difficulty setting also has more subtle effects, such as determining how good the AI is at maneuvering past your front line to reach your healer or your archer, or how often they’ll choose to focus their attacks on one specific unit on your team rather than spread out their damage. On the maximum setting, all bets are off as the AI does its level best to kill you, and we even give it a few extra advantages on this level such as extra movement for its melee units so they can maneuver more freely, or a small bump to enemy resistance stats to make flanking more important.

Movement in general is the foundation of good AI in a turn-based game – especially one that takes place on a grid. If the AI can’t reach you, they won’t be able to use their clever tactics. To this end, we have fixed a few of the big problems with the AI in Expeditions: Viking. First off, if you create a bottleneck by blocking off a choke point on the map, the AI would naturally attempt to find a different path which could potentially send it all the way around the level to get you. Now, this only happens if the AI can tell that it’ll be able to reach its target within a few turns. Otherwise it’ll find cover near the chokepoint and wait its turn, or even withdraw its own unit blocking the way, so another unit with higher damage potential can reach its target.

Once the AI is where it wants to be, the question is what it should do. Our combat designer has carefully designed which skills each enemy unit has, in order to create maximum tactical variation over the course of the game as you encounter different cultures and the complexity of the game ramps up. Some enemies have skills that are not even available to the player, which makes them much more interesting to fight. Every single ability that the AI has access to is associated with its own AI tactic that defines when, where, and how that ability should be unleashed. On top of this, there are general tactics available to the AI that help it coordinate between its multiple units, to ensure that the units move in the right sequence and get out of each other’s way.

To help you understand what the AI is up to, we’ve added a lot of combat one-liners. Most are related to specific events, such as morale failure, group movement, or flanking maneuvers. Some communicate the state of the AI, such as “defensive strategy” one-liners where enemy leaders order their subordinates to seek cover and stay put, forcing you to advance upon their position if that’s what the mission calls for. Some one-liners are even specific to a particular skill, such as when enemy heavy infantry uses Hunker Down to make themselves impervious to attacks from the front, or when enemy archers use Interrupt to nock an arrow and shoot the first of your units that enters their field of view. Not only does this help you understand the AI’s behavior, but it also adds a lot of personality and intensity to combat.

We’re very proud of how much the AI in Expeditions: Rome has improved compared to Viking. Our AI programmer has been hard at working over the holiday, polishing and improving the AI based on your demo feedback, but since the demo is limited to the prologue of the game, where the AI has access to very few tools in order to ease you into the gameplay, you’ve only seen a small fraction of what the AI can do once the training wheels are off. We can barely wait for you to get your hands on the full game and see for yourselves.
The usual devstream for this topic is scheduled for January 5th. I guess there'll be one or maybe two more of these before the game launches on January 20th.

There are 6 comments on Expeditions: Rome Dev Diary #14 - Combat AI

Site hosted by Sorcerer's Place Link us!
Codex definition, a book manuscript.
eXTReMe Tracker
rpgcodex.net RSS Feed
This page was created in 0.064888954162598 seconds