Company of Heroes: Eastern Front

Author Topic: AI  (Read 11429 times)

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI
« Reply #15 on: April 24, 2012, 04:45:35 PM »
Quote
Ich bin Compstomper - Otto Kennedy

If you want to beat the AI... misdirect it. Build barbed wire and tank traps to block its optimum pathing routes. AI will have to recalculate (Like a GPS). Delay production of units so you can start to produce two or more different threats at once. AI will have to recalculate. Work on both flanks simultaneously. The AI will have to recalculate. Each time you force the AI to recalculate it will require a 4 sec delay to the AI's response time. This also works with players but in a different way. Compel the Enemy do not be compelled. There are many aspects to the Gentle art of Defencing, But when you go on the Offensive BE DECISIVE. If you have good recon you will see the Point of Decision. That is the time to strike!

Quote
"On to Ostheer" - Feldwebel Otto
孫 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 stealthattack1

  • Axis Commander
  • Major
  • *
  • Posts: 713
  • there is no losing, only delayed winning.
    • View Profile
Re: AI
« Reply #16 on: April 24, 2012, 05:18:42 PM »
as a note, congrats to jojo on becoming a dev!


OH FOR CRYING OUT LOUD AND RAPE CEASERS GHOST IN FRONT OF THE CHILDREN!?

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI
« Reply #17 on: April 24, 2012, 06:10:08 PM »
Quote
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 :-).
Don't be afraid be very afraid ;) LOL -> this is not supposed to be rude just a joke :)

Quote
as a note, congrats to jojo on becoming a dev!
Thanks.

Offline Pfingstei

  • Ingenery
  • *
  • Posts: 6
    • View Profile
Re: AI
« Reply #18 on: April 24, 2012, 11:17:50 PM »
Quote
Don't be afraid be very afraid ;) LOL -> this is not supposed to be rude just a joke :)

Don't worry, at least I have an idea now what I will meet soon on the battlefield. If I produce an anti-tank crew, the AI is likely to order e.g. a sniper or a mortar crew :-).

Do you know whether the standard COH AI is based on a similar concept?


Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI
« Reply #19 on: April 24, 2012, 11:29:07 PM »
Quote
Do you know whether the standard COH AI is based on a similar concept?
Yes all strategy based games are made with similar AI concept, AFAIK there is no other way to calculate.
In connect4 ai calculates his and your moves on those results he takes best move if step is high(more moves to evaluate) then you have unbeatable ai and only way you can "win" is to make draw game ;).

Well here is more about how ai works:
AI takes all units that he can build, puts them in table and gives them unique number (demand), that number represents some sort of "unit value" (something like how much is unit good vs enemy units).
Lets say AI table is this:
-------------------------------
1. puma
2. granadier
3. hmg
4. sniper
5. volks
6. pio
----------------------------
AI wants to counter infantry with this table all units in table are good vs infantry some of them are much better vs infantry some less better.
Expert AI will pick one of the first 2 units in table(puma or granadier) so he has rly low chance that he will not kill you. While Normal AI picks units randomly from table.
For example he can pick pio vs your rifleman, and kinda make a little mistake that is why normal is not too hard to beat he makes a lot of mistakes.

Hope it helps ;).

Offline Komrad

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Re: AI
« Reply #20 on: November 15, 2012, 12:24:50 AM »
Some good games have two difficulty settings:

AI Difficulty, AI Handicap

Which can be adjusted separately. So players can play more variety of games against AI: Smart enemies with little resources, or dummies with lots of resources (like real soviet strategies were  :D )

Offline Chumley

  • Ingenery
  • *
  • Posts: 4
    • View Profile
Re: AI
« Reply #21 on: November 15, 2012, 09:37:03 PM »
Greetings,

