Logo Platform
logo amplifiers simplified

Attack Suboptimal

Copied to clipboard!
3 years ago
Nov 10, 2021, 8:37:10 AM

AI of defending army is quick to leave their hexes where they have defense buffs and walls to attack outside of the walls

Now this can be intentional if:

1. The defenders have no chance of winning, no reinforcements coming and enemy has range units and/or siege equipment: sortying out can provide max damage to the attacked in that case

2. The attacker has exposed themselves in a very vulnerable postion: low elevation, river crossing and thus the defender has a chance to inflict higher damage then waiting behind the wall


The above are valid cases but I had the sense that the defending AI is always leaving their position if they can

Sometimes they cant as my troops are waiting just outside the wall but then they attack those units: wouldnt they inflict more damage if they wait for me to attack?


That said I always have like 50% range units so the AI might rightfully evaluate that waiting behind the wall is a sure way to losse health without inflicting damage itself which brings us to:

TIME: the most important asset of city defenders in any era and with the warscore system it is more relevant then in other 4x games


It needs to be evaluated that fortifications were there to win time not to win battles. 

Thus attacking from a defended position would only make sense in the above 2 points. In other cases the defenders are playing on gaining time for reinforcements to arrive or to simply tie down as much of the enemy force as long as possible


In that vein the defending AI might need to hold the best defendable positions until its health runs out or an opportunity presents itself to inflict max damage at an exposed attacker unit.

This is especially true since in this game the warscore ticks away by loosing battles and loosing citites: so holding on as long as possible provides valuable time to turn a war


On the flip side: If the AI is dragging out the siege, some players might be annoyed at how passive it is

But I think its reasonable to assume that the players will understand the desire of the defender to not attack from fortified position and that we need to crack these nuts ourselves to get quick results

Updated 3 years ago.
0Send private message
3 years ago
Nov 10, 2021, 8:39:19 AM

As a note: defenders should really have some range units

This is not an issue for late era draftees as they have guns but early to mid era they are fighting hand to hand which is suboptimal for defnese purpose


Suggest to have 50% of draftees be ranged unit or offer a garrison option to convert draftees to archers when attacked


Now we could traing archers and station them next to cities only as defense but that would be micro-heavy and expensive and wouldnt help in improving the defense of the AI which is the main goal

0Send private message
3 years ago
Nov 10, 2021, 4:35:28 PM

Hi @Zolobolo,

Do you have any save for the match? That would help the team to analyse the scenario and replicate it.

0Send private message
3 years ago
Nov 11, 2021, 6:09:05 AM

I kind of appreciate that you should plan ahead but that's not a bad point. Archery or a culture's equivalent wasn't uncommon. It did require a bit of specialized equipment though maybe one archer per 2 melee militia? Not half and half.

0Send private message
3 years ago
Nov 11, 2021, 6:10:08 AM

Could militia be given an ability that they can a ranged 2 attack from a garrison? Probably not. Unit types.

Updated 3 years ago.
0Send private message
3 years ago
Nov 11, 2021, 11:30:47 AM
Daarkarr0w wrote:

Hi @Zolobolo,

Do you have any save for the match? That would help the team to analyse the scenario and replicate it.

Please find a save below:

Siege AI.ctr


This save is suitable to test a number of scenarios described below for the following reason:

1. It is taken directly after I ahve initiated a siege on an enemy city

2. No reinforcements available on either side

3. No range units available on either side (made sure to attack wth swords and spears to get clean results)

4. Besieger is in a clear advantage (it would be prudent by the defenders to attack if they had the advantage in strenght but this is not the case here)

5. City is located in an optimal location to hold up for a long time as there is only a single-hex route leading into the city and the city walls can only be attacked from a single hex. On top of that the city also has elevation within it enabling the defenders to hold out even if the wall is breached


Case #1:

The defenders decide to attack the besieging force.

This is a clear-cut wrong decision to take as they are:

1. At a disadvantage in overall strenght

2. The landscape puts them at a disadvantage when attacking (as they would need to both leave their walls and attack uphill)

3. There is likely a reinforcement not far away and/or one could be generated fairly easily to relieve the siege

Conclusion: Should not attack but wait at least till a siege engien has been finished but likely even beyond that


Case #2:

If attacker leaves the hex in front of the wall empty, a single defender unit moves in there in Turn 1

The unit does not attack afterwrards which is good but is in a location where it will be wiped with a single charge and causing minimal to no losses to the attacker

There seems to be a function which seems to deintify this situation as no further units are moved into its location one the unit is wiped in front of the walls

There is a chance that the intial unit is only moved in that exposed location outside the walls as there are 4 defending units but only 3 city hexes to place them on. Thus the AI script might have decided to move the unit there jsut to be able ot spawn the 4th defender

Conclusion: moving into the exposed hex in front of the walls is a clearly wrong decision as it neither offers an oportunity to attack but is sure to end in a unit wipe with no damage caused to the attackers. If this calculation is overwritten by the script just so that an additional unit can be spawned, that shoul be fixed as it is better to have a unit in reserve then sacraficing another unit to get it into map as the overal lsum of the decision is one unit less


Case #3:

The other defending units are holding their position when exposed unit is lost or enemy is in front of the walls

This is the corect behavior

Conclusion: there is obviously a correct potential damage calculation made efore unit positioning but it seems to be overritten in some cases


Theory:

A lot of the attacks fro mmy past sieges might have had something to do with my range units being there: maybe the defenders deem the damage they cna caue to archers more valuable then the damage reduction they recieve from the foritifcation and maybe tehy even ignore that handgun units do not get a debuff when attacked - This theory needs another save game scenario to test out


AI Recommendations:

1. When besieged, the AI should not counter attack unless relative strength is at minimum 2:1 in its favor

Rationale:

- Even if the ration is 1:1 attacker is always at a disadvatange (just like in real life) - thus the realtive strenght needs to be clearly better to pull off an offense successfully

- Primary goal of the defender is to gain as much time as possible for reinforcements to arrive and attack the besiegers in the back. Once surrounded the besiegers are in a clear tactical disadvantage from the getgo and levies are valuable in that they represent pops that are lost wth each draftee

- Secondary goal is to inflict as much damage as possible to the besiegers. This can only be done when defending as the fortification bonus is only applied then

- After the AI decides to sally out and counter attack the besiegers, it correctly calculates that it should not actually attack and this is idle: this is annoying for players who should be defending in this scenario and will likely simply skip each turn but its also counterproductive to the AI as it will loose the battle without inflicting any damage once the max turn counter runs out

2. When combat begins, the defenders should not leave their fortified hexes to less secure positions even if thee are still units in reserve that cannot enter the map due to this. They can leave their fortified position if there is a hex that provides even greater avatage due to being higher elevation or enemy units crossing rivers around it

Rationale:

- Levies are valuable and must not be thrown away easily

- Defenders excercise maximum damage_given/damag_taken ratio when defending in fortified hex (except when attacked by archers or siege equipment but well get to that in antoehr test)


Balancing Recommendations:

1. Levies should always be ranged units so that they can always dish out damage to attackers even if they cannot leave their walls without loosing the advantage of being on defense in a fortified position. If this is not possible, then give town watch and following bonus effect to camps family infra (such as Watchtover): Turns +1 levy unit into a Levy archer during siege. The workaround would be fine for the first 3 eras but is a bit more complex when we get to gunpowder units as the benefit of a ranged levy would be gone and another benefit would be needed to repalce it

2. Walls (not fortification hexes in general) should provide protection from close in combat to ranged units (and thus levies as per above point). This is to emulate that the archers are located on top of walls and cannot be easily rolled over via shock troops

Updated 3 years ago.
0Send private message
3 years ago
Nov 11, 2021, 12:01:00 PM
Ningauble wrote:

I kind of appreciate that you should plan ahead but that's not a bad point. Archery or a culture's equivalent wasn't uncommon. It did require a bit of specialized equipment though maybe one archer per 2 melee militia? Not half and half.

Yes a 50-50% split was my initial thought as well

Only downside is that its difficult to clearly communicate this rule to the player as its not that intuitive to do


So what might be better is to provide the long range bonus to levies via infra: each infra in the family of camp could increase the number of levies upgraded to archer levies and this fact and the exact amount clearly communicated within the desription of the infrastructure improvement itself


Course there would till be a minor issue: how to clearly communicate the amount of levies and levy archers to the player before they besiege a city

Updated 3 years ago.
0Send private message
3 years ago
Nov 11, 2021, 3:27:52 PM

i feel the AI city defense has improved A LOT since the opendev days but i agree that it sometimes tends to give up the benefit of a strong defensive position and go into a suicidal attack in all difficulty settings

i feel that the lack of ranged defenders has made melee levies and such become over-buffed... i don't think it is "fair" that urban recruits are made to be as strong as trained forces

if a faction needs a strong defense, then a proper army should be raised

oh, and it should be used. many times i've seen liberated independent people with strong defender stacks just stand by when a major AI faction lays a siege with weaker force and waits for the turn countdown, the huge combat zone blocked for a full eternity

0Send private message
3 years ago
Nov 11, 2021, 5:09:39 PM
HumanKid wrote:

i feel that the lack of ranged defenders has made melee levies and such become over-buffed... i don't think it is "fair" that urban recruits are made to be as strong as trained forces

if a faction needs a strong defense, then a proper army should be raised

Levies are strong but they kinda need to be as:

1. Players would auto-resolve and instant-capture cities

2. Due to auto reinforcemment in captured territory, the above army wouldd auto fill up soon further increasing the chance for the player to not actually play sieges

3. Due to the high upkeep cost not all citites can be defended

4. Its rather boring for a player to organise tatic army defenses for cities


My argument is actually going to other direction: increasig the power level of levy defenses by making them ranged and altering city wall effect to negate the hand to hand combat penalty to these archer levies


The goal is to have AI cities better defend against both other AIs but particularly against the player so that the foritfications can play the role they ment to play: as a road block

It should take time to build up siege equipment and aso have some levies starve before a fortification can be captured (even without army to defend it)

Yes the AI shouldd train armies but should use them to relieve its besieged fortifications - its iportant for this mechanic though that the fortifications cannot be captured right off the bat 


Currently we can pretty safely roll over a city with roughly equial force protecting it as the levies (though strong) cannot make use of their true strength: the fortification when attacking

Updated 3 years ago.
0Send private message
3 years ago
Nov 11, 2021, 7:30:14 PM

if autoresolve is deemed problematic, then it should be addressed on its own i.e. having fortifications play a role in the outcome. the known cavalry siege exploit showed this clearly

high upkeep is good. it's a regulator and an opportunity for decision making: players can go along with it and use their forces for nearby exploration and stability boost, opting for not having a standing army and saving up the money for raising one the moment it is needed, or keeping a bare bones formation that can be instantly upgraded

boring is relative

0Send private message
3 years ago
Nov 11, 2021, 8:18:09 PM
HumanKid wrote:

if autoresolve is deemed problematic, then it should be addressed on its own i.e. having fortifications play a role in the outcome. the known cavalry siege exploit showed this clearly

Autoresolve should be a sped up normal resolution with AI plying both sides (and hopefully it is)

Autoresolve is not the issue right now but the behavior of the AI - that is why I placed the trhead in this subsection.

Specifically the issue of AI sortie out when besieged even though they dont have a clear advantae in strenght and instead of playing for time till reinforcements arrive or simply to tie down enemy forces.


Another issue I mentioned is that levies leave their fortified positions which considering the above is suboptimal at least


Autoresolve would only then become an issue if levies would be nerfed as that would further decrease their power level and cities could be simply captured via a normal army with autoresolved at turn 0 of the siege making siege weapon techs/buildup time and the purpose and investements into fortifications meaningless not to meantion cutting wood to speed up the building of siege weapons


Would dedicated armies stationed in cities stop this from happenig? Yes but they would be needed for all cities then, AI scripted and palyers microing them so I would recommend going down that route


I have instead argued to further increase levy power level for the particular scenario where they are needed

Its not that they arent powerfull (they are) but for defending fortifications they are not useful: they need to leave their fortification to attack or need to sit tight without attacking and simply being taken down by the siege engines, archers and a more mobile attack force


Making levies archers would fit their purpose of sitting tight behind walls and peppering the besieging army even if they are tow hexes away in the rear of the city

This would make sieges more strategic as the attacker needs to consdier time of essence and the need for siege weapons and starving out the defenders beforehand would rise as the mechanics were clearly intended to function in their current state


HumanKid wrote:

high upkeep is good. it's a regulator and an opportunity for decision making: players can go along with it and use their forces for nearby exploration and stability boost, opting for not having a standing army and saving up the money for raising one the moment it is needed, or keeping a bare bones formation that can be instantly upgraded

A decision (for which the upkeep would be needed) is only well designed if there are more then one viable alternatives

The problem with nerfed levies is they will be wiped in turn 0 of a siege (they are already suffering from this issue in many instances): thus the decision would be to have no defense power at all or invest in defense at which point I would question if levies make sense at all seeing that pop is lost every time they die. If they cant hold out by themselves for a single turn then no sense spawning them, lease them in the city and they will be recaptured when the army recaptures the city - its more economic, and less micro


The design of Humnakind is this as far as I can tell:

1. Levies, walls, and fortifications are there to prevent an immidiate capture of a city

2. They force the attacker to construct siege equipment to take down the walls and/or maintain the siege and starve out at least part of the defenders

3. In order to do #2 the attacker needs to tied down troops for several turns or if they have enough troops chop down forrest to speed up the creation of siege engines


Now my argument is that the levies cant hold the cities right now and even if they coudl they sortie outwhich is likely not intended behavior

Nerfing them would further break the above design to a point where we would really need a new design

I would argue they need to be fit for the above purpose not by increasing their flat out powre level but the way they engage the enemy

0Send private message
3 years ago
Nov 11, 2021, 10:01:35 PM

you brought autoresolve up and all it was said is that it should be worked on its own. i won't discuss it any further

units in every city is overkill. a competent player would place forces only on positions that indicate a possible threat, like a city bordering on an aggressive opponent

please try to argue your points without presenting a single option as the only valid one

we agree that positional combat is the issue. if they are to be just buffed again, that won't solve the underlying problem

i'm also in favor of some form of short ranged attack. i would prefer something other than archers, as they are units to be trained... perhaps citizen defense could trow rocks, boiling oil, whatever... as they actually did IRL

levies do hold on their own on actual gameplay scenarios provided the invading forces aren't overwhelming. that makes sense. they're not armies. just a bunch of peasants with tools for weapons

they could be better at holding position and only do sorties when having vailable reinforcements

0Send private message
3 years ago
Nov 13, 2021, 9:30:00 AM
HumanKid wrote:

you brought autoresolve up and all it was said is that it should be worked on its own. i won't discuss it any further

Yes I did, this is the argument thus far:

1. Problem: AI controlled cities are frequently rolled over in a singleturn without having to besiege the city

2. Reason: AI sortie out even though they only have levies and then often take uboptimal position

3. Proposed solution: Prevent AI to sortie out unless in clear strenght advantage and adjsut tactical AI to not leave the fortification unless clearly beneficial opportunity is presented

4. Proposal (from you): Reduce strenght of Levies as they are to strong compared to regular troops

5. Counter to #5: This change for #4 would compound the issue mentioned in #1: If levies are weaker they will be even less able to hold off an attack evne from fortified position

6. Additional argument presented to #5: If overall defense strenght of cities is reduced by #4, then we could autoresolve the battles and not even have to command them (besides not having to siege) so a new problem is generated

7. Counter to #6: If autoresolve is deemed problematic, then it should be addressed on its own

8. Counter to #7: Autoresolve is not the issue (it should yield the same result as both sides played by the AI - but cant say as I never use the function). The point made in #6 was that reducing the overall strengh level of levies would make them so weak that we wouldnt even need to play the battels to roll them over at turn 0 of a siege which would lead to autoresolve sieges as a foregone conclusion


Summary: Auto-resolve was brought in as an argument agaisnt a change proposed. It is not an issue right now (to that I would know if anyhow) but it would become an issue if change implemented. An issue that could not be resovled by tweaking the resolve formula (as it should not be tweaked it should jsut be a sped up AIvsAI simulation)


You have also made this argument:

"i feel that the lack of ranged defenders has made melee levies and such become over-buffed... i don't think it is "fair" that urban recruits are made to be as strong as trained forces "

I havent played a state of the game where levies were ranged so cant say if that is true

I agree that levies are strong compared to regular troops but I belive they need to be in order to have any sort of chance to hold out for at least one turn and even now they are still too weak due to being mele :)

Would instead turn them into ranged units: less powerfull then professional archers but this time that woudl not be an issue as ranged units can fire from foritifed position (so they dont need to leave their defense) and can pepper the enemy even if not adjacent to them which is super helpful for defendig

I have also argued to ensure that walls negate close range combat penalty of the defenders (emulating that they are high up on secured walls and cannot be easily charged)


My overall consideration is this:

  • Foritified positions (cities with walls) are there to be a speed bump to enemy forces no matter the size meaning they need to be able to hold out for at least 1 whole turn agaisnt any enemy force (impossible to defeat at turn 0 of the siege)
  • I dont want to bring up real-world examples and considerations as we could do that for any design
  • I would argue hovewer that the goal of fortifications should be to act as a force-multiplier: multiplying the force of the (weak) levy defenders to a point where they have to be worn down through siege
  • The siege can starve levies out (invest time), build siege equipment (to bring down the wall) and even chop forests to speed up the building of said equipment


HumanKid wrote:
units in every city is overkill. a competent player would place forces only on positions that indicate a possible threat, like a city bordering on an aggressive opponent

please try to argue your points without presenting a single option as the only valid one

Yes you are right: this should not be a considerable micro for a player I take that argument back sicne we tend to have few cities and evne less exposed ones


I didnt want to be disrespectful: I am sorry if I come across as too aggressive


I argue for the points I make and counter to points that challenge them: I could argue also against my own points but dont have that sort of capacity + my posts would be even longer and no-one is reading through these at this point anyhow :)



HumanKid wrote:

we agree that positional combat is the issue. if they are to be just buffed again, that won't solve the underlying problem


i'm also in favor of some form of short ranged attack. i would prefer something other than archers, as they are units to be trained... perhaps citizen defense could trow rocks, boiling oil, whatever... as they actually did IRL

levies do hold on their own on actual gameplay scenarios provided the invading forces aren't overwhelming. that makes sense. they're not armies. just a bunch of peasants with tools for weapons


they could be better at holding position and only do sorties when having vailable reinforcements

Yes we agree that there is a problem

I think that both the AI and the units need to be fixed yes

Fixing the AI is no question - it needs to be done

Rebalancing of the unit is just an additional measure I think is needed as further action is required to prevetn rolling over a city at turn0 of a siege. The goal could be achieved differently of course:

1. Minimum siege time before attack is allowed: would feel too restrictive for players

2. Increase strenght of levies: I agree with you that they should not be made stronger

etc...

Turning them into archers would fit the scenario: they start in limited area (no room for manuever) which is well defended and need to dish out damage without being damaged themselves and even if not next to the attacker


Yes we can call them other then archers but with ranged attack: ideally they woudl need a range of 2 to be able to dela damage even from behind their frontline


Yes they could and should be much better


At least in my own experience playing normal difficulty I can capture a town with 4-5 units which sohuld coutn as a medium sized force

This is partially due to them leaving heir position but mostly due to them havignto attack my mele unit to deal damage (hence my ranged levy suggestion).

All I have to do is breach a walled sector and then place my strongest unit there: once they attack that my unit is fortiifed but they are not and they wear themselves down)


Yes they are just peasant (in this game) but the overall design should dictate what they are how they fight and how powerfull they are

If we agree that they should be able to hold out for at least 1 turn then they need to be much more powerfull in that particular scenario (but not in general when compared to regular troops)

Updated 3 years ago.
0Send private message
3 years ago
Nov 13, 2021, 1:54:50 PM

Zolobolo wrote:

Daarkarr0w wrote:

Hi @Zolobolo,

Do you have any save for the match? That would help the team to analyse the scenario and replicate it.

The save might also be good to analyse a fourth case:

Siege AI.ctr


Case #4:

AI does not send reinfocements


The save migth also be suitable for testing AI reinforcement routines as:

1. If AI is not exploited (unit is placed in front of the wall so the AI cannot move in there and loose one unit in a single attack) then the battle lasts for 2 full turns: 2x3 rounds

2. The main city of the besieged faction seems like its 1 turns away with 6 pops thus in theory they should be able to crank out reinforcements (1-2 units) and send them to releave the siege

3. Tested with waiting the full 3 turns as well (max number of turns before I automatically win due to being the defender) and I did see a cavalry unit that seems to have bee ntrying to relieve the siege


The save is not suitable for case #4 if the AI lacks resources to produce (more) reinforcements or there is a valid economical or strategic reason not to do so

e.g.: if they have overal low pop, money and the capital caity is much better defendable


Naturally we also dont want the AI to cheat and get free units nor to bankrupt itself relieving a city it will most ceartanly loose instead of concentrate protection to its better foritifed cities

Updated 3 years ago.
0Send private message
3 years ago
Nov 13, 2021, 6:11:19 PM
HumanKid

Raised a thread for Siege balancing:

https://www.games2gether.com/amplitude-studios/humankind/forums/169-game-design-and-ideas/threads/46690-siege-balance?page=1#post-344670


Lets discuss the topic in detailed there if you are interested

0Send private message
3 years ago
Nov 13, 2021, 6:23:57 PM
Daarkarr0w wrote:

Hi @Zolobolo,

Do you have any save for the match? That would help the team to analyse the scenario and replicate it.

Another save for the last scenario mentioned in the premise:

Siege AI 2.ctr


The save contains 2 sieges: in both cases the strneght power ration is around 2:1 in favor of my besieging troops

In both cases we can autoresolve the battel in turn 0 of the siege (no seige equipment needed) and only loos a single archer

If player controls the attacking force, then both battles can be won within 3 rounds and no losses


This is largely due to:


Case #5:

Defending AI sends out levies to attack from behind the walls and receive more damage then what they can inflict at my own troops

If the defending levies would remain behind the wall and not attack like in the above first save they would produce much better damage received and damage dealt ratio

The faction in question likely has no more cities left so maybe they attack at all costs as there is no reinforcements or reason left to play for time?

In this case they do not seem to try and counter attack (even though the odds are more in their favor then in save 1) which is good


Solution: Levies should not attack across the wall with such bad expected outcomes and thus they can resist the invasion for much longer

Though admittedly they dont really stand a chance overall and gaming for time is not really relevant here - if there is a subroutine for the AI to go all in if all is lost then this behavior can be appropriate

0Send private message
3 years ago
Nov 14, 2021, 12:55:03 PM
Daarkarr0w wrote:

Hi @Zolobolo,

Do you have any save for the match? That would help the team to analyse the scenario and replicate it.

Another save for a new scenario I havent see before:

Siege AI 3.ctr


Case #6:

Defending AI decides to coutner attack besieging force evne though their army strenght comes mostly from ships that cannot engage the enemy due to terrain and even if they could most of them cant attack land units

The core issue here is of course the unlucky tactical map that prevetns the denfending ships to engage the enemy at all but there is an AI aspect to this:

1. AI should not rely on strenght that comes from naval ships than cannot engage groudn targets (I have also recommended to allow ALL naval units to engage land units to resolve this exact issue)

2. AI should only count a fraction of its naval strenght when deciding to engage on ground as ships have range limit that can be easily exploited by a ground army


Example: Defending AI has 6 Quadrireme (31 strenght each) and 3 Carracks (41 strenght each)

When calculating its offensive power it should count = 0*31 + 3*41/2

0*31 as Quadrireme is unable to engage land units

3*41/2 as Carracks can engage but are naval units in a land battle and will thus be not to effective


A case could be made that ships with no land attack should also be calculated just with evne less weight e.g.: 6*31/10 as they could engage enemy ships or land units of the enemy if they enbark onto a sea tile

Updated 3 years ago.
0Send private message
3 years ago
Nov 20, 2021, 1:23:37 PM
Daarkarr0w wrote:

Hi @Zolobolo,

Do you have any save for the match? That would help the team to analyse the scenario and replicate it.

HumanKid has kindly proivded two more cases for which you can find the saves wit hadjusted scenarios below:


Case #7

Siege Insert Archer.ctr

Senario: Player lays siege on AI city but AI counterattacks (wrong decision).

AI levies hold their positions on foritified hexes (correct decision)

A single AI leyy attack player unit righ outsdie the wall causing more damage then recieveing (correct decision)

A single archer unit is brought onto the battlefiled by the player from reinforcements

Defending AI levies leave their forified positions as soon as an archer is added to the siege force (wrong deicsion)

Note that they do not leave their positions to attack the archer (it is too far away and not evne in shooting range) but attack nearby melee infantry and thus eliminate themselves from the battle

Conclusion: The presence of an arher unit in the besieging force semes to trigger a simplified behavior for the defenders where they do not value fortifications anymore and only want to attack

Recommendation:Levies should not attack melee units outside the walls even if there is an archer in range and shooting them. They ahve bonus agaisnt range attack so the damage dealt ot them will be too small to make signifficant gains relaiyng only on wearing them down from range. Levies should only attack rangeed unit from behind walls if:

A: There are no melee units to counter them

B: Ther strenght ration is 2:1 in favor the the defenders

C: An attacker range unit can be reached withi none round and attacked AND the damage deatl to the ranged unit is going to be higher then the damage taken by the levy (to make them stop attacking gun units as they wipe them out in an instance like that)


Case #8

Siege #4.ctr

Scenario: Player lays siege on coastal city but AI counter attacks

Both attacker and defender are supported by naval units with guns (they can engage both sea and land targets)

AI also has an army reinforcing he siege but the units from that army need to spawn in from a single hex on the players army side

AI moves first: moves each unit individually and attacks right after movement without waiting for other units to move first and thu provide friendly unit adjacency bonus

Conclusion: The way AI units move takes a long time for larger battles like this and puts each of their units at a considerable disadvantage as they loose damage output as well as recieve mokre damage without adjacency bonus of their units

Recommendation: Split AI movement and attack functions so that units are moved firts and then attack commands are issued.

The code seems to allow for several movement commands to be resovled at once when the player issues them so should be doable for the AI as well: simply split the script int two parts: movement and attack and have both sycle through each unit individually. This way AI movement is resolved much faster (near simulatinous movement and attack of their units)



Recommendations so far:

1. AI city defenders should not attack but wait unless:

A: Siege engine has completed and strenght ration is 1:1

B: Strenght ratio is 2:1 in favor of the defenders

Not doing anything is better then loosing the city immidiately and causing no casualties to the attacker as those attacking forces can be tied down for several turns


2. Streng ratio calculation of land battles (flag on land) should count naval units that cannot attack at 0 or 20% of their strength and count naval units that can attack land units at 50% of their strength.

All naval units are counred at full strenght when sea battle strenght ratio is calculated.

Declare the calculation method and individual unit values in a breakdown when hovering over the strenght ratio bar for control and transparency


3. Levies should never leave fortified hexes (especially not due to a simple archer beign present on the field) unless:

A: There are no melee units to counter them

B: City defense army strenght ration is >=2:1 in favor the the defenders

C: An attacker range unit can be reached within one round AND attacked AND the damage dealt to the ranged unit is going to be higher then the damage taken by the levy (to make them stop attacking gun units as they wipe them out in an instance like that)


4. Split AI unit movement and attack functions so that AI units maximise adjacency bonuses and make battles with many units faster

0Send private message
3 years ago
Nov 22, 2021, 8:35:44 PM

The current AI behavior in tactical combat is to move and attack per unit

The suggestion of moving all units first and then attack with them maximes adjacency bonuses for the AI but it has one drawback: it doesnt capitalize on brekathroughs (eliminating a unit and then surrounding the enemy, attack them in the rear or attack ranged units in the rear

A routine should be possible where both advantages can be realised:


New AI attack routine

The goal is to maximise unit adacency bonuses but also achieve breakthroughs if possible:

1. Each unit is moved individuall iwth the existing movement evaluation subroutine (this works fairly well already it seems evaluating terrain and enemy positions)

2. Once a unit has moved it evaluates if it can completely destroy an enemy unit: If not then no attack is conducted for now

3. Once all the units have moved, each unit evaluates again who to attack and attacks (even if that target is not wiped)


This way breakthroughs are realised if an enemy unit can be destroyed while the movement phase and units that have not yet moved can capitalise on the new oportunities created


Now the routine would still have two inefficiencies:

1. Breakthroughs that could be achieved by two or more attacks are not realised but these would have a high opportunity cost anyhow that would likley not outweight the damage taken due to missing adjacency bonus

2. The sequence of the units in which they move can have an influence if a breakthrough is reached or not if an adjacency bonus would have been needed to achieve it. If this is the case, and opportunity is lost but this cannot be prevented unless the movement subroutine is redesigned as well. Since that subroutine is clearly more complex due to the number of factors involved there, its likely not worth the effort for this one inefficiency

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message