Company of Heroes: Eastern Front

Author Topic: AI  (Read 11428 times)

Offline Pfingstei

  • Ingenery
  • *
  • Posts: 6
    • View Profile
AI
« on: April 24, 2012, 10:19:06 AM »
Hi,

A friend of mine and I really enjoy playing the eastern front mod. Sure, we are occasional playsers and, hence, not professionals, but we are improving. From our experience, the step from "easy" to "normal" is a significant one. Often, it is really frustrating that we seem to loose ALWAYS when units of equal strength meet on the battlefield (especially on maps crowded with buildings). When comparing "easy" and "normal", we got the impression that for "normal" the probability values are changed significantly to our disadvantage. It is always a matter of tactics of course. However, we have the general impression that changing to difficulty "normal" means weakening our units to class "cannon fodder".

Hence, our question is: could somebody please give a basic characterization of the different AI steps (and the pertinent major changes)?

Offline Walentin 'Walki' L.

  • Developer
  • Poster of the Soviet Union
  • *
  • Posts: 3262
  • Creator of Things
    • View Profile
    • Steam Profile
Re: AI
« Reply #1 on: April 24, 2012, 10:27:41 AM »
There are only two persons that know this!

robo and jojo!
I identify as a four-eyed bird man. /s

Offline My Name Is Ante

  • Guard
  • ***
  • Posts: 103
  • Please, my name is Ante not Dante
    • View Profile
Re: AI
« Reply #2 on: April 24, 2012, 12:04:25 PM »
There are only two persons that know this!

robo and jojo!
Presenting to you, Eastern Front AI Reality Show!!!

To the question, I believe easy has less health or income, but not sure.
Better wait for the coder.

(P.S.: Though seriously, you guys need to make that kind of show... :P )
I am sorry for my bad

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI
« Reply #3 on: April 24, 2012, 01:29:19 PM »
Here's my take.

Easy: AI collects .75 of the resources that the player collects. AI uses a basic Build order in the Static (preprogrammed) phase of the game.
Normal: AI and Player are on an equal footing for resource aquisition. AI uses a basic Build order- Static.
Hard: AI Collects 1.25 resources. "AI personalities" are selected at Game Start, in Addition to Static Build Order other Build orders are added to the mix. Example "Wehr Heavy Engineer" personality is geared to Set up Wher for Fast Vehicle Start. In the Static phase It will build 2 Pios and send them out to cap and OP two Fuel Points. (This is a simplification of the "Heavy Engineer" Static Build Order - Dont want to let too many cat's out of the bag.
Expert: AI collects 1.5  resources and can be given more complex AI personalities.

Different tweaks are (can be) granted to AI Tactics, AI Unit selection, etc; that apply to the different Hardness levels as well.

If you can Read LUA programming language, (SCAR is a subset of Lua), You can determine many aspects of CoH/EF play, without recourse to Corsix. I don't think you can acess unit stats without Corsix though.
孫 The
EF_v1.7.10
子 Art
Illegitimi non Carborundum -"Vinegar" Joe Stilwell
兵 of
Sun Tzu says: In warfare one compels and is not compelled by others
法 War

Offline Pfingstei

  • Ingenery
  • *
  • Posts: 6
    • View Profile
Re: AI
« Reply #4 on: April 24, 2012, 01:44:36 PM »
Are probability values affected as well? It feels like our units hit less frequently whereas the AI units are more likely to hit our units.

We meet many situations where our units seem to be overwhelmed too easily. For instance, it happens quite often that a anti-tank unit (facing a Puma) is lost by some shots without hitting the vehicle.

From my point of view, losses should feel like "the opponent tactics was superior to my one" or "I still have to train a lot". That is okay of course and motivates us to play again. In the eastern front mod, however, losses against "normal" additionally feel like "the opponent seems to know everything", "my units are failures" or "I somehow feel betrayed".

I suppose that other good (but occasional) players of the mod may feel the same way.

Offline GodlikeDennis

  • Donor
  • Poster of the Soviet Union
  • *
  • Posts: 4454
    • View Profile
Re: AI
« Reply #5 on: April 24, 2012, 01:59:33 PM »
AI combat power is adjusted in vCoH and they get a resource bonus. In EF, the AI is changed so combat is always on par but they get a larger resource bonus than vCoH.
If you get into an argument with me, you're wrong.

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI
« Reply #6 on: April 24, 2012, 02:02:18 PM »
The Show  ;D

If you ever programmed AI for some simple games like tic-tac-toe, connect4 or complicated game like chess you will know what am talking about, but i will try to explain this as simple as possible.

In every game AI thinks or evaluates, in board games like connect4 difficulty is determined with step (how far will AI look).
In connect4 if step is 3 then AI will calculate 3 moves from current move "to the future". Or simpler one his move one yours move then again one his move and with results AI will calculate how much chances that moves gives him to win. With these simple games it is easy to make AI unbeatable.

Evaluation is method that usually calculates what is best move for AI or simpler what move gives AI more chances to win that is in case of board games. On board games there are no dependencies on resources or something, in CoH you have res etc..

Back to the Show ;D
In CoH evaluation is method that calculates what is best unit to produce to counter enemy units which also means more chances to win.
For example if you are facing Axis and you build sniper sooner or later you will see motocycle/shwimwagen on the field that is trying hunt your sniper. Or jeep if you are facing american AI.

Some examples how AI counters maybe it will help you to defeat AI: 
- snipers with light vehicles(jeep/motorcyle/swimm)
- HMG with snipers
- rifleman (infantry) with snipers or hmg(calculates what is better)
- defensive buildings (bunkers etc) with mortars
- ATG with mortars or snipers

Step from easy to normal is huge cuz easy AI does not calculate anything he just makes random units.
AFAIK only Hard and Expert AI have res bonuses + Expert AI calculates with better precision, if normal AI would calculate with expert precision then it would be more hard AI then normal AI ;).

