Company of Heroes 3

Company of Heroes 3

Advanced AI
1,150 Comments
AGameAnx  [author] 21 Oct @ 7:58am 
As far as I know the only vehicles getting stuck problem is related to maps which have very big pathable "pockets". AI receives vehicle commands in a few steps, and if one of the steps leads to a complete dead end, it might fail to drive out of this dead end before getting the same orders reissued and driving straight back into the dead end. There are a few systems to avoid this, but I guess it still isn't bulletproof. Still, as far as I know it would take a really weird map for this to happen. Again, I'd love to see replays, I can probably glean a lot more from viewing it happening than from any description.

You can use discord for more frequent feedback as well. I dunno if I want a ton of feedback going to DMs heh.
AGameAnx  [author] 21 Oct @ 7:58am 
There isn't functionality to go towards repair stations, it simply chooses retreat directions sometimes towards areas where there are friendly units as it considers them safer.

There is functionality to stop if AI sees any nearby engineers trying to repair, as far as I know it should work for repair stations, the issue is probably that vehicles drive past before ever getting an update.
The Onyx Tiger 20 Oct @ 2:50pm 
Update 2:
Playing the same map I was playing when I said the AI were competently repairing their vehicles, I noticed that as soon as I began building Forward Repair Assemblies as the British the AI would send their damaged vehicles towards them but got stuck.

The AI doesn't seem to have logic to stop moving when within the radius of a FRA. I can sort of see what they're doing, though.. It's like when playing a shooter or something - you just don't stop moving otherwise you're a sitting duck. That's what the vehicles seem to be doing but within the radius of a repair station. However, the FRA does not have the ability to repair vehicles that are moving.

I'll need to try the U.S. with their version of a FRA on territory points to see if that works. If not, I'll try their Mechanized upgrade to make it an aura.

Finally I sent a friend request as to not spam the comments. :P I could also, instead, make a thread.
The Onyx Tiger 20 Oct @ 11:33am 
Update:
Playing another large map and the AI is competently repairing their vehicles. I think it may have been the map I was playing. It was a modded map and the AI vehicles would sometimes get stuck in weird places and just move around. I was going to post yesterday but wanted to test more.

The match I was just playing was also a modded map but behaved fine. About three hours in length and no hiccups.

However, I would like to point out another issue I noticed. Twice so far; first on an official map and second on a modded map. When an HQ building is destroyed, the AI won't repair it. On the official map we got one of the AI bases and they never wound up repairing it. Second was during this current match where they got my ally's HQ (just the HQ) and didn't repair it. I had to.

Still having fun with this mod. :D
The Onyx Tiger 19 Oct @ 8:56am 
I notice that the AI did have a bunch of Engineers, and yeah there's the wall of AT. The match I mentioned in my other post that was two and a half hours, the stalemate? My ally had a ton of AT teams. haha

This match was about an hour and a half and there were still lots of vehicles on both teams. It was a tug of war until my AI didn't have any combat-ready vehicles left and the enemy began winning because they had freshly built tanks. Once I began repairing all my allied tanks we began pushing back lost ground.

Currently, I didn't notice the AI actually stopping in the repair zones. They'd go to them and keep moving around, making it impossible for my FRSs to repair them, since they require the vehicles to be stationary.

The U.S. Mechanized upgrade to turn theirs into auras may work that way but not the British Heavy Armour.
AGameAnx  [author] 19 Oct @ 8:48am 
I wouldn't mind checking out replays where these issues occur specifically because right now I really just need to guess.

I suppose I could try to make it more smart about it too, make it actually consider how often vehicles are in need of repairs, not just the amount of armor overall on the field.
AGameAnx  [author] 19 Oct @ 8:48am 
Well, I'll try to address it more. Been trying since a long time ago.

I think in my testing I just never reach games that are that long or with that many vehicles.

It's not easy to make it go to repair stations, currently it just stops near them if it starts getting repaired by them.

The amount of repair units it buys is supposed to scale with amount of vehicles it has (if custom economy is enabled of course), and as far as I see in testing it really gets a lot of engineers towards the later stages.

