Company of Heroes: Eastern Front

Author Topic: AI Bugs Discussion  (Read 57404 times)

Offline Dann88

  • Soviet Commander
  • Major
  • *
  • Posts: 513
    • View Profile
Re: AI Bugs Discussion
« Reply #75 on: May 03, 2012, 12:50:17 PM »
Even on EF, I'm pretty sure recon section use snipe ability but only once in early game. They don't have a chance after that though and all upgrades they choose are Bren and Nades launcher.
I'm good old Dann88 btw.
I'm drunk now, I'm outranked you in philosophy.

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI Bugs Discussion
« Reply #76 on: May 03, 2012, 01:05:02 PM »
@ zemsex Oh did you have a sex change too Dannyboy?  :P
JoJo the 2-3 Tommy squads built by AI could be for several reasons :
  • Pop/Pop Cap issue
  • Basic MP cost for Tommy is expensive
  • Munitions FCN class / anticlass might be skewed.
孫 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 jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI Bugs Discussion
« Reply #77 on: May 03, 2012, 01:20:58 PM »
No AI builds them 2-3 cuz they are limited max 4 engy squads and tommies are marked as cw engy squad, IMO sappers should be engy squad, also for SAS i will use sas sappers as engy.

Muni fcn class/anticlass should not be skewed with this, cuz as i told it is too far away and in 99% muni fcn is not executed that is why AI has a tons of muni and does not spent it a lot. While i play i never ever have enough muni.

Muni fcn raises demand offset by little only if AI has good muni income and good current muni. So it helps AI to build units that need muni including units with abilities upgrades etc so AI gets better "upgraded" army.

Biggest problem is i have no idea how to rate units smartly. If anyone knows any good idea pls tell me :P.

Also AI pay a lot of attention to popcap so am not worried about that. Will explain later.
« Last Edit: May 03, 2012, 01:31:47 PM by jojorabbit »

Offline Pac-Fish

  • Axis Commander
  • Poster of the Soviet Union
  • *
  • Posts: 2494
  • Waka Waka Gluba Gulba
    • View Profile
Re: AI Bugs Discussion
« Reply #78 on: May 04, 2012, 12:53:01 AM »
Biggest problem is i have no idea how to rate units smartly. If anyone knows any good idea pls tell me :P.

What do you mean by this

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 Bugs Discussion
« Reply #79 on: May 04, 2012, 01:40:42 AM »
JoJo and Robotnik for that matter are tring to figure out how the AI computes anticlass ratings that are used to select which units the AI produces.  The existing code documentation for this is nil or buried where no one has found it. It is possible to arbitrarily assign these values I believe, but I would not recommend doing so. JoJo seems to be concerned about an inappropriate assignment of worth.
孫 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 Dann88

  • Soviet Commander
  • Major
  • *
  • Posts: 513
    • View Profile
Re: AI Bugs Discussion
« Reply #80 on: May 04, 2012, 04:35:46 AM »
@Otto: I thought you're so old that can't make jokes anymore ;D

Can Jojo manipulate the rate, I mean make the counter-rate change during a match (or make fixed build-orders instead)? I think it will be better. Because if the counter-rate works well then the AI will play good, if not they play like retarded.
Example: set counter-armored rate like this: AT guns= 100% with max 3, StugIII= 100% with max 4, or set counter-inf rate: Sniper =100% with max 2, MG=100% with max 2, puma=100% with max 3.
What I mean is change the counter-rate into 100% with some units in a time to create a fixed build-order and if the AI can change which to time use a specific build order then it's even better. That way even can stop them from spamming a certain kind of unit because that unit good against everything (like spamming KV-2 or ISU-152) because AI have to stick into a fixed build-order which involves units from different tiers.
Hoped it can be coded and it will works.
I'm drunk now, I'm outranked you in philosophy.

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI Bugs Discussion
« Reply #81 on: May 04, 2012, 05:34:55 AM »
Your under a couple of misconceptions. The AI has a static build order much like you describe for 3-5 minutes or so. This is programed fairly rigidly. Up to four different AI personalities can be programed. One might be set-up for a fast vehicle build , another for a sniper start another for a Standard build start etc. There is no fixed time involved but usually the ai seems to get up to a wher T1/T2/T3 build before it goes dynamic. When the AI goes dynamic it selects the best possible of builds, to counter the Players army. That is in theory. At easy level it is a random pick, At normal one of the top four picks; hard should pick one out of 3 best and expert one of two. The top two picks are both good counters; but the is a random variance factor. Won't tell you what that is . :P You'll be happy to know that when the existing programming is figured out most of the Spamming should radically decrease. I suspect the people who see Spamming from the AI will merely see the AI spam counters to their own Spams. The Ai programming is not hard from a logic point of view. but what programming there is is poorly documented and you end up reinventing the wheel.
I am just learning LUA language. As you know I am a dinosaur and the languages I know well are ancient. I do know how to program. BTW if you want to learn to do this stuff it will take about 200 hours contact time. 100 hours if your good and maybe less if your a canny old bastard like me. But not much less. One of my jobs when I worked inside was training folks to profitably operate different programs. That's how I know the numbers.