Simple: your units are overwhelmed easily cuz evaluation, AI makes units that easy counter your units.
AI knows all units you have and then calculates what is best unit to counter your units and produces one of top 5 best units in calculations exceptions is for expert he will always produce best unit.

Losing AT with puma is AI tactic to avoid as much as possible AT ;). Try to guard AT with something rifleman maybe with stickies. Also Wehrmacht AI is the smartest one in game, normal Wehr seems like Hard amer sometimes.

I usually play vs normal or hard and i play like a noob.
When i started to play CoH normal AI was so hard to me (i never play easy cuz i know easy in most games does not calculate), easiest way to kill normal AI for me was to deny him fuel so he does not have more fuel then me.

Like Otto said personalities are also changed with difficulty levels, hard is more aggressive, attacks more often with more units etc.
But easy is easy enough without calculating it does not need 0.75 res. Easy IIRC will not attack until 3-4 mins of game are passed -> i need to check this.

If in coh i would use your "moves" and your res in calculations then AI would be a way to smart and unbeatable.
This does not affect unbeatable expert AI with res bonuses, expert is hard to beat cuz res bonuses and better calculations.

I hope I explained simple as possible ;).

Quote
I suppose that other good (but occasional) players of the mod may feel the same way.
Cuz players don't think in a good way. Some strategies that you find over the internet will never work vs AI, cuz AI knows what units you have ;), those strategies are mostly for PvP games.

Offline Pfingstei

  • Ingenery
  • *
  • Posts: 6
    • View Profile
Re: AI
« Reply #7 on: April 24, 2012, 02:37:06 PM »
Thank you for the insight into the AI. Things are getting much clearer know. And it seems that we have to improve a LOT and will try to produce less cannon fodder ;-).

However, i still have one open question: Does the AI know my units after they are encountered/seen on the battlefield (what is realistic) or does the AI know my units after they have been produced?



Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI
« Reply #8 on: April 24, 2012, 02:49:36 PM »
You need to produce different units not all the time only one type of unit. If i understood you correctly you are making tons of conscripts. Try to learn what units are good vs other units, try to think like AI.

Also you can try to sneak to enemy base with sniper or better sov arty spotter and see what your enemy is doing so you can prepare yourself ;). Try to make forward base.
Maybe some expert players will know better how to defeat Hard/Expert AI.

Answer to your Question:
IIRC AI "cycle of thinking" is 4 seconds so you can say AI updates his "knowledge" every 4 seconds and then it knows what units you currently have. Seen on battlefield would be realistic but AI would be then kinda stupid and all calculations would have to be changed.
For me it is realistic now for example AI knows that you have sniper but he does not know his position on the map so he is hunting sniper with motorcycle that does not mean that AI will kill your sniper with motorcyle. AI can lose motorcyle, AI can kill sniper with his sniper, AI can kill sniper with any other unit, etc. AI only knows that there is sniper on map and AI will try to find and kill sniper with motorcycle, sometimes you can see when you retreat sniper motorcyle will try to catch him and kill him.
« Last Edit: April 24, 2012, 02:53:53 PM by jojorabbit »

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI
« Reply #9 on: April 24, 2012, 03:10:41 PM »
Are probability values affected as well? It feels like our units hit less frequently whereas the AI units are more likely to hit our units....From my point of view, losses should feel like "the opponent tactics was superior to my one"...additionally feel like "the opponent seems to know everything", "my units are failures" or "I somehow feel betrayed".
It certainly seems like AI vehicles have higher combat effiency than player vehicles.

I agree and wish the Aesthetic of play (not necessarily realism), would receive more emphasis.

