Login

russian armor

How does the AI make decisions?

24 Jul 2021, 12:37 PM
#1
avatar of Wings0fred

Posts: 23

Hello everyone,

I couldn’t find an answer on this but, if this has already been discussed, please let me know.

I’m curious what drives the decision making for the AI. I’m aware they “cheat” with resources and understand their general build orders, but I have no clue what the priorities are for AI and so on. I’ve noticed the computers have not adapted to the latest patches well, so I’m thinking there was some stuff hard coded in there which didn’t translate well to the current game state.

Did anyone ever crack the code?
26 Jul 2021, 06:26 AM
#2
avatar of Grumpy

Posts: 1954

Hello everyone,

I couldn’t find an answer on this but, if this has already been discussed, please let me know.

I’m curious what drives the decision making for the AI. I’m aware they “cheat” with resources and understand their general build orders, but I have no clue what the priorities are for AI and so on. I’ve noticed the computers have not adapted to the latest patches well, so I’m thinking there was some stuff hard coded in there which didn’t translate well to the current game state.

Did anyone ever crack the code?


I can help with this. I love cracking codes.

It depends on what type of game you're playing. If it is just you and a bunch of computers then this is what happens:

Soviet, OKW, OST, and USF computers play somewhat normally. It normally seems like Soviet>OKW>OST>USF, but there aren't huge differences.

UKF is somewhat different. It will normally start by building emplacements in locations that it can't defend. Then after it loses everything, it will try to turtle by stacking everything it has left on top of your stuff. This makes it easier for the enemy AI by not requiring it to decide which targets to arty. This may seem disappointing at first, but it was carefully modeled by Relic after watching the behavior of actual UKF players in game. It's kinda your fault for including them even in a comp stomp.

Hope this helps.....

27 Jul 2021, 12:48 PM
#3
avatar of ullumulu

Posts: 2243

27 Jul 2021, 16:00 PM
#4
avatar of Rosbone

Posts: 2147 | Subs: 2

From things I have seen about Relic in the past, they tend to do rather complicated/elegant calculations for things.

Relic needs a way to decide which units to make. This changes after each patch. So it is my belief that they do a calc that decides how much a unit costs and how much DPS it can do. So you will see that after each new patch, the AI will start to spam a different unit. And it is a weak indicator as to what is OP during this patch.

Of course it is hard to make decisions about DPS and map fighting distances. So, for example, the AI will spam close range units like OST pios on a large map where they get rekt.

There is also no way to calculate how strong that units abilities are either.

Some obvious things as your enemy:
- The AI has no Fog of War. So they will run around your units and cap points behind you.
- The AI will park its vehicles in front of your AT weapons.
- The AI will hunt down your sniper.
- The AI will step on or drive over your mines.
- The AI will move its units to the position you tell your units to travel to. So never click far away or use rally points or you will be met by the AI at that point.
- The AI will spam light vehicles with all that extra fuel it gets.
- The AI tends to put bunkers/bofors/etc on your fuel cutoff.

Things as your team mate (still enemy):
- The AI will drive its vehicles behind yours to block them and get them killed. This seems to be code that tries to support your advances but the code is not so good.
- The AI will steal your team weapons etc if you tell your units to take it. So you need to move your units nearby, but not too close to it.
- Since the AI has no FOW, you can almost use it as a recon source. Since it will move to areas where no enemies exist.

And of course it is completely broken for many factions:
- OST AI will send a pio out to cap a point as it makes a new one. Then it will call the first back to build a building while the 2nd is standing in the base.
- OKW will spam Kubels at all points in a game. Must be calculated as powerful for its cost???

This is all from my limited experience playing AI and testing maps.
27 Jul 2021, 19:58 PM
#5
avatar of Grumpy

Posts: 1954

OKW AI will spam only kubels


Oops, I forgot this part. It mostly happens in team games, but there seems to be a bifurcation in the algorithm.

Path A)
Teammate drops - AI decides you are okay - AI continues normal build
Path B)
Teammate drops - AI decides you're a wanker - AI spams Kubels to cap behind the lines
28 Jul 2021, 03:09 AM
#6
avatar of Wings0fred