I play 'comp stomping' solely because I have no time to dedicate to a game against humans as I to often have to pause my game and walk away..not good in PVP. Also, I completely suck at mouse/keyboard management due to arthritis of the elbow and hand/fingers (and brain but that's a different story!). But to give you my 'street creds' I will say that I have so many hours stomping the comp in COH/EF that I could have worked a second job last year. Dunno if that's good or bad (but I WILL slay you if you tell my wife!!!)....but if I play against more than 1 comp AI opponent, one is always Expert level and the other is Hard level. As I speak I have a game of COH open on my comp against an Expert Brit and a Hard American. I am Wehr and my comp AI partner is PE. I am currently losing......but that may change! Read on!

So here are my tips on beating the AI:

1. Forward base: You will almost always lose if you cannot reinforce your units without sending them all the way back to home base. Create a forward base ASAP, even if it is just a halftrack. This is hardest on the Brits as you typically have to wait until you create a second truck. When doing this forward base, make sure you grab it with enough units to hold it as the AI will often decide your forward reinforcement point is the main threat and throw the kitchen sink at it. I call this the 'first fight' and it is imperative that you win it. Grab your spot, create the reinforcement point, and hold it! See # 2 for best placement of your reinforcement point....

2. Find the AI's 'key point': The AI will always decide that one or more points are 'key' and if it loses that point it will throw everything at it to get it back. I use this to overcome my AI partner's crappy play (esp Brit on AI...the AI completely sucks for Brits and I feel having them as a partner is especially bad..so I use them all the time as partner) by grabbing a key point, establishing a forward base near it, and hammering the opposing units as they try to retake the point. This often negates the resource bonus of hard or expert level as the AI throws units into the teeth of your defenses. I routinely inflict casualties at 4:1 or better ratio around the key point. This may cause you to not be able to advance, but it frees up your AI partner to stomp the opponents and suddenly the game is yours...

3. Stay Aggressive: Don't allow the AI to hold onto res points too long. Take them even if they aren't contiguous to your areas and you gain no resources from it. Make the AI react to YOU, don't react to it or you are toast. The AI will always send all its units to the front lines, so find their 'stream' and go around it to cut off the bulk of the resources. This also gets the AI into a 'too many units' scenario which will work well for you.

4. Stay in the Game: Never give up. Eventually, the AI will 'run out of steam' and either stop producing units at all or only produce the unit is thinks is its best unit. This can result in a ton of Hetzers...but not enough forces that can cap the ground they force you off of. Stay in the game, it is never 'unwinnable'! Remember your opponent is AI, not a human. It may well pound you into dust...it may well do something silly that lets you back in the game.

5. Watch for bad randoms: There are games where it seems the comp can't miss and you can't hit. I've seen a Marder put 6 (six!!) rounds into an M18, all hits and 3 'bounced off', 3 scored minimal damage, I lost the Marder to the M18, and the M18 drove away....I've put 3 grenades into a building with a grenadier squad in it and killed no-one, and the AI cleared 2 of my squads from buildings in 2 'atomic' grenades..sometimes the 'random number generator' is completely in your opponents favor. When this happens I find the best defense is to defend hard and update your troops to get the bonuses. It seems the only way to offset the AI's better 'random numbers'.

I hope these tips help you out. I do lose games, but that's what keeps me playing COH. If I won every game it would be boring and I would move on :)

S! (Salute!)

Chumley

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI
« Reply #22 on: November 16, 2012, 03:49:11 PM »
Hey Chumley! I am glad to see another Stomper with a Cause. I too have issues that prevent me from enjoyably playing real time PVP. If it wasn't for real bad health, I wouldn't have no health at all. Send me a PM if you want we can talk.

Your comments on beating the AI are interesting. Do you play 500 Victory point games? I do. I find that creating more interesting play scenarios more satisfying then simply beating the AI. In this regard you may consider locating the maps that are unbalanced for one side or the other based upon starting positions. Some maps, like Grodno or Silver's maps are balanced in this regard. Other maps like Kursk are not. (I am speaking for AI play here). Kursk is much more difficult if you reverse the "fixed Start" locations. In this case on Kursk it applies to both Wehr or Sovs. Karkov is another example.

I have to disagree with your observation regarding the "AI key points". It is true the AI will fight for Victory Point locations. It is less obvious that a geographic or resource point is preselected by the AI. Evidence for this is: If you wall off a resource point the AI ignores it. If you wall off a combination of victory point and resource the AI will assault the "walls" to obtain access. Frankly in EF_mod this is an exploit when playing against a Soviet AI. Simple barbed wire will deny the Soviet AI access to large areas until they obtain vehicles that can crush wire. I hope that ultimately the Devs will remove this exploit.

Regarding Aggressiveness: Keep the AI moving. Securing resource and victory points at disparate points will cause the AI to react. When they send a stream to the threatened points hit a target point in a different area. The AI reacts quicker than we do but does not seem to change targets in mid stream.

Regarding bad randoms: I know just what you mean. It almost seems like the AI squads have different Stats than player squads. The AI prefers to attack with a 1.6:1 superiority. You should go for a 2:1 superiority in order to overcome this characteristic.

I would be interested in your views on maintaining situational awareness given the difficulty we both have in micro. The comp sees all, knows all. It is difficult to manage multiple task forces and  too easy to lose track of individual ssquads sent on a specific mission. Any ideas?
孫 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 MonolithicBacon

  • Mapper
  • Commissar
  • *
  • Posts: 267
  • When in doubt, crush.
    • View Profile
Re: AI
« Reply #23 on: November 16, 2012, 04:11:43 PM »
This is hardest on the Brits as you typically have to wait until you create a second truck.

This made me wonder...

My general build order as the Brits is Tommys, Bren, Tommys, then pack up base and speed governors (only on high resources). That way, your recon can cap the most important locations, while your "slow" infantry can capture at least one flag before the bren carrier is out. Stick them in the carrier, run them to the most tactically or resourcefully independent spot, capture it, and by that time, your HQ is on the move to lock it down.

You may be light on your feet at the beginning (with only a recon and another, bren-less squad to do the rest of the capturing), but that means you can lock down important areas and defend them within two minutes or so.

Is the AI programmed to attempt things like this with the Brits? I have seen them rushing HQ's about, but do they focus on important locations above all, and are they ever this fast to mobilise?

Offline Pac-Fish

  • Axis Commander
  • Poster of the Soviet Union
  • *
  • Posts: 2494
  • Waka Waka Gluba Gulba
    • View Profile
Re: AI
« Reply #24 on: November 16, 2012, 09:20:06 PM »
They like to stick their HQ on the front lines which result in their imminent death ::)