One problem that is a nuisance is: much of the AI programming that has been done has been workarounds by folks who don't know exactly what they are doing. Some do, some don't . Its like a Thermos jug. It keeps hot stuff hot and cold stuff cold. How do it know? Much of the chaff in the coding actually short circuits Relics original intent. They knew what they were doing? Some of these mistakes go back to the original corsix work. One of my favorite comments in the Corsix programming is -- Whats a bergetiger.

Well the good news is the dynamic builds will get better the AI strats will improve. and the teching order will not be so linear. The better news is the coders are working with a tactician who understands computer logic and wargaming. I hope you will be unpleasantly Surprised.  ;) Over the past three weeks the programmers have sharpened their skills and knowledge a lot. The bad news is When Ostheer gets programmed there will be a lot of changes required to the Sov programming . Hopefully (from the programming and coding POV ) we won't see another radical revision like v1.6. Nothing wrong with 1.6 mind you,  :P but the reprogramming takes a lot of time. I hope I addressed most of your concerns.
« Last Edit: May 04, 2012, 05:46:24 AM 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 jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI Bugs Discussion
« Reply #82 on: May 04, 2012, 11:38:43 AM »
@Otto: I thought you're so old that can't make jokes anymore ;D

Can Jojo manipulate the rate, I mean make the counter-rate change during a match (or make fixed build-orders instead)? I think it will be better. Because if the counter-rate works well then the AI will play good, if not they play like retarded.
Example: set counter-armored rate like this: AT guns= 100% with max 3, StugIII= 100% with max 4, or set counter-inf rate: Sniper =100% with max 2, MG=100% with max 2, puma=100% with max 3.
What I mean is change the counter-rate into 100% with some units in a time to create a fixed build-order and if the AI can change which to time use a specific build order then it's even better. That way even can stop them from spamming a certain kind of unit because that unit good against everything (like spamming KV-2 or ISU-152) because AI have to stick into a fixed build-order which involves units from different tiers.
Hoped it can be coded and it will works.


Fixed build orders are not too good, i made dynamic one and it works great for now.
AI makes complex calculations i am preparing demand myth to explain how AI calculated demands etc, so i won't explain this now. AI does not counter units like in your example it is similar but a lot different.

Spamming is other problem some units are overrated and AI makes those good units all the time that is why AI spams.

Biggest problem is i have no idea how to rate units smartly. If anyone knows any good idea pls tell me :P.

What do you mean by this

Ignore that for now i wasted too much time on this this is low low priority now.
I have more important things to finish like RMC AI and to test that mining stuff you gave me etc.


EDIT: Does PE AI build those little flaks (flak38) and flak88 with luftwaffe infantry? I never saw it only wehr flak88. Does CW AI build casualty clearing station?
« Last Edit: May 05, 2012, 11:20:21 AM by jojorabbit »

Offline Danou

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Re: AI Bugs Discussion
« Reply #83 on: May 07, 2012, 08:35:40 PM »
Quote
PEA011 - I never saw AI building flak88 from luftwaffe did you?
Yes, PE AI builds Flak 38, watch http://www.youtube.com/watch?v=-pBNRC9pMM8 [nofollow]. I don't know about Flak 88.

Quote
PEA009 - AI does not secure territory with Scout Cars am not sure about this did not saw it yet
Scout car buys the upgrade for "securing territory" but I did not saw it effectively securing a territory. After watching a replay I think sometimes it tries (not sure) to secure but it doesn't work...

Here is something about the Kettenkrad AI:

1. The Kettenkrad should move away after capping 'the last' point (if no new orders are given).
Explanation: In early game, when finished capturing a point and no other task is in queue, the Kettenkrad stays there and usually gets attacked (and destroyed!) by enemy that caps back that point. It should not wait there, but immediately go back (to HQ?) after capping, and wait for new orders.

