According to a survey conducted earlier, the combat in the game is non-interactive – the result depends mainly on good preparation and proper selection of the target of the attack. Proper preparation is fully controlled by you, but the course of the fight is not. In the olden days it was very random. Each goal was selected randomly from the list of available ones, whether it made sense or not. Fortunately, we’ve come a long way since then😉
The problem of choice is best seen in the example of preparatory spells. Suppose you want to cast a spell that adds melee attacks. Whom to cast it at? Logic suggests that a melee hero, however, random approach could cast it at anyone. An archer with 3 additional melee attacks is of little use and the mana for the spell is gone. Therefore, the game no longer uses this system, but has full artificial intelligence – Utility AI. If you want to maximize your chances in battle, read how it works.
The whole idea of utility AI is to calculate how good every possible choice is. Each of them gets points* and the one with the highest number wins. Points are calculated on the basis of features that are important for a given selection, for example for an additional melee attack:
- the target should be a melee fighter
- the target should do maximum damage
In order for artificial intelligence to be fair, it must be able to calculate points for the above only on the basis of things that are visible to players (it cannot have access to “hidden” data). What then can be considered in this case?
- we assume that mages will not attack melee, that is, for them points must fall to 0
- the target cannot use ranged weapons (again points must drop to 0)
- we assume that the damage depends on the hero’s weapons and bonuses
- weapon damage is known to everyone
- the hero’s bonuses are known only to him, but we can guess that the higher the level, the higher they are
Ultimately, each hero gets points based on each characteristic and the best wins. Thanks to this, an additional attack will get someone who not only can use it, but also will make the most of it.
This system is intentionally not perfect. It may not objectively choose the best target due to the lack of access to hidden data. It’s better to sacrifice some “quality” to make it fair (which is extremely important, since monsters also use artificial intelligence). Another potential problem is predictability – if there are 3 mages casting the same spell, it will target the same hero. A test system is introduced to reduce points for the previously selected target. In a word – differentiation at the expense of optimal choice.
As always – say what you think? Will the fight become more predictable? Will the monsters be too hard? Will everything become more interesting and meaningful?
* names changed to more friendly ones😊