Om Nom Nom Nom
"Panzer-Guppy ready for battle!"
"Ha Ha Ha! We have the ZEAL!"
"Grenadiers! Fall In!!"

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI
« Reply #25 on: November 17, 2012, 05:01:07 AM »
The CW AI is programmed for a quick start and indeed when it has deployed three cappers it can really develop quite quickly. Optimally the AI will cap at least 5 resource points before it mobilises its second HQ Truck. It also starts a sim city development at the second HQ's location. What the AI code does not address is how to optimize the location for the second HQ relative to resource collection and enemy threat activities. For this reason much of the AI code for CW HQs has been disabled. Jojo figured out how to undo the disabled stuff but until someone comes up with a good optimization algorithmthe Suicide Highlanders HQs will be a problem.

AFAIK the AI will not move an HQ (even when the code is "enabled"), unless there is another HQ locked down.

@Bacon: If you can get the performance you are speaking of in two minutes, that is really excellent. When the AI code is sound and clever it can outperform human time projections significantly, I have seen 4 light tanks on the field in under 10 minutes for the Sovs on normal AI. The maximum time allowed to develop clever programming is 7 minutes for the Build Order Phase. Unfortunately during the BO phase there is no reactivity to enemy developments (unless a ~2 minute period of chaos is introduced). Hope some of this is helpful.
孫 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 MonolithicBacon

  • Mapper
  • Commissar
  • *
  • Posts: 267
  • When in doubt, crush.
    • View Profile