2. When the Kettenkrad is under attack and has no task, it should go away immediately.
Explanation: I see this together with point 1, after capping the 'last point' it's being attacked, but it doesn't move. From mid-game on I don't see this, but it could be because the Kettenkrad moves constantly from mid-game on (capping, repairing, booby trapping).

Kettenkrad, watch here http://www.youtube.com/watch?v=2ZgoHKcPoD0 [nofollow] and here http://www.youtube.com/watch?v=gWmAuEUEA10 [nofollow].

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: AI Bugs Discussion
« Reply #84 on: May 07, 2012, 09:40:09 PM »
@ Danou,
Good point about moving Kets away from capped points. Have to check the defensiveness value for kets and increase it.

Your Utube presentation is unclear. Squads are shown in blue. are we sure this is AI and not player behaviour we are seeing. I only ask because the current AI files for EF do not permit Quad Flaks to be built. I believe this has been changed already and may be included in next patch; but the condition may have been in the original CoH AI files.

The SC securing and aborting secure operation is odd. It may well represent AI. I have never been able to do anything with a SC or vamp during L/D U/L operation. I have seen AI SCs in a locked-down configuration.
孫 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 Danou

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Re: AI Bugs Discussion
« Reply #85 on: May 07, 2012, 09:53:38 PM »
Quote
Your Utube presentation is unclear. Squads are shown in blue. are we sure this is AI and not player behaviour we are seeing. I only ask because the current AI files for EF do not permit Quad Flaks to be built. I believe this has been changed already and may be included in next patch; but the condition may have been in the original CoH AI files.

It was AI behaviour. Look down middle / down right in 720p, the player's name is "Computer - Schwer" <-- not me
I was also playing PE, but i was the yellow one. Btw I did not give any orders (attack here, defend here, ...) and it was a 'regular EF game' (no other mods installed, nothing special).

About the Blue/Yellow confusion: I was watching the replay from the AI perspective for easier analysis.

Offline Blackbishop

  • Administrator
  • Poster of the Soviet Union
  • *
  • Posts: 12053
  • Community Manager, Programmer and Kicker
    • View Profile
Re: AI Bugs Discussion
« Reply #86 on: May 07, 2012, 10:25:43 PM »
I don't know if we will need to make a special ability for the SC lockdown, since the player needs to select manually the place, I'm not sure if the AI can do this, so it would be better to replace it for an ability similar to ZiS-5 lockdown(but only for AI). Don't know if this is the problem with the brits trucks as well.
Mors Indecepta

Might controls everything, and without strength you cannot protect anything. Let alone yourself...

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI Bugs Discussion
« Reply #87 on: May 07, 2012, 11:27:52 PM »
Nice points,
i never saw any flaks from PE maybe i did not played so much idk.

British trucks will be fixed maybe with new abilities(only for AI) but i will try to avoid them(more human alike) will see i have some plans from british trucks. Also it seems ok to me with british trucks how they work now in internal version sometimes AI moves back with them and secures some territories closer to base, but still sometimes they get destroyed before they reach destination, or before they are locked. This needs some adv calculations same is with scout cars, will try to add them to securing requests but am not sure that they will work that way :). Or maybe some special algorithm.

About kettens ye i noticed weird behavior like they are broken and something like AI is trying to attack with them but kettens don't have weapon and they just stand there, i will try to see where is problem.

Also problem with scout cars i have few solutions for it but did not had much time to test them, am not sure they will be in next patch will see.

What can you expect is more human alike AI, smarter AI, AI will make some decisions smarter, invest money smarter, some nice powerful strategies, and some other stuff but can't tell you everything right now :P.

EDIT:
Also IMO luftwaffe reminds me on axis defensive so i think it should be used similar at least by AI, to make more defenses like flaks they only have flaks AFAIK.
« Last Edit: May 07, 2012, 11:34:02 PM by jojorabbit »

Offline Pac-Fish

  • Axis Commander
  • Poster of the Soviet Union
  • *
  • Posts: 2494
  • Waka Waka Gluba Gulba
    • View Profile
Re: AI Bugs Discussion
« Reply #88 on: May 08, 2012, 12:04:49 AM »
Maybe the minute Ketty reaches certain health it should retreat. Maybe 80%? Just like a pio squad when it loses a man it retreats. Maybe do the same for our beloved kettys ;D

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

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: AI Bugs Discussion
« Reply #89 on: May 08, 2012, 12:08:57 AM »
Nice idea i was thinking something else but it is more complicated then this :). Will try it asap.
Thanks.