The Computer Sees All and Knows All, (SAKA). The AI Sees All but only Knows what it is programmed to know. Sometimes the Coder will deliberately prohibit an AI tactic if it is viewed as an "Exploit" vs players.

The AI can only know about your OB after units go into production.

JoJo: Good explanations. Are you certain about the 4 second Strategic response time.? Your flow diagram would suggest the Strategic response time could be 8 ticks.  Might be handy to have a variable Strategic Response time to balance Normal/Hard/Expert. PM me about this.

IMHO the Key to victory in CoH is anticipating what your opponent is going to do next; whether you are a Player or Compstomper. This is what JoJo was talking about when he started the "Soviet Strategies are too predictable" topic in Balancing. In this regard the Sovs should have a fast rcce vehicle (not a BA64 type combat unit).
孫 The
EF_v1.7.10
子 Art
Illegitimi non Carborundum -"Vinegar" Joe Stilwell
兵 of
Sun Tzu says: In warfare one compels and is not compelled by others
法 War

Offline Pfingstei

  • Ingenery
  • *
  • Posts: 6
    • View Profile
Re: AI
« Reply #10 on: April 24, 2012, 03:26:21 PM »
Well, this discussion opened my eyes :-). I guess the fact that the AI always produces anti-units against my units may explain why we feel to be disadvantaged when units meet. They meet units which have been produced to kill them. Nonetheless, we will keep both eyes on the interaction of units. We often see small bazooka units (hopefully specialized for tackling tanks) eliminating our units actually equipped for eliminating infantry.

The key message may be: It is not possible to run away as the AI knows everything (besides the position of the unit). Hence, the only solution is to support units by other units which is possible on open maps or at narrow points, e.g. bridges. We already were successfull in that situations. However, in my point of view, effective defense is hard to be realized on maps crowded with buildings or a pattern of forest parts.

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI
« Reply #11 on: April 24, 2012, 03:48:29 PM »
Quote
It is not possible to run away as the AI knows everything (besides the position of the unit).
It is possible you just need to support your units and if you think you will lose make some backup units. You can't counter puma with tons of conscripts, sometimes if you attack puma with bazooka like weapon you will see how puma goes away from you trying to find units that can't kill her ;).
Also try diff combo units, like hmg/bunker to pin them down then blow up with mortar or something similar then AI will have to reinforce a lot, Protect you ATs, etc. Experts will know better then me.

In some situations like bazooka situation AI looks if you have tank spawner building(Tank hall, tank depot, etc) so he prepares bazookas to counter early vehicles/tanks.
What i have noticed when you see pak on the map Axis AI is close to pumas and stugs so prepare for them ;). Build mines, upgrade sticky etc.

As i told before ppl don't want unbeatable super trooper AIs in strategy games, but a lot of practice is needed to beat high lvl AI with res bonus. IMO when facing res bonus AI you need a rly smart and good tactic to counter and outsmart AI calculations. Also AI makes mistakes in buying units that is what makes it beatable, Expert ai makes rly low mistakes in calculations.
For Normal and Hard mistakes are around 20%-25% for Expert i think 5-10% to buy wrong unit am not 100% sure abut this need to check out.

Easiest are maps with bridges then blow up bridges so AI has only one path to come to you, example Vire River Valley.
Open maps are kinda hard.

Easy AI does not calculate that makes -> AI does not know anything about your units and how to counter them, he just produces units randomly also never goes fast vehicles.

Other AI calculates and that is why you need support, etc.

Offline MBJrP36

  • Donor
  • Guard
  • *
  • Posts: 100
  • Good luck with that.
    • View Profile
Re: AI
« Reply #12 on: April 24, 2012, 03:56:45 PM »
Great infromation guys, I knew the AI was complicated but I never knew it had all knowledge of my production.
They are in front of us, behind us, and we are flanked on both sides by an enemy that outnumbers us 29:1. They can't get away from us now!

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI
« Reply #13 on: April 24, 2012, 04:04:58 PM »
Great infromation guys, I knew the AI was complicated but I never knew it had all knowledge of my production.
Well in most cases AI counts only units that are already produced(units on the battlefield), on some other cases AI counts also units that you are currently producing(units that are in production). Example you are producing tank AI will count it and prepare AT to counter it or bazooka, etc.

No problem, if you have any other questions about AI feel free to ask i will try to answer them ;).

Offline Pfingstei

  • Ingenery
  • *
  • Posts: 6
    • View Profile
Re: AI
« Reply #14 on: April 24, 2012, 04:10:14 PM »
And I always wondered why "normal" of Eastern-Front feels like "hard" of standard COH. Now I'm a bit afraid of the upcoming matches against the AI :-).

Thank you for the hints.