Re: AI
« Reply #26 on: November 17, 2012, 06:10:35 PM »
Cheers Otto! You have quite an insight into all of this! And by the way, I'm all for changing the support truck HQ name to "Suicide Highlanders HQ".

On another note though, I was thinking about the AI markers that we use on the maps. You can place three types, seemingly prioritising the importance of the location. Does anybody have any ideas as to what degree these work? I have noticed that they are drawn to these markers, regardless, but what does the difference between "low", "medium" and "high" entail?

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI
« Reply #27 on: November 20, 2012, 03:09:41 PM »
Bacon, your question(s) are somewhat confusing. I think perhaps you are asking two different things here?

The ping markers do work. I have seen numbers associated with the ping markers but have no idea what they mean or how they work. The capture, attack and defend pings do work when playing with AI. Capture and defend work differently then capture. Allied blobs will move on a line/front towards attack/defend markers. They are subject to traffic jams/gridlock. when manuevering "your" ai blobs, I frequently find placing the attack/defend pings perpendicular to the blob's linear orientation works very well. Use baby steps not large changes in objective distance. If you are playing 3v3 you can cause the allied formations to flank the enemy blob on either side. This will allow you the player to seal the pocket. VERY SATISFYING.  On a 2v2 scenario you can manipulate your ally to attack on a approach that protects the player flank and should be oriented towards a converging objective point towards which you as the player are concentrating. In this case I usually park the Zis Good Humor truck in my "ally's" base area to support his activities. Hopefully Jojo's fix for AI ambulance lock-down bug will be included in the next patch of the game.

Capture ping used for AI allies is tricky. Try to time the use of this button for right before your ally finishes capping a nearby point.

When you referred to the high, medium and low markers I presume you were talking about resource points. The AI works with these a little differently. VPs are to be considered here as well; although the AI code for VPs is separate from resource points. The AI sets priorities for resource acquisition on at least three levels. Basic game orientation, (unchangeable once the code is written), Difficulty level priorities, (which have two sets of instructions per difficulty level) and Personality/Build Order priorities, (which can be set for different Build Orders and Personalities in each different game). The AI can be set to prioritize Fuel or Munitions. The AI can be programmed to prioritize securing high/low or medium resource points. Part of the Suicide Highlander problem is usually the priority is set to secure high resource points; which will place the HQ in a dangerous sector and cause the truck to move through dangerous sectors to get there.

There are several ways the AI prioritizes VPs. The main thing to consider here is if the AI VP control drops below a certain percentage, (Say 50 %), the AI will change its resource acquisition priorities to obtain VPs to maintain the preset VP priority, ON A TEMPORARY BASIS. Clearly there are opportunities here for the player to disrupt the AI programming goals. The AI also prioritizes fuel and munition point acquistion over SPs. Not only are there opportunities to disrupt the AI programming here but You should incorporate this into your strategy when planning your capping strategy if you have an AI ally. SPs cap quicker < low < medium < VP (I think) < high. Cut-offs are particularly significant when playing against AI at higher difficulty levels.

I hear wonderful things of your mapping skills. Keep up the good work!
« Last Edit: November 20, 2012, 03:12:20 PM by Otto Halfhand »
孫 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 MonolithicBacon

  • Mapper
  • Commissar
  • *
  • Posts: 267
  • When in doubt, crush.
    • View Profile
Re: AI
« Reply #28 on: November 20, 2012, 07:10:09 PM »
Thanks for the reply Otto, but we've gotten onto different points here! I'm referring to the AI control points that you can't see in game. They are in the gameplay resources on Worldbuilder, and are added on the vast majority of Relic maps. They seem to direct the AI towards specific locations, but I was wondering if anybody has real information on them.

They are signified by large, 3d arrows in red, green and blue, but as I said, they are invisible in game.