Artificial intelligence and more

A few months ago, primarily to clean up the Heroes V AI mod for a full release later this year, I reworked a feature that was introduced originally in 2011. The idea behind it was to give players more frequently challenging hero vs hero battles, that you only rarely get in regular skirmish maps.

Technically, it adds neutral heroes as guardians of high-value adventure map objects, treasure vaults and high-level dwellings, i.e. the military outposts. It also scales the defender's army up to match the army strength of the attacker.

How people play the game

The feedback this feature received provides a lot of insight into how most people play the game.

In principle most players prefer to build up one strong main hero who leads the biggest army. This is only logical, as the game's rules favour bigger armies. One big army is a much bigger force than the same army split in two, i.e. the two split armies working in tandem constitute only a fraction of the power the big army has. This isn't only a HoMM trait, this is a fact in most strategy games, because bigger well organized armies suffer much less casualties than two armies independently attacking the same target. It is mostly a result of the bigger damage output the larger army has, so that the opponent's strength dwindles much faster turn by turn.

That isn't to say that there aren't situations in which it makes sense to distribute your forces, or to attack a target with only a part of your army.

The second interesting fact derived from the feedback is that players don't like to split their main army even when it does make sense.

It seems people like most to play the game going over the map with one main army that grows stronger all the time. With a stronger army you can gain access to previously closed areas, defeat guardians, and collect treasures. This is the core game loop that made Heroes of Might & Magic successful. It gives you the feeling of growing more and more powerful and being rewarded constantly with new treasures.

The strategy game is often just an afterthought, you build up your main army and then go out to conquer the neighboring factions that oppose you. In a way it is an extension of the core game loop.

Obviously what puts a stop to this power fantasy is if you enter a treasure vault or military outpost and get a sound beating.

Strategies matter

Although the Guards feature is optional on skirmish maps – and since v3143 also in the campaign mode – players still objected strongly to it.

It was even suggested that the army scaling could be left in place but that the guarding neutral hero, who truly makes these battles tough, shouldn't be there.

If this mod's aim would be to develop a better Heroes V this would be a consideration. But the goal of this project is to give this game a non-cheating AI that makes it a fully developed strategy game that challenges the wits of accomplished strategy players. A trait that requires extensive strategic planning and a high level of adaptability. In a good strategy game you often have to review your strategic goals in order to win the game.

There is nothing wrong with turning the Guards option off, if this isn't your preferred style of play.

But it cannot be stressed enough, if you get around to see the strategy game behind HoMM, and learn to adapt your style of play frequently and craft ingenious strategic plans, you will open up a new world for you. A gameplay that is even more satisfying than the HoMM core game loop, because then you have a grand strategy game that is spiced up with the HoMM core gameplay.

It is outstanding fun to play a well designed strategically challenging map, where you have to build your own power base smartly, and then leverage it on multiple fronts to get the upper hand. There are strategic designs and themes that are extremely pleasing to the mind, like viewing a grand work of art or reading an outstanding novel where you simply revere the mind of its creator (check out Iain M. Banks Excession if you like SF at its best). And in a strategy game, you put these designs to work for you by executing a well crafted strategic plan.

If you are not used to this way of thinking, or don't desire to learn it, you will eventually be disappointed by this mod. Because once the AI is fully implemented, it will give you a beating until you have found your place. It is similar to the guarded treasure vaults and military outposts, if you don't enjoy the task of making these work for you, you will find little value in facing a more advanced AI.

Naturally, we will do more here, like making the AI turns come faster and giving you the means to adjust its playing strength, so that you can enjoy this game one way or another. But you miss out on an excellent treat, if you don't appreciate its strategic quality.

Winning vs guards

Only a small fraction of the players have the skills to get the most of the revamped treasure vaults and military posts right off the bat. Most complain about the high casualties they take.

The first thing you need to know is that the hero you are facing has the same level as your hero. That is he or she has the main attributes (attack, defense, power, knowledge) provided by the level and an according number of skills and abilities. The defending hero can use the artifacts that the treasure vault offers as reward.

The second important aspect is that the army of the defender is scaled to match the power of your army. Technically it counts the power of the stacks in your army. The power of a stack is the number of creatures in a stack multiplied by the creature's power value from the fan manual. The defender's army is scaled up proportionally until it matches the power of your army. Note that this is the army your hero carries, not only the creatures that are fielded in battle.

With this knowledge alone you have already a number of means available to shift the odds of winning in your favour.

Some battles are more easily won in a duel between low-level heroes. Think about with which hero you want to attack. Another important aspect are the hero's main attributes. Any stat boosters you visited, e.g. an arena, are to your advantage. For example a single visit to the arena gives you a permanent +10% damage for ranged and melee attacks. The same goes for pre-battle boosts. You will be surprised how much a visit of a fountain of fortune that gives +3 luck changes the course of a battle. The rally flag is also very good.