I'm guessing the real issue here is that at some point vehicles also stop accomplishing much and just end up driving into a wall of AT over and over, so they basically need a repair crew on them non-stop...
The Onyx Tiger 19 Oct @ 6:18am 
Hey, so in prolonged matches, the AI neglects to repair their vehicles/tanks and the battle somewhat grinds to a halt, or rather it slows down.

In my match last night my three allies had clustered all their damaged vehicles/tanks in one location and I was forced to use five Royal Engineer sections to repair their vehicles to get back into the action. Yes, I saw the AI repair their own vehicles but not fast enough to account for the amount of damaged ones. Also, I kept having to chase the vehicles to repair them but idk if that's something that can be altered.

Is it possible to alter the repair script? Have vehicles actively seek out Forward Repair Stations, Repair Bunkers, and that U.S. Repair Zone? One of the areas the AI grouped their damaged tanks in is where I built a FRS but, because the AI kept moving their vehicles they wouldn't get repaired.
AGameAnx  [author] 18 Oct @ 6:22am 
@The Onyx Tiger, @HabitualCloud
Thank you, glad you are enjoying it!

@Gen. Eisenhower
It means there was a scar error during loading. It's possible that your mod isn't updated, try going in-game and deleting it, then resubscribing. If that doesn't help, please send me your warnings.log after an issue occurs. It can be found in C:\Users\_\Documents\My Games\Company of Heroes 3
Gen. Eisenhower 18 Oct @ 5:14am 
I have an issue with loading.

After I start the game and technically it is loaded, it will not go into the game. It just stays in loading screen. Last time I played this mod few months ago and this problem was appearing only when i set up AI personality. When I stopped doing that everything was fine. I came back lately to this mod, made set up that worked and this time it will not get me into the game. Someone know how to fix this?
The Onyx Tiger 18 Oct @ 1:10am 
This mod is incredible.

I love the idea of Passive Commander Mode, both being able to control my units and being locked out. I love that I focus on production and research while the AI manages combat - it's so much fun!

I love battles that take hours to finish because that's my pace and this allows them to be dragged out AND interesting. I see infantry build some sandbags and barbed wire in front of them, FACING the enemy. I see them laying mines and placing bunkers and upgrading them. Units are more careful with their team weapons and re-crew them frequently. Artillery is dangerous now.

This fixed Company of Heroes 3 for me. Matches were too short.. With this mod, matches remain interesting and can go on for a while. This current match has been two and a half hours and we've been at the Allies' doorstep for about an hour.. they continue shelling our forward positions and making it difficult to move armour forward.

This mod is excellent. Thank you!
dd_penny 17 Oct @ 7:29am 
I mean the AI team modifier strength reduction (3 for user)
dd_penny 16 Oct @ 3:54pm 
Thank you. I only use Spearhead and this. I think I decreased the AI production capacity to 3 (user) and increased fuel production so that it will spam heavy tanks mid game. Very challenging but hope for the fix on the Ai upgrading. Thank you for this mod.
HabitualCloud 15 Oct @ 3:25pm 
This should be the default AI in the base game. It's crazy how much more engaging and fun the matches are with this.
AGameAnx  [author] 13 Oct @ 5:54am 
AI General is a special mode where you only make macro decisions, so you purchase units, structures, use global abilities, but you don't control individual units. AI General difficulty refers to which difficulty AI will take over all of the player's units (no matter how many players there are, all of their AIs will be of this selected difficulty). All other AI players, which aren't originally human players, will have their own difficulty, whichever one is selected for them in the lobby.
EmbraceSarcasm 13 Oct @ 5:13am 
Oh so does that mean if I’m playing alone then the mod menu options for ai doesn’t actually matter?
AGameAnx  [author] 13 Oct @ 2:52am 
Choosing AI General difficulty works the same way for the AIs that replace the players as choosing difficulty for AI players in match screen does. All players will be replaced with AIs of AI General setting difficulty.

In default (non-extra-settings) mode, it means increases/reductions of income and other bonuses. On extra settings it only adjusts AI's capability to avoid enemy abilities. There's nothing multiplicative going on. This behavior is the same for normal AIs too.