Posts: 23

Thanks for the insights.

jump backJump back to quoted post26 Jul 2021, 06:26 AMGrumpy


Soviet, OKW, OST, and USF computers play somewhat normally. It normally seems like Soviet>OKW>OST>USF, but there aren't huge differences.



I agree that Soviet is the toughest AI opponent...especially with the ZiS barrages. I also feel like the computer plays differently depending on the composition (i.e., 4 Soviets play differently than 2SOV/2USF), so they must look at allies as part of their decision making as well.

UKF...is trash XD

jump backJump back to quoted post27 Jul 2021, 19:58 PMGrumpy



Path A)
Teammate drops - AI decides you are okay - AI continues normal build
Path B)
Teammate drops - AI decides you're a wanker - AI spams Kubels to cap behind the lines


Accurate. However, the capping ability for an AI is sometimes better than the dropper anyway...

jump backJump back to quoted post27 Jul 2021, 16:00 PMRosbone

Relic needs a way to decide which units to make. This changes after each patch. So it is my belief that they do a calc that decides how much a unit costs and how much DPS it can do. So you will see that after each new patch, the AI will start to spam a different unit. And it is a weak indicator as to what is OP during this patch.



Hadn't thought about a score or value proposition for each unit, but that would be one way to work around some of the issues with deciding on which units to build that would "update" as stats are updated.

jump backJump back to quoted post27 Jul 2021, 16:00 PMRosbone

Some obvious things as your enemy:
- The AI has no Fog of War. So they will run around your units and cap points behind you.
- The AI will park its vehicles in front of your AT weapons.
- The AI will hunt down your sniper.
- The AI will step on or drive over your mines.
- The AI will move its units to the position you tell your units to travel to. So never click far away or use rally points or you will be met by the AI at that point.
- The AI will spam light vehicles with all that extra fuel it gets.
- The AI tends to put bunkers/bofors/etc on your fuel cutoff.

Things as your team mate (still enemy):
- The AI will drive its vehicles behind yours to block them and get them killed. This seems to be code that tries to support your advances but the code is not so good.
- The AI will steal your team weapons etc if you tell your units to take it. So you need to move your units nearby, but not too close to it.
- Since the AI has no FOW, you can almost use it as a recon source. Since it will move to areas where no enemies exist.

Didn't realize the AI will rally to your movement...but I was aware of the other points - especially the team weapon snatching and parking lot antics :D

jump backJump back to quoted post27 Jul 2021, 16:00 PMRosbone

And of course it is completely broken for many factions:
- OST AI will send a pio out to cap a point as it makes a new one. Then it will call the first back to build a building while the 2nd is standing in the base.
- OKW will spam Kubels at all points in a game. Must be calculated as powerful for its cost???


These are some of great examples of some of the bizarre AI behavior. I'm sure there are many more out there as well.

Any idea how they decide which commander to pick? I don't think it's straight randomness - I feel like it's partially dependent on map and army composition.
28 Jul 2021, 23:51 PM
#7
avatar of Grumpy

Posts: 1954


I agree that Soviet is the toughest AI opponent...especially with the ZiS barrages. I also feel like the computer plays differently depending on the composition (i.e., 4 Soviets play differently than 2SOV/2USF), so they must look at allies as part of their decision making as well.

UKF...is trash XD

Accurate. However, the capping ability for an AI is sometimes better than the dropper anyway...


Soviets can be tough not only for the ZIS barrages but also the constant use of satchels. I've had games where a soviet teammate dropped and the computer got a couple wipes because there is no warning sound for satchels. It also typically doesn't try to pull off the light vehicle trick.

I really don't know what is with the UKF AI. It always seem to suck.

I have won automatch games with a computer, even 2v2's on maps like Vaux Farmlands. It's always a judgement call as to whether or not to drop when a teammate drops. The only absolute is that if a UKF player drops, I'll always drop because the UKF AI is comically bad.
29 Jul 2021, 05:22 AM
#8
avatar of FelixTHM

Posts: 503 | Subs: 1

jump backJump back to quoted post28 Jul 2021, 23:51 PMGrumpy