Skills obtained from witch huts are also a net bonus. What is more important though is how good you are at hero skilling, i.e. to select the skills that have the best synergies with your hero and the army your hero leads. Battles are won or lost this way. Remember the AI currently uses random skill selection, so you have the upper hand here.

Artifacts can give your hero a tremendous advantage, if these work well with your hero and army. The ring of speed and the ring of broken will are good examples. This advantage increases for low-level heroes.

It is also important to think about the opponents you will face in each type of treasure vault or military outpost. The logic here is similar as in the fights against neutral creatures on the adventure map. You don't field your vulnerable arcane archers or crossbowmen in a battle against titans. Instead you could use a solid tank, like earth elementals or hydras, and rely on summoning or destructive magic.

Again acquiring the right skills and spells beforehand can give you an advantage.

You will also face a smaller army, if you use only a part of your own army. If you don't have a secondary hero who could act as an adjutant, you can also leave creatures at mines temporarily.

All in all you have a large spectrum of possible approaches, and mastery of the game in all its aspects will benefit you. You can also learn from these tough battles and improve.

Sometimes a military outpost has permanently a layout of obstacles on the battlefield that favour certain types of armies.

It is also worth considering whether the extra rewards that compensate you for casualties in these battles have value for you. Each type of treasure vault and military outpost has different guardians, and some are of more value than others for certain factions. Crypts are valuable for necromancers, the vault of the mages and gargoyle stonevault are of high value for academy heroes, the blood temple for warlords and so on. In general each treasure vault gives you a stack of the most powerful creature you face in combat as reward. This creature is upgraded.

Visiting military outposts usually only makes sense if the outpost is of the same faction that you build an army for. In principle it is much more difficult to make the military outpost work for you than the treasure vaults.

One reason is that the reward from a military outpost is split into multiple stacks of the same faction, plus sometimes an additional neutral creature.

While the means to shift the odds of the battle in your favour are the same as for the treasure vaults explained above, it is helpful if you know how the rewards are computed.

The following rules apply to military outposts:

  • the power of the creatures you have lost is counted and stored in nPowerCasualties
  • nPowerCasualties is capped at half your army's initial power
  • nPowerCasualties is divided by two
  • your reward are stacks with a combined power of nPowerCasualties

If you read this carefully, you will note that you are compensated with stacks that represent half your casualties' power. But it never exceeds a quarter of your army's initial power. I.e. the reward is better if you manage to keep at least half your army alive. If you loose more than half of your army, you don't get any additional reward for it.

There are a few additional rules. A reward stack is normally upgraded, but defaults to the creature that is in your army already (if any). E.g. if you carry black dragons, you get black dragons as a reward, not red dragons or shadow dragons. You can carry one black dragon in your army, not field it in the battle, and get black dragons as reward.

The logic why the reward for military outposts was designed this way stems from preserving the strategic balance on the map. If you don't have any casualties in the fight, you get one tier 7 creature plus the creatures you can recruit at the military outpost. This is a modest reward but still valuable.

On the other hand the ceilings and splitting of the reward stacks prevent you from getting ultrapowerful stacks, for example a very large stack of black dragons, and limit the conversion of other faction's creatures to your faction.

How do you gain from this?

The power value of creatures differs. In general the stronger a creature is the higher its power value. But often high tier creatures are underrated, or simply present more value because of the strategic situation and battles you face. For example a stack of shadow matriarchs or red dragons tends to be of higher value than a stack of minotaurs of equal power.

Always field upgraded creatures as these have a higher power value and give you higher rewards if you loose them.

And then there is the potential for conversion of other faction's armies to your faction. If you are playing the dungeon faction and you have captured an orc town, you can field the orcs in battle in a dungeon military post and receive dungeon creatures as a reward.

The ceilings have been chosen to limit this type of conversion, so that it remains a question whether the creatures from other factions would serve you better as they are or alternatively converted to your faction. There is pro and con. But if you are smart you can make this feature work for you.

If you go over all what was said here, you see that you have a wide range of means to make the revamped treasure vaults and military outposts worthwhile visits.

Just don't enter blindly with your main hero and army at its peak power. The game will teach you not to do it.

In general, if you try out different approaches and fight these battles, you will get more insight into the game mechanics and master the game better. Don't think for a second you know all. It is also a gain to have more diverse armies, with sometimes large unique stacks from treasure vaults, and adapt your tactics around these.

Sometimes there is a treasure vault or military outpost from which you can't gain. Accept it just the same way as you would avoid a fight with a tough stack of archmages for some treasure that you don't need. This game isn't meant for you to conquer everything in sight without a second thought.

You've successfully subscribed to Quantomas AI
Welcome back! You've successfully signed in.
Great! You've successfully signed up.
Success! Your account is fully activated, you now have access to all content.