Reiterating - it's just choosing the difficulty of all the AIs that replace the players.
EmbraceSarcasm 13 Oct @ 2:13am 
Hi, so does choosing AI difficulty the standard way on the match screen do anything/does it add to the ai general mode in game settings
AGameAnx  [author] 12 Oct @ 6:27am 
@dd_penny This should definitely be a thing that AI does. Perhaps the issue is that AI is too stupid to drive past normal infantry and attack vehicles? I'll think about fixing that, but otherwise there's a pretty robust vehicle prioritization system implemented where AI should properly switch targeting between infantry and vehicles, some units will almost never switch off, others will only target buildings and vehicles, and some will keep prioritizing infantry even when vehicles are nearby... It can stop working if you're using a tuning pack which modifies which abilities are used. I suppose another way this could appear to not be working is if AI is failing to update its units often enough. So if you're playing with crazy modifiers and there's a ton of units on the field then it's possible AI is just not 'looking' at all the different units often enough.
AGameAnx  [author] 12 Oct @ 6:27am 
@LaMerch There shouldn't be any difference. Maybe if it's losing extremely badly then something like that could happen, but that sounds very strange. I'll take a look, but yea I can't think of a reason why that would be happening.
dd_penny 12 Oct @ 12:39am 
Can you make all tanks prioritize to target tanks or vehicles when on site? I noticed when tanks are on the field they just randomly shoot anything (infantry or armor) and would continue until the units would retreat or dead, even when (my) tanks are near to target it. It makes the AI much more easier to beat.
LaMerch 11 Oct @ 8:09pm 
When AI controls player units its brain dead. Blobs units and sits in base. Set to aggressive still doesnt help.
AGameAnx  [author] 9 Oct @ 12:09am 
Thanks. Not sure how custom BG selection would look. And I don't think it's really possible because I don't know of a way to prevent one of the AIs from choosing a battlegroup before I can stop it and of a way to get information about which battlegroups the player owns.
空军上校022 8 Oct @ 9:05pm 
Thank you for your work on this mod — I really enjoy playing with it. Have you considered adding an option to let players choose a battlegroup for each AI?
AGameAnx  [author] 5 Oct @ 12:53pm 
It does not work for campaign, no.
slpzOr 5 Oct @ 12:08pm 
hello thx for this mod ! is it working for campaign ?
AGameAnx  [author] 24 Sep @ 4:06am 
Will look into it, thanks
Dead Man's Hand 24 Sep @ 3:07am 
Defensive behavioir don't build MG bunkers, AT placement, only mines, for all factions, can you fix it?
Valyus 22 Sep @ 12:29pm 
In relation to my last comment. Wehr AI works, they just seem to be affected by the overall balance of the game itself. They just suck phase 1&2. If they were to build sandbags or bunkers they wouldn't suck so bad and retreat at the drop of a hat all the time. I manage to beat the AI pretty much every time now but only when I entrench myself for the first 2 phases of the game. I essentially have to hard carry my bot to endgame then it picks up for the AI.

I do notice something happening in this mod though. As another player provided below that the AI would see in the fog of war. I think the AI somehow know where your bunkers are even without line of sight. I'm doubtful of them having line of sight on the units themselves but buildings I think there is some weird special case going on where they seem to have vision of your buildings. I'm going to continue testing this and I'm going to purposely build something in a deep corner of the map and see if they arty it.
Sturmsoldat 21 Sep @ 4:27am 
thank u so much love u
AGameAnx  [author] 18 Sep @ 7:05am 
That's definitely not the case.
WUT 18 Sep @ 6:52am 
>There are a plethora of systems which govern how AI sees into fog of war, it's not like it doesn't see anything, but it sees actually very little directly, and as far as I can tell it feels quite close to what a human would remember / deduce.

I tried searching the comment section for this specific issue, I have no problem with AI countering me being static by spamming indirect fire, but I think the AI actually have perfect vision of you because their shot hit 70% of the time, maybe more with little to no scatter, this happened more than once, they bombard my unit that I am sure 100% behind fog of war, but their hits have no scatter at all which led me to believe they have vision cheat
Valyus 16 Sep @ 11:45am 
I find the AI to be pretty weak, at least in terms of friendly AI. I'm playing Wehr and no matter how many matches I play against 1Standard/1Hard (2AI vs. 1Human1AI) the AI always ends up sucking so hard that I don't even understand what I can to help elevate it. I guess it really comes down to I can't set a friendly AI to standard when going against Hard (even 1) because they just don't know what to do. The damage I inflict is massive to the enemy AI but they seem to always have something somewhere where I can't really push, yet my AI is no where to be seen. Have you noticed that Wehr or friendly AI sucking? It really does feel like an uphill battle and I only won a standard match. The damage I do? Tons. The kill I get? Tons. The loss I get? Nothing. Yet I look at my AI stats its like 1:1 or less KD and about the same for damage taken/done. Yet I'm constantly having to swat away an onslaught of American/British troops that never seem to end.
AGameAnx  [author] 11 Sep @ 10:38am 
Small update released.

Changes:
- Patch 2.1.5 support.
- Fixed issues where infantry might get stuck idling when close to enemies but behind shot blockers.
- Reduced importance of barraging base defenses.
AGameAnx  [author] 24 Aug @ 3:58am 
The passive or aggressive appearance in the end comes down to actually having units to push vs being quickly overwhelmed whenever it does push in.

It sounds pretty much just that you've not chosen high enough difficulty / resource bonuses.

COH is a very snowbally game, and since AI doesn't know how to fully utilize tech swings and make more risky plays if it falls behind, it can often feel that it becomes very weak very fast, finding the correct difficulty is quite important.
AGameAnx  [author] 24 Aug @ 3:58am 
It's not possible to modify unit behavior that much.

Personality does modify it, but not by a crazy amount, for the most part it changes unit compositions that AI goes for.

All types should be more or less aggressive, and none of the types have the capability to truly only focus victory points. There are multiple systems which make AI focus victory points in various ways, but it's not going to do it quite as much as a human would in some situations. It tries to maintain a wide frontline, keeping territory as well as VPs.
ImminentPlayer 23 Aug @ 11:55pm 
Hi there! I have a question about AI in the game. It seems to be passive, creating little equipment and not fighting much for key points in principle. Can you please tell me what parameters affect its behavior in combat? I have tried setting an aggressive mode, but it hasn't given any results.
nini666170 11 Aug @ 1:40pm 
Relic, hire this guy!
I agree!!!!! His mod is great and I only play with this one.
He's great.
Thanks to him.
Cyan Square 11 Aug @ 6:57am 
Relic hire this man!
This mod revitalises the game for me. I'm not super into playing against human players (after the long day of work it's nice to simply have some consistent just challenging enough experience which is something hard to get with human players). And the default CoH3 AI problem is that it's very easy to exploit (especially with armored anti infantry AOE vehicles). So yeah, great mod! :bricktherat:
castorinoa 11 Aug @ 3:23am 
Is it me or has the friendly AI gotten a lot more passive?
AGameAnx  [author] 9 Aug @ 7:42am 
- USF Infantry Assault ability targeting reworked - it will now choose a target initially it wants to attack, look behind it towards enemy base and choose a strategic point to attack. This will fix cases where AI assault groups end up idling, and will make sure that even if they reach their destination they will try to capture a strategic point.
- Adjusted some ability avoidance parameters to make AI react slower.
- Minor adjustments to AT vehicle safety as they were idling very often with new in-combat functionality.
- Updated global received accuracy slider description.
AGameAnx  [author] 9 Aug @ 7:42am 
Update released!

Changes:
- Reworked logic for units changing their task. AI will reevaluate unit tasks more often, with more precision and change them more aggressively.
- AI will issue a facing command when moving to their tasks (will allow for taking cover better).
- Implemented functionality for AI units to enter in-combat state before receiving any damage or firing at the enemy. This should result in much more consistent behavior as units approach the enemy, better unit preservation, improve cases where AI always stops due to attack move as it enters combat.
- Vehicle prioritization functionality updated to make AI turn off prioritization faster in some cases where it no longer has valid vehicle targets.
[901st] Medojed 28 Jul @ 3:10pm 
Well, I played couple of games and seemingly they stopped doing this, I did not spawn a single MG and instead switched to Brits and used infantry sections and engineers to bully my way against the enemies and it worked out. By constantly just moving everywhere they used infantry and normal vehicles, completely forgetting about artillery.
AGameAnx  [author] 28 Jul @ 12:04pm 
Indirect unit values also don't scale linearly. Relic somewhat forces my hand here really because coastal BG exists. But even so, AI will get more indirect units than a human for the most part, because AI is just not that good at breaking defensive positions by other means, and it's really beneficial for AI to have units which deal damage without taking damage Of course some people really don't like playing against this, but now there's a slider which lets you adjust this.

AI generally tends to always get heavier vehicles because there's really not much downside to that and I want it to use all of its resources (so spending fuel). Of course the downside is if it's like a chokepoint map where it just feeds the vehicles... Maybe one day I'll address that but yeah.

There's a lot to that stuff, I'm trying to make sure AI uses pretty much all units that I've implemented at least in some situations.
AGameAnx  [author] 28 Jul @ 12:04pm 
AI custom economy balancing is something I always work on. There are a total of 7 unit archetypes (units are allowed to have any weights for any number of them), that AI tries to balance for and counter.

The numbers are kinda magic, it's really hard to balance them or know precisely how they work together, so it takes a long time to truly figure out great balance, but yea I've not been tweaking them too much for a long while now, I am pretty happy with where things are.

Some of the numbers don't scale linearly such as how it scales its AT defenses and especially how it counters the first potential enemy armor.

Maybe something people won't expect is that there's an archetype for rushable units, so in some cases it will just opt to rush the defensive setups, and of course especially stuff like snipers.
AGameAnx  [author] 28 Jul @ 11:59am 
Mortars reveal themselves when they deal damage I believe (or maybe even right as they fire, but I don't think so) and AI will target them quite fast especially if they're somewhat close to enemy units. There's a functionality where units in combat will request nearby artillery support and target visible team weapons and such, akin to how a human might immediately smoke out or barrage machine guns in a real match.

The ability avoidance timing is something I have to define by hand, so I am guessing halftrack barrage numbers aren't setup correctly. Needless to say it's pretty annoying to choose those numbers well because it's hard to account for barrage distance. I'll take a look.
[901st] Medojed 28 Jul @ 11:32am 
The main issue I had with fog of war is that I repositioned my mortar several times in the span of 2 minutes, it never saw it but always barraged it with it's own mortar. And yes it dodges abilities before they even finish casting. I cast my barrage from the US halftrack to a location and before the truck even started firing it immediately started retreating. But as I said, I will try to fix things on my own end, thank you.
[901st] Medojed 28 Jul @ 11:29am 
Thanks for the reply though, I thought the AI just behaved like that normally, but if it adapts actually based on what you build then I will try to see what's up. To me it seems like I am doing alright for it to not spam the same units over again, but if what you said is true, then there has to be issue on my end somewhere.
[901st] Medojed 28 Jul @ 11:28am 
Interesting, because from my experience with my friend we often try to push and capture more areas, sure we build some static units and place HMG's and 1 AT gun somewhere, but it results in the same end, it only spams artilleries and after it pushes us a bit back we get spammed by tanks. Though when I tried again last game, I don't think I changed my tactic any differently and the AI went for infantry and vehicles and completely said no to artillery. Though I assume that is because I had 2 AT USF trucks that I usually barraged it's units with.
AGameAnx  [author] 28 Jul @ 8:09am 
There are a plethora of systems which govern how AI sees into fog of war, it's not like it doesn't see anything, but it sees actually very little directly, and as far as I can tell it feels quite close to what a human would remember / deduce. There's basically no cases where it'll just randomly bombard a thing it never saw before, maybe unless you've sat in a spot for over 10 minutes, heh. There are cases where it will sometimes start avoiding something before it even sees it, but that's kinda the worst of it, and can be chalked up to prediction too, it's pretty rare that it happens vs small amounts of units.