Soviets can be tough not only for the ZIS barrages but also the constant use of satchels. I've had games where a soviet teammate dropped and the computer got a couple wipes because there is no warning sound for satchels. It also typically doesn't try to pull off the light vehicle trick.

I really don't know what is with the UKF AI. It always seem to suck.

I have won automatch games with a computer, even 2v2's on maps like Vaux Farmlands. It's always a judgement call as to whether or not to drop when a teammate drops. The only absolute is that if a UKF player drops, I'll always drop because the UKF AI is comically bad.



Isn't the OKW AI objectively worse? They keep throwing raketens out against infantry (and gift them to the opponent) and waste all their bonus manpower on Kubels, which are just free veterancy for all mid-game infantry. I just played an Expert AI to shake off some rust and the Expert AI seems to have gotten even worse. The AI tried using a Puma and raketens to fight Assault Guards while its Volks and Sturms keep running at the exact same angle into the same DSHKA I left parked on the VP for the past 5 minutes.
31 Jul 2021, 01:27 AM
#9
avatar of Grumpy

Posts: 1954




Isn't the OKW AI objectively worse? They keep throwing raketens out against infantry (and gift them to the opponent) and waste all their bonus manpower on Kubels, which are just free veterancy for all mid-game infantry. I just played an Expert AI to shake off some rust and the Expert AI seems to have gotten even worse. The AI tried using a Puma and raketens to fight Assault Guards while its Volks and Sturms keep running at the exact same angle into the same DSHKA I left parked on the VP for the past 5 minutes.


All of the AI's run into problem with team weapons and are prone to gifting them. They also have a tendency to rush units like Priests or Katy's into the front where they get destroyed.
1 Aug 2021, 13:26 PM
#10
avatar of Wings0fred

Posts: 23

jump backJump back to quoted post31 Jul 2021, 01:27 AMGrumpy


All of the AI's run into problem with team weapons and are prone to gifting them. They also have a tendency to rush units like Priests or Katy's into the front where they get destroyed.


I tend to see an inability to handle support weapons for most factions as well - unless the Soviet has an AT gun nearby to barrage :D

The only thing the AI does well typically is poke at capture points constantly. I actually just won a 1v2 where my partner dropped at the ten minute mark because the AI was just annoying enough to distract them and…well, they weren’t great either.

Wehrmacht with zeroing arty spam is tough if multiple cpu choose it.
2 Aug 2021, 14:37 PM
#11
avatar of TickTack

Posts: 578

I’m curious what drives the decision making for the AI.

Seems to me that the AI has 3 objectives:

0. Build order: produce units and upgrade tiers to get better units
1. cap nearby uncapped / hostile points
2. engage enemies it finds along the way
3. insert navigation commands into its decision tree in response to player pings

And there is a weighting or priority to its moves...
1. main rollout plan gets high weighting
2. responding to player action gets low weighting

... and forces are allocated according to weighting.

The decisions would probably be made via api calls and handled on the backend as opposed to being done client-side, which leads to weird things like tanks circling in place while eating AT shots.

As far as decision making goes, it probably builds a decision behaviour tree. An entity (e.g. a rifleman) would 'move' to 'a point'. If it finds an enemy it would attack.
So commands like 'move' and 'attack' are branches in the tree. The commands would be added when enemies enter an entity's vision radius (los).

I don't think it has a very advanced strategic layer, in that it doesn't really care what the opposition's army size is or how many VP they have, it'll still just resort to adding commands to the tree.

Could be wrong but this is what it looks like to me.

I'd much rather see an AI with entity behaviour that's derived from an overall strategic awareness and for battlefield awareness to be moved to backend services to allow better performance.

For comparison, the average rando human teammate seems to have 2 objectives:
1. camp a single point and defend it until they lose a unit, then drop game
2. play coh2 until losing first engagement, then drop game

Up to you to decide which intelligence is superior.
0 user is browsing this thread:

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

1083 users are online: 1083 guests
0 post in the last 24h
11 posts in the last week
26 posts in the last month
Registered members: 49992
Welcome our newest member, xewiy33830
Most online: 2043 users on 29 Oct 2023, 01:04 AM