Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Development Info Expeditions: Rome Dev Diary #14 - Combat AI

Infinitron

I post news
Patron
Staff Member
Joined
Jan 28, 2011
Messages
99,620
Codex Year of the Donut Serpent in the Staglands Dead State Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Wasteland 2 Shadorwun: Hong Kong Divinity: Original Sin 2 A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
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.
 
Joined
Jul 28, 2020
Messages
1,284
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.
No! Do not say AI Behaviour machine intelligence pattern adjustment anons when it is AI Cheating game statistic adjustment nonsense anons! Do not! No! Do not say Smarter Not Stronger anons when you do Stronger anons! Do not! No! It is nonsense anons! It is! I do hate perfidious double speak nonsense anons but I will forgive anons if you do give more cute Expedition wifes anons! I will!
 

Gibson

Savant
Joined
Jun 23, 2019
Messages
423
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

in literally every strategy/tactical game literally everyone complains about how retarded the AI is. apparently this was the plan all along...we just didn't get it.
 

RunningWolf

Learned
Joined
Oct 7, 2020
Messages
120
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
Its so easy that they couldn't implement this on the highest difficulty third game in a row. So easy we cant be bothered to make our AI not retarded.
 

Gibson

Savant
Joined
Jun 23, 2019
Messages
423
Is this series any good?

I liked them, both games were for me personally a decent 7-7.5/10 when it comes to gameplay, but to run them....they did a really shitty job at optimising the engine or something, because both games ran like shit. and that was the biggest bummer ever- I'd like to replay them (they nailed it with the theme, especially with Conquistador) but don't wan't to buy a 2000€ PC just to run the games smoothly on anything higher than 640x480 (exaggerated, but the performance on both games is really shitty)
 

Sensuki

Arcane
Joined
Oct 26, 2012
Messages
9,831
Location
New North Korea
Codex 2014 Serpent in the Staglands Shadorwun: Hong Kong A Beautifully Desolate Campaign
It's true that both games don't run that well, I get reasonable FPS in Viking for the most part. I've got an i7 4790K, 16GB RAM and did have a HD7970 and I get ~90 FPS or so in Viking on max settings
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom