Login

russian armor

AI Questions

4 Dec 2019, 21:23 PM
#1
avatar of Rigwaz

Posts: 57

1. Did Relic change the AI in the last year or so? I've seen a lot more behavior recently where the AI will charge forward with one or two units left in a squad. I can understand that behavior if there were a limited number of victory points left but this is happening in annihilation matches.

2. Is it possible to change the AI's cheat vision as a win condition or does it need to be part of the mod itself?


3. This isn't really a question because I've found the answer without needing to ask! Essentially in my mod I have made consripts far more valuable than normal but I was wondering if I could explain that to the AI.

https://www.coh2.org/topic/82151/how-to-make-ai-use-weapon-racks

jump backJump back to quoted post29 Aug 2018, 15:36 PMLugie

Per_Unit_Scale is how valuable a unit gets after each unit is produced. Its mainly to prevent spam. Example; A unit scale of 1 has no decrease in utility for every unit on the field, a scale of 0.5 means each consecutive unit is considered half as useful to have.


So using this entry I should be able to make the AI produce more conscripts.
4 Dec 2019, 22:07 PM
#2
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

The AI itself isn't changed as far as I know, but changes on units does affect the AI behaviour indirectly because it seems to prefer units with a higher damage/cost value.

The ai_settings (easy in this exmaple): ai_settings\default_skirmish_easy has a value fallback/retreat_ratio. This is default on 0,1 and causes the AI to attack with low health units. I use 0,3 in my mod. The vision cheat is set in target_identification/detect_squad_in_fog_of_war and detect_squad_in_camoflauge (only for hard/hardest, hardest = expert)

ai_economy is very useful, but can also break their buildorder. A to low per_unit_scale can cause the AI to build fewer units in lategame. I'd recommend to set it on 1.

The utility has a greater effect. The default_squad_utility is set on 100. That means that all units which are not in your squads list have the utility of 100. If you want the AI to build more conscripts, then you can set it around 110 or 120 for that specific squad. The offset makes them less predictable and changes the utility slightly per match. I use an utility of 1 for units which I don't want to be constructed at all.
4 Dec 2019, 22:33 PM
#3
avatar of Rigwaz

Posts: 57

I am giving the soviets a different economy as part of their balance to the mod but I didn't realize that per unit scale was the whole army. I will just change the utility of the units they should use more often.

Thanks again!
4 Dec 2019, 23:49 PM
#4
avatar of Rigwaz

Posts: 57



ai_economy is very useful, but can also break their buildorder. A to low per_unit_scale can cause the AI to build fewer units in lategame. I'd recommend to set it on 1.


Just to double check this is the:
category: ai_economy , default squad utility setting?

I really like how aggressive the AI is in your mod as it makes expert AI much more difficult to play.


The utility has a greater effect. The default_squad_utility is set on 100. That means that all units which are not in your squads list have the utility of 100. If you want the AI to build more conscripts, then you can set it around 110 or 120 for that specific squad. The offset makes them less predictable and changes the utility slightly per match. I use an utility of 1 for units which I don't want to be constructed at all.


I found under ai_economy a listing for squads and then found a listing for squad utility. Listing number 21 is the constript. But this is not the listing you are talking about I am pretty sure.

I think I found what you are talking about once while looking around but I can't seem to find it now. Where should I be looking? (sorry to ask such a basic question)
5 Dec 2019, 00:09 AM
#5
avatar of Rigwaz

Posts: 57

So I was thinking about removing the easy AI and replacing it with a modified version of expert AI.

I want to test seeing how the AI plays when it can only see non camouflaged units. If it seems to play well still I will try making the AI play with all vision bonuses removed.

Would I need to do anything besides clone: default skirmish hardest / total domination hardest and rename them appropriately to easy? (and then of course modify the targeting as you said before)

*edit* there must be something else I need to change because that alone did not work.
5 Dec 2019, 10:34 AM
#6
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

jump backJump back to quoted post5 Dec 2019, 00:09 AMRigwaz
I want to test seeing how the AI plays when it can only see non camouflaged units. If it seems to play well still I will try making the AI play with all vision bonuses removed.

Would I need to do anything besides clone: default skirmish hardest / total domination hardest and rename them appropriately to easy? (and then of course modify the targeting as you said before)

The All units AI already cannot see camouflaged units and that works perfectly :)

To override the easy, clone default_skirmish_easy and override all settings from the hardest. The id of the file should be equal to easy to make it work. You can copy paste the 'ai_settings_bag' (first line of the file) from the 'hardest' file which contains everything except the id.

