Your donations keep RPGWatch running!
Box Art

Vagrus: The Riven Realms - Companion Combat AI Improvements

by Silver, 2020-04-30 12:24:15

A new update for Vagrus: The Riven Realms talks about the improvements made to AI companions during combat.

loading...

Initially, we built Companion Combat without too much focus on the combat AI, knowing full well that it would be a massive task to code and having most of the combat features locked before we do so would make it overall a more efficient undertaking.

Thus, vanilla Companion Combat AI was 'equipped' with nothing more but brute force, running thousands of random choices without any direction that were then evaluated in the back end by a not-too-sophisticated point system spiced up with a dash of random generation aiming to make the AI choose sub-optimal scenarios too from time to time. Otherwise it would have been much too strong.

That unfortunately had its share of drawbacks. It was either extremely slow (too many iterations) or dumb (not enough iterations). After some tuning, we went for the middle ground with a rather slow and occasionally irrational setting. Truth be told, it felt awkward every time we saw someone stream the game like that and initially planned to return to it earlier but our players felt more concerned about other areas of the game, so we moved it behind other open-world features on our priority list.

Now that the first open-world region is in the hands of our backers and patron testers, we finally got around to improve AI, too.

First Objective: Increase Speed

We introduced a number of new attributes for all characters to drive their behavior, such as:

  • Row preference: Melee or range preference, or being versatile in both. That allowed to eliminate all simulations from non-preferred positions on the battlefield.
  • Tactical level (TL): Only characters with higher tactical awareness look for high certainty of their available options, while the ones with lower TL could drop the iteration numbers in the simulation drastically.
  • Expected damage: It is calculated based on the characters' average damage. Characters finding a 'good-enough' option stop the simulation and look no further. The higher the TL of a character is, the higher that imaginary bar of expected damage is set.


Second Objective: Optimal Positioning

When an AI - in any game - makes a dumb move, most of us feel lucky, even happy for a moment but then we immediately start to resent it. We want to beat the game with our superior strategy and not because of the AI's inferior tactics. Thus, we added new priorities for the AI:

  • Row preference: It was already mentioned above but beside helping with efficiency it also increased the effectiveness of the AI as enemies naturally priorities moving into their preferred rows allowing them to use their most impactful Skills.
  • Use cover: It is much harder to hit characters in cover with ranged attacks, so it only would make sense for the enemy units to use that advantage (even if only on higher TL).
  • Use swap: Why spend two actions on shuffling around each other when you can swap? The players can do it, and so can the enemies now.

[...]

Information about

Vagrus: The Riven Realms

SP/MP: Single-player
Setting: Post-Apoc
Genre: Strategy-RPG
Platform: PC
Release: Released


Details