category: ai_economy/squads:
You can add squads in this list to set their own utility.
The default list is outdated and incomplete, so it is easier to empty it and make your own.

category: ai_economy/default squad utility:
This is used for all units which are not present in the list 'squads'.
5 Dec 2019, 16:49 PM
#7
avatar of Rigwaz

Posts: 57

Are you sure the AI can't detect squads in camouflage? Why does hardest AI have a true next to detect squads in camouflage? I remember when they made changes to camouflage and I was under the impression that the expert AI was altered so that it could still see hidden units but was not allowed to target them (which is a big difference).

I noticed instantly when I started tinkering with the AI that changing camouflage from true to false made the AI play in a very different fashion.



So by modifying the squad utility list you're basically telling the AI which units to use. That's very interesting. I'll have to come back to this later when I get all the factions up to their base modifications. I'll probably turn easy AI into some insane monster AI (noticed the resource tab).

I see there are a lot of setting under fallback. I assume retreat capacity/health ratios tell the AI to run away when either their squad % or health gets to a certain point.

Is there a heal importance I can modify? All I see are time settings for when reinforcement fails.
5 Dec 2019, 17:59 PM
#8
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

I meant the AI in the All units mod cannot see camouflaged units. Vanilla AI (hard + expert) can see all.

jump backJump back to quoted post5 Dec 2019, 16:49 PMRigwaz
I see there are a lot of setting under fallback. I assume retreat capacity/health ratios tell the AI to run away when either their squad % or health gets to a certain point.

Is there a heal importance I can modify? All I see are time settings for when reinforcement fails.

The heal importance isn't part of the settings sadly. Unit preservation is the biggest weakness of the AI currently.
8 Dec 2019, 00:54 AM
#9
avatar of Rigwaz

Posts: 57

Changing the per unit scale to 1 is fantastic as now the AI just pumps out units nonstop. I definitely see it getting confused however when the Ostheer made 4 at guns in a row after losing some infantry units; this made little sense because they were definitely winning the vehicle war. Likewise the soviets at one point made 3 maxims in a row when they lost some infantry squads.

If we had the ability to tell the AI not to make more than 2-3 AT guns (unless it was totally desperate) it would really feel robust. I suppose I will have to fiddle with individual unit settings when I get everything more polished.

9 Dec 2019, 22:27 PM
#10
avatar of Rigwaz

Posts: 57

Under AI settings under reinforcement I notice:

"wait time in seconds before retrying a failed reinforcement" :60
"time in seconds to wait for reinforcement before it is considered failed": 15

Shouldn't those two numbers be backwards?

For example in my mods the soviets pretty much have infinite manpower (at least for expert ai).

It makes way more sense to say - every 15 seconds try to reinforce again. If you fail reinforcement 4x then stop trying to reinforce and just go fight instead.



Does anyone happen to know what the retreat_capacity_ratio is? Is that a limit of how many units of the army are allowed to retreat? If this is what I think it is then I want to try setting this to zero.

I notice the value : "retreat_combat_rating_ratio" is set to zero.


So what is the fallback capacity ratio?



I feel like these may be the settings holding back the AI. Is that why it behaves so unlike a person? It has been hard coded to only to allow a set ratio of its troops to retreat.



Also what is the retreat health ratio? Is this another measure to make sure the AI isn't retreating a huge portion of its army (as a function of health)?


I assume I want to set things to zero when I want them to be ignored - as in ignore combat retreat ratio.
10 Dec 2019, 18:01 PM
#11
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

I experimented with the reinforcement values a while ago, but didn't notice any change in their behavior.

Retreat = running back to hq.
Fallback = walking away from the front line.

I think the retreat_health_ratio influences when a squad retreats. 0,5 is retreat below 50% health, 0,1 is below 10%.

Increasing some of the health ratio values should improve the unit preservation.
11 Dec 2019, 00:24 AM
#12
avatar of Rigwaz

Posts: 57

Yea I was tinkering around with this and I think it should help but the AI sometimes has a mentality of : not one step back. I am guessing that is a function of the minimum number of territories owned.

I already noticed a difference with vehicles by changing what the AI views as low health.

I'm not sure that changing the reinforcement times was the best idea - or rather I'm not sure I understand the parameters fully.

I think the numbers just need some tweaks to prevent the AI from practically suiciding his tier 1 units and then saying hey well I just lost 6 infantry squads so I should totally replace those with 3 at guns and 3 hmg squads.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

806 users are online: 806 guests
0 post in the last 24h
8 posts in the last week
37 posts in the last month
Registered members: 49090
Welcome our newest member, BrubeckDeclarkBurche
Most online: 2043 users on 29 Oct 2023, 01:04 AM